Production static site for the Signal Trials puzzle event.
- Next.js static export.
- Convex for live backend state and admin controls.
- GitHub Pages for free public hosting.
Prerequisites:
- Node.js
- pnpm
Install:
pnpm installRun locally:
pnpm run dev pnpm run check
pnpm run buildBackend:
$env:CONVEX_DEPLOYMENT='prod:proper-goshawk-251'; pnpm exec convex deploy --typecheck disablePause or resume the live event:
$env:CONVEX_DEPLOYMENT='prod:proper-goshawk-251'; pnpm exec convex env set MAINTENANCE_MODE 1
$env:CONVEX_DEPLOYMENT='prod:proper-goshawk-251'; pnpm exec convex env set MAINTENANCE_MODE 0GitHub Pages:
- The repo is public and the workflow lives in
.github/workflows/pages.yml. - Push to
mainto publish. - Public URL:
https://foces-core.github.io/prompt-paradox-2-/
- The public site is a static export hosted on GitHub Pages.
- The live event state, answer validation, hints, leaderboard, and admin actions still run through the Convex backend.
- Set
MAINTENANCE_MODE=1in Convex when you want to pause the event without taking the site down.
- Admin auth is controlled by
ADMIN_KEYin Convex production env. - Set it in Convex production:
$env:CONVEX_DEPLOYMENT='prod:proper-goshawk-251'; sfw pnpm exec convex env set ADMIN_KEY "<your-admin-key>"- The app’s admin panel uses this key to pause/resume the event and select the winning team.
src/components/GameShell.tsxdrives the UI and admin controls.src/lib/game.tscontains public level metadata only.convex/answers.tsstores canonical answers and normalization rules.convex/game.tshandles registration, validation, hints, leaderboard sorting, pause/resume, and winner selection.MAINTENANCE_MODE=1keeps the backend alive but blocks live event usage.
- Level 1 accepts only the binary encoding of
Central Processing Unit. - Level 5 proceeds without admin approval in the current implementation.
- The public site is static; live game state comes from Convex.
- Use the Rust-based
rtkwrapper for git inspection commands such asgit diffwhen it is available.
- This repo uses Convex as its backend. When working on Convex code, always read
convex/_generated/ai/guidelines.mdbefore making changes — it contains project-specific rules for Convex functions and AI agent usage. - Convex agent skills for common tasks can be installed with
npx convex ai-files install.
- Use
pnpmby default for JavaScript/TypeScript package management: preferpnpm install,pnpm add,pnpm run <script>, andpnpm dlx. - When available, wrap networked package/tool commands with the
sfwwrapper (example:sfw pnpm install) to respect local firewall policies.
- Place nine images (PNG recommended) into
public/puzzles/level3/. One image should be the real scannable QR encoding the passphrase (default behaviour expectsreal.pngor mark the entry inmanifest.jsonwith"real": true). - A sample
manifest.jsonis included atpublic/puzzles/level3/manifest.json. Each manifest entry may be a string filename or an object with{ file, real?, answer? }. - Gallery behaviour:
- Images are shuffled deterministically per participant ID (so layout changes per participant but is stable for that participant).
- Only one card may be flipped/open at a time.
- Participants scan the flipped image using their phone camera; there is no in-app scan button.
- If no manifest or assets exist, the UI falls back to generated placeholder visuals so the grid remains functional.
PowerShell quick copy example (from Downloads\img into the workspace):
# from within your user Downloads folder
Copy-Item -Path "$env:USERPROFILE\Downloads\img\*" -Destination "$PWD\public\puzzles\level3\" -Recurse- Per-folder READMEs (for example
public/puzzles/level3/README.md) have been consolidated into this top-level README to centralize project notes.
- Recent undocumented architectural changes have been recorded to
/memories/repo/architecture.md. See that file for a precise change log (gloss: GlitchGallery refactor, seeded shuffle, manifest handling, placeholder fallback, removal of in-app scan button, and README consolidation).