docs(website): design demo mode for demo.runicgateway.com #377

Merged
whitlocktech merged 4 commits from docs/website-demo-mode into main 2026-10-23 18:23:14 -05:00
Member

The design for RunicGateway/website#222, fully decided on 2026-10-23 (DM1-DM13). No code yet; it is ready to build per §10.

Decisions (§9):

  • DM1: the module declares its locked routes in module.json as demoLocks (a MODULE_API minor bump).
  • DM2 / DM13: only the settings stay open. The rest of Tier A is locked.
  • DM3: permissions, NPCs and events start from a demo default set and can be changed through the site. The rig is reset every cycle through Pterodactyl.
  • DM4: content is open, uploads are locked hard, the contact form is locked, and the site is noindex.
  • DM5: the Oxide rig becomes the demo's; a new Oxide server is spun up for walks.
  • DM6: demo-player gets a stand-in Steam link.
  • DM7: the wipe runs every 2 hours.
  • DM8: the files live in website.
  • DM9 / DM12: "latest" means the latest Rust bundle for the rig's plugins and sidecar, the newest Module-Rust release on the same protocol, and the website's main image. If no module release matches the new bundle yet, the wipe keeps the previous set and warns.
  • DM10: every lock is at the server route level, never the UI.
  • DM11: console-command steps run on the demo except a deny list (§3.4):
    • Denied: quit/restart, oxide.unload/oxide.reload (any argument), rcon.*, fps.limit, server.tickrate.
    • Matching: on the normalised first word, with global. stripped and o. mapped to oxide..
    • Enforced by the module: when the event or reward is saved, and again when the step runs, behind a new ctx.demoMode.

How the design works:

  • Rig reset (§7.1, §7.2). A fresh site's first sync imports what is on the rig (D198 for permissions, D244 for NPCs). So the wipe restores the rig first, from a demo-baseline.tar.gz through the Pterodactyl client API, and then wipes and seeds the site.
  • Versions (§7.5). Module-Rust's install manifest gains a protocol field. Core's installer reads only the fields it names, so it ignores the new one.

Set up by the org lead:

  • Done: the Pterodactyl subuser (rust-oxide only) and the PTERODACTYL_CLIENT_KEY secret.

  • In progress: DNS and HTTPS through an external reverse proxy.

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

🤖 Generated with Claude Code

https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY

The design for RunicGateway/website#222, **fully decided** on 2026-10-23 (DM1-DM13). No code yet; it is ready to build per §10. **Decisions (§9):** - **DM1:** the module declares its locked routes in `module.json` as `demoLocks` (a `MODULE_API` minor bump). - **DM2 / DM13:** only the settings stay open. The rest of Tier A is locked. - **DM3:** permissions, NPCs and events start from a demo default set and can be changed through the site. The rig is reset every cycle through Pterodactyl. - **DM4:** content is open, **uploads are locked hard**, the contact form is locked, and the site is `noindex`. - **DM5:** the Oxide rig becomes the demo's; a new Oxide server is spun up for walks. - **DM6:** `demo-player` gets a stand-in Steam link. - **DM7:** the wipe runs every 2 hours. - **DM8:** the files live in `website`. - **DM9 / DM12:** "latest" means the latest **Rust bundle** for the rig's plugins and sidecar, the newest Module-Rust release on the **same protocol**, and the website's `main` image. If no module release matches the new bundle yet, the wipe keeps the previous set and warns. - **DM10:** every lock is at the **server route level**, never the UI. - **DM11:** console-command steps run on the demo except a **deny list** (§3.4): - **Denied:** `quit`/`restart`, `oxide.unload`/`oxide.reload` (any argument), `rcon.*`, `fps.limit`, `server.tickrate`. - **Matching:** on the normalised first word, with `global.` stripped and `o.` mapped to `oxide.`. - **Enforced by the module:** when the event or reward is saved, and again when the step runs, behind a new `ctx.demoMode`. **How the design works:** - **Rig reset (§7.1, §7.2).** A fresh site's first sync *imports* what is on the rig (D198 for permissions, D244 for NPCs). So the wipe restores the rig first, from a `demo-baseline.tar.gz` through the Pterodactyl client API, and then wipes and seeds the site. - **Versions (§7.5).** Module-Rust's install manifest gains a `protocol` field. Core's installer reads only the fields it names, so it ignores the new one. **Set up by the org lead:** - **Done:** the Pterodactyl subuser (`rust-oxide` only) and the `PTERODACTYL_CLIENT_KEY` secret. - **In progress:** DNS and HTTPS through an external reverse proxy. - [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 17:44:09 -05:00
The design for website#222, before any code: one DEMO_MODE flag on the
normal image that locks destructive writes with a 403 DEMO_LOCKED, four
published static logins, no outbound mail/push/Discord, a banner with the
next reset time, and a scheduled wipe on the demo-site runner (drop the
volumes, redeploy, seed accounts + the rig link + content).

Tier A locks are listed route by route. Nine questions for the org lead
(module lock declaration, the rig, visitor content, rig sharing with
walks, the stand-in Steam link, cadence, where the files live, version).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-23 17:57:13 -05:00
The org lead's answers of 2026-10-23: demoLocks in module.json, settings
open, the rig open but reset each cycle through Pterodactyl, content open
with uploads locked hard, the Oxide rig as the demo's, a stand-in Steam
link, every 2 hours, files in website/, latest versions, and every lock at
the server route level.

Adds the rig reset (§7.1-7.2): the site's first sync imports what is on
the rig (D198, D244), so the rig is restored from a baseline archive
before the site relinks, and that first import is the reset. Adds the
hard upload rule (any multipart body refused). Three follow-ups: F1
console-command steps, F2 "latest" across the bundle, F3 reading of DM2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-23 18:09:22 -05:00
DM11: console-command steps keep running on the demo except a deny list
(quit/restart, oxide.unload/reload, rcon.*, fps.limit, server.tickrate),
matched on the normalised first word (global. stripped, o. mapped to
oxide.) and enforced by the module at save and at run behind a new
ctx.demoMode.

DM12: "latest" follows the Rust bundle for the rig's plugins and sidecar,
the newest Module-Rust release on the same protocol (a new protocol field
in its install manifest, which core's installer ignores), and the website
main image. If nothing matches yet, the wipe keeps the previous set.

DM13: only settings stay open. The org lead created the Pterodactyl
subuser and added PTERODACTYL_CLIENT_KEY.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E14m6SuuY6i1vASFeGDBeY
wtclaude added 1 commit 2026-10-23 18:15:18 -05:00
Visitors may read and change every plugin config except the bridge's: the
editor's save reloads through the bridge (with rollback, D178/D179), not
the console, and the wipe restores oxide/config. The RunicGateway plugin's
files are refused for reading as well as writing and left out of the file
list, because they hold credentials for talking to the sidecar directly.

Because the editor masks secret fields only in the form today, the demo
also redacts flagged values server-side, makes them read-only, refuses
raw-JSON saves, and leaves the sidecar URL out of the Servers admin view.

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