- Drizzle (postgres-js) setup: schema (quiz_category, quiz_question,
quiz_played, game_history), client (nullable — no DATABASE_URL → null),
drizzle.config, initial migration, migrate script
- Open Trivia DB seed: curated geek categories, mcq + truefalse, base64
decode (incl. type/difficulty), 1 req/5s rate limit, idempotent
(prompt unique); also seeds the FR in-code bank as source 'manual'
- quiz wired to the DB: per-room pool preloaded at game start (loadQuizPool
excludes already-played), records quiz_played for cross-session
anti-repeat; falls back to the in-code bank when no DB
- docker-compose for local Postgres; db:* scripts; DATABASE_URL in env
Roadmap V1 step 5. Verified against a real Postgres: migrate + seed (270
OpenTDB + 10 manual), DB-backed game serves OpenTDB questions and fills
quiz_played; no-DB fallback still serves the in-code bank.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Server (option 2 — don't eat answer time):
- engine: leadMs prep delay (default 1600ms) before the clock starts; the
round timer now fires at lead + duration, and scoring uses the post-lead
start so the speed bonus spans the full answer window
- shared: round:start carries startsAt (answers begin) alongside endsAt
- engine test passes leadMs:0
Client:
- Countdown shows the full duration (no ticking) until startsAt, then counts
down — so the WarioWare transition plays in full without stealing time
- store/ActiveRound carry startsAt
Custom transition media:
- RoundTransition auto-loads any gif/webp/apng/png/avif dropped in
src/assets/transitions/ (import.meta.glob), plays one at random per round,
falls back to the Framer animation when none are present
- README documenting how to add animations
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- voteAck now carries `voted` (playerIds who validated) — never their answer,
so no leak; the count/total stay for the progress text
- PlayerCards show a green "Prêt" check for players who answered and a
pulsing "en attente" dot for those who haven't, during in_round only
- score stays visible on the cards alongside the status
- engine test updated for the new voteAck shape
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>