Cuppr
Beer-pong tournaments live and die on the day: registrations, group stages, knockout brackets, a big screen everyone watches. Cuppr runs all of it in real time — hardened against every race condition a room full of players can trigger.

From Lovable prototype to production rewrite.
Cuppr started in 2025 as a quick Lovable prototype — back then for table football. When it needed to actually run real tournaments with real money on the line, I rewrote it from scratch: tests, row-level security, Stripe, and a realtime layer built to survive a live event.
It now covers the full lifecycle across seven phases — from draft and open registration through the group stage and knockout bracket to a completed tournament with a season ranking.
A room full of people, all writing at once.
Live tournaments are a concurrency nightmare — scores entered simultaneously, registrations racing for the last slot. The engineering is all about making that safe:
- Score entry uses optimistic locking: the client sends the timestamp it last saw, and stale writes are rejected instead of silently overwriting.
- Registration, team creation and the knockout start all run through Postgres procedures with row locks — the app layer only validates and audits.
- Realtime channels push updates to admins (2s debounce) and public viewers (3s) without hammering the database.
- One test spec runs a complete 100-team tournament end to end; 42 E2E specs and 166 unit tests guard the whole flow.
- The projector mode runs without auth for the big screen; a season ranking is computed live from a single source-of-truth procedure.
“Race-safety through database procedures — the app layer only does validation, snapshotting and audit. Payments and refunds are the single source of truth.”
Planning something similar?
I design and ship AI agent systems, data platforms and full-stack products — from first idea to production.
Get in touch