Copascom — Live Scoreboard
Youth futsal tournament organizer with a real-time public view, Apple Sports style. The organizer sets up the tournament; the public follows everything through a link, no login required.
The challenge
In youth futsal tournaments, scores, brackets and standings live in notebooks and WhatsApp groups. Anyone who is not at the court cannot follow along, and the organizer wastes time recalculating standings and brackets by hand.
The solution
A real-time platform, Apple Sports style: the organizer sets up the tournament (categories, groups, brackets, scores) and the public follows along through a link, no login required. Each category (U-6, U-7…) is an independent tournament with its own format, bracket and final. Bracket generation, standings (CBFS/FIFA futsal standard) and winner advancement are calculated on the server, and the public home page updates on its own via Supabase Realtime.
Features
- Per-category management: straight knockout or group stage + knockout, configurable
- Automatic bracket generation with bye distribution and winner advancement
- Group stage with standings following the CBFS/FIFA futsal standard (all tiebreaker criteria)
- Event-based scoring: each goal feeds the top scorers list, a live timeline and team rosters
- Match scheduling, a "LIVE" badge and penalty shootouts in the knockout stage
- Read-only public home page that updates on its own via Supabase Realtime
What I learned
The bottleneck in an app like this is not CPU or bundle size — it's the number of round trips to the database, each one paying the full network latency. I learned to treat latency as architecture: keeping the Vercel region the same as the Supabase one (São Paulo), validating the session locally with asymmetric JWT keys (without spending a network call on every page) and recalculating the score with a trigger in the database itself. In the code, the rule is to read in Server Components, write in Server Actions and trust RLS as the last line of defense — all sensitive logic (bracket generation, score validation, standings) runs on the server, never in the browser.