docs(website): demo mode core built — DM15-DM17, MODULE_API 1.18.0 #378

Merged
whitlocktech merged 1 commits from docs/demo-mode-core into main 2026-10-23 18:56:10 -05:00
Member

Docs for RunicGateway/website#223, step 1 of website/DEMO_MODE.md §10.

Build decisions (org lead, 2026-10-23):

  • DM15: module rows go through a new optional hook, api.onDemoSeed(data, { accounts }). Core never writes a module's tables.
  • DM16: POST /auth/register is a Tier A lock, because settings are open.
  • DM17: DELETE /auth/me/sessions/:id is locked outright on a demo account. A mobile access token carries no refresh-row id, so the server cannot tell which session is the caller's own.

What changed:

  • DEMO_MODE.md

    • The settings keys that reach a Tier A lock: site_mode*, module_source_hosts, teams_voice_*, demo_*.
    • How demo accounts are recognised (fixed in core; the account row decides), and that the lock fails closed.
    • The published logins and the Use button, and the toast.
    • The seed's fixture shape, $env:, and first-run-only content.
    • There is no seeded team: Teams come from the rig's clans.
    • The §3.2 example drops the config-file POST that DM14 opened.
    • Step 1 is marked built.
  • MODULE_API.md, 1.18.0:

    • demoLocks in module.json (§2.1);
    • ctx.demoMode (§2.3);
    • api.onDemoSeed (§2.4), which must upsert because it runs on every seed.
  • BACKEND_DESIGN.md: §5.1 demo mode, and demo_state in the settings table.

  • AI-assisted: written with Claude Code (Claude Opus 5.5).

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

Docs for RunicGateway/website#223, step 1 of `website/DEMO_MODE.md` §10. **Build decisions (org lead, 2026-10-23):** - **DM15:** module rows go through a new optional hook, `api.onDemoSeed(data, { accounts })`. Core never writes a module's tables. - **DM16:** `POST /auth/register` is a Tier A lock, because settings are open. - **DM17:** `DELETE /auth/me/sessions/:id` is locked outright on a demo account. A mobile access token carries no refresh-row id, so the server cannot tell which session is the caller's own. **What changed:** - **DEMO_MODE.md** - The settings keys that reach a Tier A lock: `site_mode*`, `module_source_hosts`, `teams_voice_*`, `demo_*`. - How demo accounts are recognised (fixed in core; the account row decides), and that the lock fails closed. - The published logins and the **Use** button, and the toast. - The seed's fixture shape, `$env:`, and first-run-only content. - There is no seeded team: Teams come from the rig's clans. - The §3.2 example drops the config-file POST that DM14 opened. - Step 1 is marked built. - **MODULE_API.md**, 1.18.0: - `demoLocks` in `module.json` (§2.1); - `ctx.demoMode` (§2.3); - `api.onDemoSeed` (§2.4), which must upsert because it runs on every seed. - **BACKEND_DESIGN.md:** §5.1 demo mode, and `demo_state` in the settings table. - [x] AI-assisted: written with Claude Code (Claude Opus 5.5). 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-23 18:53:00 -05:00
- DEMO_MODE.md: DM15 (onDemoSeed), DM16 (POST /auth/register locked), DM17
  (sessions route locked outright on a demo account). It also covers the settings
  keys that reach a Tier A lock, how demo accounts are recognised, failing
  closed, the published logins, the toast, the seed's fixture shape and $env,
  and the fact that there is no seeded team (Teams come from the rig's clans).
  The §3.2 example drops the config-file POST that DM14 opened. Step 1 is
  marked built.
- MODULE_API.md: 1.18.0. demoLocks in module.json, ctx.demoMode, and
  api.onDemoSeed, which must upsert because it runs on every seed.
- BACKEND_DESIGN.md: §5.1 demo mode, and demo_state in the settings table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
whitlocktech merged commit de7775eaab into main 2026-10-23 18:56:10 -05:00
whitlocktech deleted branch docs/demo-mode-core 2026-10-23 18:56:11 -05:00
Sign in to join this conversation.
No description provided.