Introduction

Flaggish is a feature flag tool for React, Next.js and Node. Ship code switched off, then turn it on from the dashboard, without a redeploy.

You wrap new code in a flag, deploy it switched off, and switch it on when you’re ready. If something goes wrong, you switch it off again. No redeploy either way.

app/checkout/page.tsx
import { getFlag } from '@flaggish/sdk/next';

export default async function CheckoutPage() {
  const newCheckout = await getFlag('new-checkout');
  return newCheckout ? <NewCheckout /> : <Checkout />;
}

Who it’s for

Flaggish is for developers and small teams shipping JavaScript apps: Next.js on the App Router, plain React in the browser, and Node services, scripts and workers. It’s built to be set up in about five minutes and to stay out of your way after that.

Core ideas

Flags

A flag is a named on/off switch. Your code checks it by name, for example new-checkout, and gets back true or false. A flag can also be in a percentage rollout, where it’s on for a share of your users.

Environments

Every project has two environments: Development and Production. Each flag lives in one of them, so you can try a flag in development without touching production. The SDK reads one environment at a time, based on NODE_ENV unless you choose. See Flags and environments.

The dashboard

The dashboard at app.flaggish.dev is where you create flags, switch them on and off, roll them out gradually and schedule them. Changes reach your servers within about 30 seconds, and browsers on their next page load.

The SDK

@flaggish/sdk is one package with three entry points:

ImportUse it for
@flaggish/sdk/nextNext.js App Router: the proxy, the server provider, and getFlag and getFlags in server code
@flaggish/sdk/reactReact: FlaggishProvider, useFlag and useFlags
@flaggish/sdkNode and scripts: createFlaggish and flushReach

Local evaluation

The SDK downloads your flags once, caches them for 30 seconds and decides each flag inside your app. A check is a lookup in memory, not a network call, and your users’ IDs never leave your app. If Flaggish can’t be reached, checks still answer, from the last flags the SDK saw or your defaults. How Flaggish works explains the details.

Where to next

Was this page helpful?

Request early access

Become a beta user, or stay up to date with the project.