Skip to content
DemoKit
Open source · Apache-2.0

Integrate once. Endless demo data.

DemoKit intercepts your app’s fetch calls and generates demo data for any story you need. Your real app is the demo — no backend changes.

Quickstart

The whole integration

Wrap your app in a provider, map your routes, open ?demo=true. Your backend never knows.

app.tsx
import { DemoKitProvider, DemoModeBanner } from '@demokit-ai/react' const fixtures = {  'GET /api/users': () => [{ id: 'u_1', name: 'Maya Chen' }],  'GET /api/users/:id': ({ params }) => ({    id: params.id,    name: 'Maya Chen',  }),} export function App() {  return (    <DemoKitProvider fixtures={fixtures}>      <DemoModeBanner />      <YourApp />    </DemoKitProvider>  )}
01

Install

npm install @demokit-ai/react
02

Wrap your root component

Fixtures are the URL patterns you already have. :params and * wildcards match the rest.

03

Open ?demo=true

Demo mode survives refreshes. Toggle it off and every fetch goes back to your real API.

Any React app that talks to an HTTP API over fetch works the same way. DemoKit patches fetch itself, so React Query, SWR, and plain fetch need no extra wiring. Read the docs.

Data fidelity

Demo data has three levels

Schema-valid is table stakes. Coherent is the hard part. L1 and L2 run offline; L3 writes the story.

l1-schema-valid.ts
import { generateDemoData } from '@demokit-ai/core' const { data } = generateDemoData(schema, {  level: 'schema-valid',  counts: { User: 10, Order: 40 },  seed: 42,})// every field matches your OpenAPI types

Every field is the right type

Import your OpenAPI spec. Every field matches its type, every enum holds a legal value, and every run reproduces from a seed. No AI involved, no network.

emailstring
createdAtISO 8601
tier"pro"
No AI required · runs offline
SDK

Demo environments that don't break mid-pitch

No staging fork. No fake user named "asdf" in the screenshot. DemoKit sits on top of your real app and swaps the data for the demo.

Intercepts fetch, never your backend

DemoKit patches the client’s fetch layer and returns generated data in place of the response. Your production API never receives a demo request.

Works with your existing data fetching

DemoKit patches fetch itself, so React Query, SWR, and plain fetch need no per-library wiring.

Two fidelity levels run offline

Schema-valid and relationship-valid data generate locally, with no AI and no network call.

Open source, Apache-2.0

The whole SDK and its generators live in the repo. Self-host every line, or start on the Cloud tier.

How it compares

Mocking libraries stop at the handler

MSW and Mirage intercept requests, then hand you the job of writing the data. DemoKit generates it from your schema — and gives one account a coherent story.

Capability comparison of DemoKit, MSW, Mirage JS, and hand-rolled faker fixtures, verified against public docs in July 2026.
CapabilityDemoKitMSWMirage JSFaker fixtures
Intercepts requests at runtimeNo backend change. DemoKit patches the client's fetch layer. MSW and Mirage also cover XMLHttpRequest.SupportedSupportedSupportedNot supported
Data generated from your schemaDemoKit reads your OpenAPI spec. The others generate values, but you hand-author each model or factory.SupportedPartialPartialPartial
Relationship-valid across entitiesForeign keys resolve. Mirage's ORM keeps them in sync; MSW needs the @mswjs/data add-on; fixtures leave it to you.SupportedPartialSupportedNot supported
AI-authored narrative dataOne account whose signups, tickets, and invoices tell one story.SupportedNot supportedNot supportedNot supported
Hosted optionA managed tier for AI credits and team workspaces.SupportedNot supportedNot supportedNot supported
Open source

Extracted from a production app

DemoKit started as Kasava’s demo mode: hand-written fixture files and data hooks that broke a little more every release. We pulled the interceptor out, made it schema-aware, and open-sourced it under Apache-2.0.

Apache-2.0Self-hostableBYO Anthropic key
Pricing

The SDK is free and complete

L3 included, with your own API key. Cloud sells hosted credits, teams, and a managed dashboard.

Open source

$0

Self-hosted · BYOK · Apache-2.0

Full SDK, one React provider
L1/L2 generation, offline
L3 narrative with your own Anthropic key
Self-hosted dashboard
Community support
View on GitHub

Pro

Recommended
$29 per month

For the first sales engineer

200K AI credits a month
No key management
Team workspace, 3 seats
Managed dashboard and Postgres
Email support
Start free

Team

$99 per month

For the whole sales org

1M AI credits a month
10 seats
Shared scenario templates
Demo analytics
Email support
Start free

Enterprise adds SSO, audit logs, custom domains, and an SLA. Talk to us.

Stuff people ask

If you can’t find what you’re looking for, get in touch.

How it works

OSS vs Cloud

Other questions