Demo data
X3 ships a seed that builds a complete, fictional workspace: a clinic with four months of visits, quiz answers, leads, ad campaigns with creatives and spend, journeys across devices, recommendations and alerts – and, optionally, an agency portfolio of further fictional clients in other industries. Everything is generated through the same code paths as real data (ingest, scoring, journey linking, ad matching, insights), so every screen and every MCP tool shows consistent numbers.
Seed
npm run seed:demo -w @3x/api # clinic, 120 days up to today
npm run seed:demo -w @3x/api -- --portfolio # plus the agency portfolio
npm run seed:demo -w @3x/api -- --fixture ux # fixed reference day (screenshots, acceptance tests)
npm run seed:demo -w @3x/api -- --days 30 --reset # rebuild the demo project from scratch| Option | Default | Meaning |
|---|---|---|
--org | klinik-weiss | Organization slug of the demo clinic |
--project | demo-klinik | Project slug |
--days | 120 | Days of history |
--portfolio | off | Also seed the fictional agency clients |
--fixture ux | off | Pin the data to the reference day; set X3_NOW to the same instant when you run the API. Refused in production. |
--reset | off | Delete and rebuild the demo project's data |
--no-migrate | off | Skip migrations before seeding |
The seed is deterministic: the same options give the same data. It runs again safely (idempotent).
Safety
- Demo projects carry
settings.demo = true. They never sync real ad accounts, never upload conversions to an ad platform and never send mail. - The seed refuses an organization that contains any non-demo project or any member who is not a demo user – it cannot mix with real data.
- Demo projects are excluded from portfolio sums of organizations that also have real projects.
Demo users
| User | Role | Sees |
|---|---|---|
demo-agentur@x3growth.io | owner | everything, including contact data |
demo-viewer@x3growth.io | viewer | numbers and leads without contact data |
demo-empfang@x3growth.io | viewer with personal-data flag | leads with contact data (front desk) |
Outside production the password is X3_SEED_PASSWORD (default demo-password-123); in production no
password is set.
Public demo login
With X3_DEMO_LOGIN=1, POST /v1/auth/demo starts a two-hour, read-only session as
X3_DEMO_USER_EMAIL (default the viewer). Every write answers 403
demo_read_only; preferences are kept in a session cookie only.
The endpoint allows 10 sessions per hour and IP.
Keeping it current
The demo.roll job (hourly, from 03:00 project time) appends the missing days – up to 14 per run – to
every demo project with the seed's generator, so the demo always ends "yesterday" without reseeding.
Days that already have visits are never touched. With X3_NOW set the job sees the fixed clock, so
fixture data stays on its reference day.
Fixed clock
X3_NOW (ISO instant, e.g. 2026-10-15T21:40:00+02:00) freezes the clock of the insights layer – data
windows, forecasts, "last week" – so screenshots and tests see the same numbers every time. It is
ignored in production (Environment).