apps/demo, at
demo.policycodex.cloud / pnpm dev:demo on port 5177) and the ACME demo estate
it drives — a fully working fictional customer, ACME Corp, provisioned across Clerk,
Supabase and GitHub. Full design doc: docs/DEMO.md.
C2 slice
The console is deliberately not a second product front-end: every product interaction in a demo happens in the real app; the console only teleports the presenter to the right starting line and wields the powers a browser must not hold directly (service-role reset, GitHub App tokens).The estate at a glance
Console access control
demo-api verifies the Clerk session in-function and authorizes domain owners
only: org:domain_owner of the ACME demo org, or domain_owner of the internal
PolicyCodex org (secrets DEMO_CLERK_ORG_ID / DEMO_ADMIN_CLERK_ORG_ID). The demo
author/viewer users can sign in (shared Clerk instance — unavoidable and
required for the product-app scenarios) but every console action 403s and the UI
shows an explicit access-denied notice.
Console features
- Health grid — seed counts, canonical RFC lifecycle state, LLM model, plan, GitHub App reachability + open demo PRs, MCP server. All eight tiles green = demo-ready.
- Live actions — Open violating PR / Open compliant PR (idempotent; returns the
existing PR if already open), Reset (inline two-step confirm — no
window.confirm, which embedded browsers swallow). - Scenario cards S1–S8 — story, proof moment, click-by-click presenter script, deep links.

