The demo

A page of 100 pretend users. A tile lights up when a flag is on for that user, and the page follows every change you make in the dashboard within about a second. It shows what switches, rules and percentage rollouts do at a glance.

It's a tiny Node server using the JavaScript client. Node 24 runs it directly; there's nothing to install.

Run it

  1. Start Switchyard and open the dashboard (see the main README).

  2. Create a project and copy its production SDK key. Create a flag called new-checkout.

  3. Run, from the repository root:

    bash
    SWITCHYARD_URL=http://localhost:8080 SWITCHYARD_SDK_KEY=sdk-… node demo/server.ts

    On Windows PowerShell, set the variables first: $env:SWITCHYARD_SDK_KEY="sdk-…". Or put them in demo/.env (it's ignored by git) and run node --env-file=demo/.env demo/server.ts.

  4. Open http://localhost:3000.

Things to try

In the browser

http://localhost:3000/browser is a checkout page using switchyard-web with the environment's client-side ID: the Pay button takes the colour from a text flag button-color (variations violet, teal, amber), and a badge shows new-checkout. Mark both flags Available to browsers, build the browser client once (npm install && npm run build in clients/web), and add SWITCHYARD_CLIENT_ID=cli-… (from SDK keys) to the settings. Pick another visitor and the page asks again for them.

Settings: PORT (default 3000), FLAG (the flag shown first; default new-checkout). The page has a menu for the others.