The Live demo route (/live) is a bounded sandbox on arche.dev and in generated fullstack scaffolds. It runs real checks against your API—health, tRPC, Prisma reads, session probes, Relay Run mini-game scores, live chat, posts, and optional challenges—not illustrative snippets.
Relay Run
The center column is a Flappy-style canvas game with a persisted leaderboard (game.submitScore / game.leaderboard). Guests can play locally; signed-in users save high scores to the database.
| Column | Role |
|---|---|
| Proof ladder | Personal rung checks (localStorage progress) |
| Relay Run | Canvas game + top-10 leaderboard strip |
| #relay popup | FAB opens room chat (SSE-backed feed) |
Realtime uses one GET /api/live/stream connection (SSE) for chat invalidation. Polling is fallback only when the stream drops.
Relay Lattice (5×5 clash grid) is deprecated on /live. The round engine is opt-in via LATTICE_ROUND_ENGINE=true on a single API host if you still need lattice APIs for backwards compatibility.
Footer drawer
Posts and You (sign-in) live in a collapsible footer row so the game stays focal.
What it proves
| Rung | Layer | Check |
|---|---|---|
| Shell | Web | Page renders |
| API | Express | GET /health → database: connected |
| Contract | tRPC | hello query |
| Datastore | Prisma | post.list returns seeded posts |
| Live chat feed | Chat | chat.list (senders redacted) |
| Session | Auth | auth.getSession (guest OK) |
| Relay read | Chat | chat.list returns messages |
| Game board | Game | game.leaderboard (public read) |
| Relay write | Chat | chat.verifySend (silent, no feed) |
| Game score | Game | game.submitScore after sign-in |
| Secret | Auth | auth.getSecretMessage after sign-in |
| Challenge: arche | Chat | User message containing arche |
| Challenge: post | Posts | post.create draft after sign-in |
Proof-run and smoke-test messages are filtered from the public chat feed (kind: proof, smoke+ test users).
Progress is stored in localStorage (arche:proof-run:v1) so repeat visits remember completed rungs. Motion respects prefers-reduced-motion.
Requirements
- Web:
NEXT_PUBLIC_API_URLpointing at your API origin - API: migrated database and seed data (
bun run db:seed) - Auth: Better Auth configured with email/password for demo sign-in
- Marketing demo:
DEMO_AUTO_SIGN_IN=trueon the API (or local dev) so sign-up does not require a second sign-in step
If the API is unreachable, the page shows an honest offline state—no fake green checks.
Local development
bun dev # web + API (see root package.json)
bun run db:migrate
bun run db:seedOpen http://localhost:3000/live. Use the You tab to sign in and unlock write access and challenges. Open #relay (bottom-right) to chat.
Generated scaffolds include the same module under apps/web/app/live/ with CSS-only styling (no Tailwind required).
vs /examples
/examples— static code snippets from the registry; no network calls./live— live network checks against a running API; chat and posts are demo-only and public-read.
Removing before production
The live demo is for evaluation and local onboarding. Before shipping a product surface:
- Run
bun toolings/scripts/template-cleanup.ts --remove=live --yeson a generated project, or - Delete
apps/web/app/live,apps/web/app/(auth), andapps/web/components/livemanually.
See Security for the demo endpoint table and hardening notes.