image_reveal rounds (RoundType "quiz") now get their own "IMAGE" transition
(emerald/teal theme, 🖼️) instead of reusing the quiz one. The store derives a
roundKind (quiz | image | blindtest) from the round payload format; mode-change
detection and the custom-media folder use it (assets/transitions/image/).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- image_reveal display: larger, object-contain (whole image up to 58vh), no crop
- image prompt optional in back-office (defaults to "Qui est-ce ?"), overridable
- mixed mode reworked: select "Mixte" then toggle sub-modes (Quiz/Images/
Blindtest). Blindtest sub-mode locked under 3 players; mixed itself no longer
needs 3. Server quiz pool formats derived from gameType + mixedModes.
shared: MixMode + RoomSettings.mixedModes (default quiz+image).
- DB: prompt uniqueness is now a partial index (excludes image_reveal) + unique
index on image_url; lets many images share the generic prompt, dedup by URL.
- seed: db:seed:images pulls Pokémon (PokéAPI) as image_reveal questions with
official artwork (remote URL) + FR/EN accepted answers; idempotent by image_url.
Verified: migration applied, Pokémon seed inserts FR+EN, image mode serves only
image_reveal, all checks green (23 tests).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The upload route only relied on the startup mkdir; if the dir is removed while
the server runs, writes failed with ENOENT. Now mkdir -p before each write.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- image_reveal becomes its own game mode: GameType gains "image"; the quiz
pool is filtered by allowed formats derived from gameType (image →
image_reveal only, quiz → mcq/truefalse/free, mixed → all). loadQuizPool
takes a formats list; pool fallback respects it.
- lobby settings reworked into a refined "Réglages" card: 4 mode tiles
(icon + label, locked <3 players for blindtest/mixed), question count as a
stepper, blindtest config grouped; dynamic label for image mode + hint.
- admin: real upload button (hidden input + styled Button with Upload icon)
instead of the bare file input.
- app title set to "NerdWare …" in index.html (+ lang fr, description).
Verified e2e: image mode serves only image_reveal questions (with imageUrl).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Server:
- quiz-round handles image_reveal like a text-answer format (tolerant match
on acceptedAnswers), exposing imageUrl in the round payload; degressive
scoring comes for free from the existing speed bonus (earlier = blurrier =
more points)
- repo includes image_reveal in the pool (requires imageUrl + acceptedAnswers)
- back-office: image upload (@fastify/multipart) saved to UPLOADS_DIR and
served statically on /uploads (@fastify/static); create supports image_reveal
- env: UPLOADS_DIR; gitignore uploads/
Client:
- admin form: "Image à deviner" — upload + preview + accepted answers
- in-game: ImageReveal shows the image with a time-cadenced decreasing blur
(synced via server timestamps) + text input; reveal shows the clear image
and the answer
shared: QuizQuestionPayload.imageUrl
Verified against real server+DB: upload (url), static serve (200), create
(201), validation (400).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- lib/sound: plays src/assets/sounds/victory.{mp3,ogg,wav} if present,
auto-detected via import.meta.glob; no-op when absent
- played alongside the confetti when the end screen appears
- README documenting where to drop the file
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- RoomPage animates between coarse phases (lobby ↔ game ↔ end) with a fade/
slide (AnimatePresence, mode wait). Keyed by phase, not status, so the
YouTube player survives in_round → reveal → scores.
- PlayerCards fires a small confetti burst when a player overtakes to take
the lead during the game.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
canvas-confetti burst (center pop + side jets) fired once when the game-end
screen appears.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- "Ajouter" button shows the SiYoutube logo
- each submitted track card gets a YouTube open link (verify the pasted song)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Add @icons-pack/react-simple-icons for brand logos lucide doesn't provide.
End-screen track recap now uses official SiSpotify (green) and SiYoutube (red)
icons instead of generic ones. Lucide stays for UI icons.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
From the blindtest tracks revealed at game end:
- per-track Spotify search link (green button) built from "title artist"
- "Playlist" button copies the whole tracklist ("title — artist" per line)
to the clipboard for pasting into Spotify
- YouTube open link kept alongside
Pure client-side, derived from the tracks already sent in game:end.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- blindtest/mixed: the host can't start until every connected player has
submitted their track quota — client disables the button with a hint, and
game:start rejects with TRACKS_PENDING (authoritative)
- tracks-per-player is now a number stepper (− / + buttons + free typing,
clamped 1..10) instead of fixed 1/2/3 buttons
Verified e2e: start rejected while a player hasn't submitted, accepted once all did.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- game:end now carries the played blindtest tracks (title/artist/youtubeId/
url/submittedByName); the end screen lists them as cards with a YouTube
open link so players can recover/export the songs
- who_added vote no longer lets you pick yourself (filtered out)
- home page: animated halo, floating geek emojis, springy gradient title,
hover/tap on buttons (Framer Motion) + Lucide icons
- lobby settings get Lucide icons (game type, quiz, blindtest mode, tracks,
start)
Verified e2e: game:end includes the track list with links.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Restructure onboarding (option B):
- home is just Create / Join (code) — no name field
- name is chosen in the room: room:create/join no longer require a name;
new player:setName event. Nameless players are hidden from the snapshot
(players/scores/submissions) and excluded from eligible voters and the
3-player blindtest gate until they pick a pseudo.
- PseudoScreen with live DiceBear avatar preview gates RoomPage until set
- /join/:code auto-joins then redirects to the room (seamless invite links)
- RoomCode gains a "copier le lien" button (origin/join/CODE)
Verified e2e: nameless players excluded from the room until setName.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Return to lobby (replay without recreating the room):
- lobby:return (host): reset to lobby, scores to 0, keep players + tracks
- client: end screen has "Rejouer" (host) + "Quitter"; store clears transient
game state whenever the room goes back to lobby
Contributor has nothing to input:
- round:start carries a private `mine: true` to the contributor only (via
RoundStart.secretPlayerId targeted emit); they're excluded from eligible
voters. Client shows a "fais-les se tromper" card instead of the vote form.
Editable track submission:
- submitTrack ack returns trackId + youtubeId; new blindtest:removeTrack
- lobby shows submitted tracks as cards (YouTube thumbnail + title) with delete
Verified e2e (3 players): add/remove, private mine flag, return-to-lobby reset.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Default game type stays "mixed", but while fewer than 3 players are connected
the lobby renders the quiz config only (Quiz highlighted, Mixed/Blindtest
disabled) instead of showing blindtest settings to a lone host. It switches
back to the stored type automatically once 3 players are present — no manual
click needed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Revert the DJ change: the DJ is again a neutral player (never the track's
contributor), broadcast to all and counted as an eligible voter (votes blind).
The contributor is a normal voter whose vote never scores on their own track;
they only earn the who_added/mixed misdirection bonus (+50 per wrong guess).
- engine: restore single round:start broadcast + DJ-included eligible voters
- blindtest-round: restore neutral pickDj; contributor may vote (ignored in
scoring) so the round can still end on "all voted"
- client: DJ controls + everyone (DJ included) votes; reveal message simplified
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- DJ is now the track's contributor (controls their own song); their identity
is sent only to them so "who added" stays non-trivial. The contributor
doesn't vote and is excluded from the eligible-voters count.
- Scoring: the contributor earns nothing except in who_added/mixed, where they
get a misdirection bonus (50) per player who guesses the wrong adder.
- Blindtest (and mixed) require >= 3 connected players: lobby disables the
options with a hint, and game:start rejects with NEED_THREE.
- Player card is now 16:9 and full width — the video banner shows at reveal;
DJ gets a seek bar (current/duration) to jump anywhere, plus play/pause/restart.
- Mixed game order is shuffled (no predictable quiz/blindtest alternation).
Verified e2e (3 players): guard rejects at 2, DJ id hidden from others,
misdirection scoring correct. 23 tests pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Mixed mode (default):
- gameType is now mixed | quiz | blindtest, default "mixed"; the lobby
interleaves quiz + blindtest rounds so modes alternate
- lobby reworked: 3-way game-type switch, quiz count and/or blindtest config
+ track submission shown per selected type
Free-text quiz questions:
- quiz supports the `free` format (e.g. maths) alongside mcq/truefalse:
payload without choices, {text} vote, tolerant matching on acceptedAnswers
- shared QuizQuestionPayload.choices optional; reveal truth carries answer
- match util moved to game/match.ts (shared by quiz + blindtest)
- repo/seed include free + acceptedAnswers; in-code bank gains free questions
- client quiz view renders a text input for free questions
Mode-aware transitions:
- RoundTransition themed per mode (colors/label/emoji); announces the mode
on change (quiz <-> blindtest), lighter teaser within the same mode
- custom media buckets per mode: assets/transitions/{quiz,blindtest}/ + shared
- store tracks roundModeChanged
Verified e2e: mixed game alternates quiz/blindtest to completion; free-text
scoring covered by tests (22 pass).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- 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>
- RoundTransition overlay: fullscreen colored wipe-in, spinning sunburst,
big bouncing "QUESTION N" + "PRÊT ?!", then wipe-out (Framer Motion)
- store: roundKey counter incremented on round:start
- rendered at RoomPage, keyed by roundKey so it plays once per round
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- GameEndView: top-3 podium — 2nd left, champion center (taller), 3rd right,
with gold/silver/bronze pedestals, staggered rise-in (climax on the champion),
crown + pulsing gold glow kept on #1; ranks 4+ listed below
- bigger avatars where they read too small: lobby (size-7→11) and in-game
player cards (size-9→14, slightly wider cards)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Self-hosted over the HTTP API: no runtime dependency on api.dicebear.com,
works offline/LAN, and no player pseudo leaks to a third party.
- @dicebear/core@10 + @dicebear/styles@10 (lorelei.json), CC0 1.0
- Avatar builds a data URI locally (new Style/Avatar), memoized per seed
- same component API (seed/className) → no call-site changes
- enable resolveJsonModule for the style import
Cost: ~64 kB gzip added to the bundle — acceptable for a self-hosted game.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Avatar component using DiceBear 9.x lorelei, seeded by the player name
(stable, recognizable across screens)
- shown in the lobby list, the in-game player cards (gold ring on leader),
and the final leaderboard (large on the winner, small on runners-up)
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>
- dedicated winner card: gold border, gold gradient, pulsing gold glow,
spring scale-in, and a Crown that drops & bounces in (Framer Motion)
- champion label + big gold score; runners-up listed below from rank 2
- drop the generic Scoreboard component (now unused)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- store: boomKey counter + boom() action
- Countdown fires boom() once when it reaches 0 (timer expiry only)
- Boom component (portal to body) plays a fullscreen white flash + giant 💥
- rendered at RoomPage level, keyed by boomKey so it plays fully (independent
of the countdown unmounting on reveal) and replays each round
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
- Countdown: under 10s it ramps into a "bomb" — white→red color and an
escalating scale/wiggle pulse (faster & wider as it nears 0) via Framer Motion
- RoomCode: click-to-copy the room code with visual feedback
- PlayerCards: always-on score HUD during the game (cards per player,
animated reorder, crown on the leader) so scores are tracked continuously
instead of only appearing at reveal
- quiz view: drop the reveal-only scoreboard (now covered by PlayerCards)
- add framer-motion dependency
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>