Skip to content
FlagPilot
Menu

Get started

Get started

Your first flag takes a few minutes. Sign in, create a project, then point the SDK at the delivery service.

  1. Step 1

    Sign in

    Sign in to the dashboard. With no organization yet, it points you to setup, where you create your organization and first project.

  2. Step 2

    Create a flag

    The project comes with development, staging and production. Create a flag and turn it on in development.

  3. Step 3

    Create a server SDK key

    On the environment’s SDK keys page, create a server key (rk_srv_). The secret is shown once; only its hash is stored.

  4. Step 4

    Evaluate

    Create one client per process, wait for initialization, and call a variation method with a context.

The Node SDK

server.ts
import { createFlagClient } from '@rollkit/sdk';

const client = createFlagClient({
  sdkKey: process.env.FLAGPILOT_SDK_KEY!, // server key, never ship to a browser
  baseUrl: process.env.FLAGPILOT_BASE_URL, // the delivery service
});
await client.waitForInitialization({ timeoutMs: 5_000 });

const ctx = { key: 'user-42', plan: 'pro', organizationId: 'acme' };
if (client.boolVariation('new-checkout', ctx, false)) {
  // new code path
}

Keep the server key on the server. Browsers use a client key (rk_cli_) against the delivery service’s evaluate endpoint, which returns values for client-enabled flags only.

Run it yourself

  • Node 24, pnpm 11 and Docker
  • PostgreSQL (the repository’s Compose file starts one)
  • An OIDC identity provider for production sign-in (Zitadel); a development login exists for local use only