05
Multiplayer on a free tier

ReIN Bot

Guess the anime from its opening. 2–8 players, 20-second clips, no accounts — running entirely on free tiers.

PL/pgSQLJavaScript multiplayerrealtimesupabaseanime
click to turn
One round

A 20-second round, replayed. Guesses are graded server-side; the client never holds the answer.

Trust boundary
CLIENT CAN READ CLIENT CANNOT READ browserstatic HTML + vanilla JSno supabase-jsfetch() only guess room4-char codename + connectionno account postgresgrading RPC — PL/pgSQLquestion bankaccepted aliasesno anon grant storageclip named by UUIDmetadata stripped github actionsffmpeg · 20s cut480p VP9 + Opus~5.5 GB source reveal only after round ends

Everything to the right of the line is unreadable by the client. That placement is the entire security model.

Answer matching — four tiers, PL/pgSQL
normalise both sides
  case · punctuation · long vowels · "season 2" ≡ "2nd season"

then match in tiers
  1  exact
  2  near             bounded Levenshtein
  3  season-lenient
  4  prefix

all correct tiers score the same;
the tier is only reveal flavour.

Biased deliberately toward false negatives — wrongly rejecting a right answer is a smaller sin than accepting a wrong one.

Clips are curated in CI, not at request time

A GitHub Actions workflow reads a manifest of credit-free openings, pulls each from AnimeThemes, cuts 20 seconds, re-encodes to 480p VP9 + Opus, strips every scrap of container metadata, names the file by a deterministic UUID, and uploads it.

It runs on a free Ubuntu runner because the source material is ~5.5 GB and VP9 encoding is slow. None of it touches a developer machine.

The audit

A supervisory audit of the finished schema found and closed two independent paths by which a client could read the answer, four correctness bugs, and three places where the curation pipeline’s spoiler filter failed open.

The lesson written up in PROGRESS.md is the uncomfortable one: execution testing passed because the tests confirmed what the schema’s comments claimed, and the comments had drifted.

Curated content
46anime
136openings
20sper clip
4char room code

Every one verified credit-free, unsubbed, non-spoiler and SFW from the source API rather than assumed.

Outcome

Rein-Bot

Chapter 06
FTC

Pick a universe, pick a deck, call the strongest stat on your top card. Two to four players, live.

continue
05 — ReIN Bot
scroll · drag · ← →