Aux Battles is a free multiplayer music game: rooms, players, prompts, voting, all synced live across every connected browser. There's no game server behind it. Every client subscribes to Postgres changes through Supabase Realtime and reacts to a single phase column on the room row.
Actions are direct table writes. Host-only actions (starting a round, advancing a song) are enforced in the UI, not by row-level security, since the alternative is threading session identity through anonymous auth in a way that adds complexity without adding real protection for a free, no-login game.
The trickiest part was the Twitch bracket tournament mode: a full 64-song knockout tree lives in a single jsonb column, rooms.bracket, written with a compare-and-set sequence token (bracket_seq) so that a double-tapped winner button, or a streamer and a mod acting at the same time, becomes a no-op instead of a race condition.
Top comments (0)