joshuaandClaude Opus 5.5 17eb76d036 Phase 4: scoreboard page, public API and realtime refresh
- buildScoreboardPayload is the single place deciding what the public may
  see: visible, frozen (snapshot scores, live current game), hidden (no
  scores, alphabetical) and reveal (unrevealed teams carry no score/order).
- GET /api/public/scoreboard/[token] validates the token, then loads the
  event with the service client in one parallel round trip.
- notify() pings sb/admin/game channels over Realtime's REST endpoint with
  no data; useRefreshChannel refetches immediately on a ping, throttles
  bursts, and falls back to a 10s poll, focus and reconnect.
- /s/[token]: FLIP rank animation, count-up totals, reduced motion,
  fullscreen, cursor hide and a connection indicator.
- Admin setup actions now notify, so renames and reorders show up live.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-03 14:19:03 +02:00

Game Night Live — build pack

A spec pack for Claude Code. It builds a live scoring app for youth game nights: an admin control room, a projector scoreboard, and per-game judge links.

What's in here

File What it's for
CLAUDE.md Rules Claude Code reads automatically every session
docs/KICKOFF_PROMPT.md The first message you paste into Claude Code
docs/PRD.md Features, roles, user flows
docs/ARCHITECTURE.md Stack, routes, realtime, security model
docs/DATA_MODEL.md Tables explained
docs/SCORING.md Exact scoring math (judges, averages, placement points, bonuses)
docs/UI.md Screens + design direction
docs/BUILD_PLAN.md Phased tasks with acceptance criteria
supabase/migrations/0001_init.sql Starting schema + RLS
.env.example Env vars you'll need

Setup (≈15 min, before you open Claude Code)

  1. Supabase — create a free project at supabase.com.
    • Settings → API: copy the Project URL, anon key, and service_role key.
    • Authentication → Providers: make sure Email is on (magic link is fine).
  2. Vercel — free account, connect GitHub (for deploy at the end).
  3. Node — install current LTS. Check with node -v.
  4. Unzip this folder somewhere, git init, open it in WebStorm.
  5. Copy .env.example → .env.local and paste in your Supabase values + your admin email.

Running Claude Code in WebStorm

  • Install the Claude Code plugin from JetBrains Marketplace (or just run claude in WebStorm's terminal from the project root).
  • Open docs/KICKOFF_PROMPT.md, paste its contents into Claude Code.
  • Let it go phase by phase. After each phase: run it, click around, commit, then say "next phase".

Tips

  • Keep docs/ as the source of truth. If you change your mind on a feature, edit the doc first, then tell Claude Code "I updated PRD.md section X, implement it".
  • Test the scoreboard on the actual projector PC + one judge on a phone before game night. Wi-Fi at church is the #1 thing that'll bite you.
S
Description
No description provided
Readme
499 KiB
Languages
TypeScript 93.5%
PLpgSQL 4.3%
JavaScript 1.6%
CSS 0.6%