ARCHE
FamiliesLive demoDocsExamplesBlogGitHub ↗
Documentation

Start

  • Getting started
  • Philosophy

Guides

  • First hour
  • Agent context
  • Verification
  • Package managers
  • Scaffold lifecycle
  • Showcase & portfolio

Walkthroughs

  • TypeScript fullstack
  • Convex product
  • Rust API & fullstack
  • Solana family
  • Customize & experiments
  • Automation (JSON/MCP)

CLI

  • Overview
  • Flags
  • Subcommands
  • Generated output

Presets

  • Preset catalog

Stack

  • TypeScript architecture
  • Convex
  • Rust
  • Solana
  • Authentication
  • Prisma store
  • tRPC

Operations

  • Deployment
  • Environment variables
  • Workers & queues
  • CI & testing
  • Scaling
  • Security
  • Troubleshooting

Reference

  • Stack links
  • Capabilities
  • This source repo
  • Code examples
← Documentation

Live proof run

What /live proves, how to run it locally, and how to harden before production.

1 min read

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.

ColumnRole
Proof ladderPersonal rung checks (localStorage progress)
Relay RunCanvas game + top-10 leaderboard strip
#relay popupFAB 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

RungLayerCheck
ShellWebPage renders
APIExpressGET /health → database: connected
ContracttRPChello query
DatastorePrismapost.list returns seeded posts
Live chat feedChatchat.list (senders redacted)
SessionAuthauth.getSession (guest OK)
Relay readChatchat.list returns messages
Game boardGamegame.leaderboard (public read)
Relay writeChatchat.verifySend (silent, no feed)
Game scoreGamegame.submitScore after sign-in
SecretAuthauth.getSecretMessage after sign-in
Challenge: archeChatUser message containing arche
Challenge: postPostspost.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_URL pointing 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=true on 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

terminal
bun dev          # web + API (see root package.json)
bun run db:migrate
bun run db:seed

Open 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:

  1. Run bun toolings/scripts/template-cleanup.ts --remove=live --yes on a generated project, or
  2. Delete apps/web/app/live, apps/web/app/(auth), and apps/web/components/live manually.

See Security for the demo endpoint table and hardening notes.

On this page

  • Relay Run
  • Footer drawer
  • What it proves
  • Requirements
  • Local development
  • vs /examples
  • Removing before production