Case study N° 02 · Sports
Titan Stats
Keyboard-first live stat entry and broadcast graphics for a high school football broadcast.
Sample data, runs in your browser
Send a photo, approve it, watch it go on air
- Booth box-score refresh
- 4s
- Updates in place without reloading, and shows RECONNECTING instead of going blank.
- Fed by one play log
- 10pages
- Overlay, booth box score, leaders and the public site read the same records.
- Stored twice
- 0stats
- Every number is worked out from the play log, so undo and edit always leave it right.

Why I built it
The Port Arthur Memorial Titans broadcast wanted live stats on screen, but there was only one person in the press box to log every play. Generic stat apps are slow and full of clicks, and they stop working when the stadium Wi-Fi drops.
What I built
Titan Stats lets one person log a whole game from the keyboard. Each play feeds the broadcast overlay, a live box score for the announcers, leaders pages and the public site at titanstats.app.
- Plays are typed as short commands.
C 81 18 T ⏎logs an 18-yard touchdown pass to #81. The passer comes from the pinned quarterback, and the cursor moves on as each part is filled in. - The booth box score refreshes every 4 seconds without reloading the page. If the connection drops, it says
RECONNECTINGinstead of going blank. - Social cards, QR codes and a splash image are generated automatically with resvg.
The tricky part
The only thing Titan Stats stores is the list of plays. Every stat line, team total and feed entry is recalculated from that log. Because nothing is stored twice, undoing or editing a play always leaves the numbers right. A completed pass is a single record that credits both players, so the quarterback’s and receiver’s yards can’t drift apart.
Typing a play and clicking the buttons go through exactly the same code, and a test checks that both produce identical records.
Fan photo wall
Fans scan a QR code on the stream or the stadium screen and send in a photo from their phone. Nothing goes on air until someone approves it.
- The phone shrinks the photo to 1600 px before sending it, which also removes the camera’s location data. Fans can add a name, a caption and a “Class of” year, which turns it into an alumni check-in.
- New photos wait as pending in R2 and D1. The public pages only ever read approved photos, so a pending one can’t be seen even by someone who guesses its link. The approval page sits behind Cloudflare Access, and uploads are limited per phone.
- The wall runs as an OBS browser source. Newly approved photos go up next, and “Show next” bumps one to the front. Once there are 12, the wall switches to a 2×2 grid, and its fades keep running even when the source is in the background.
- After the game, “Clear for next game” moves everything into Past games. “Delete all for good” only works on that tab, so tonight’s wall can’t be wiped by accident. Tests run the real server code against an in-memory copy of the table.
Built to work offline
During a game, the browser’s own copy of the data is the source of truth, and Cloudflare D1 just holds the published copy. A dropped connection never stops the logging.
Where it stands
It was used on real Friday-night broadcasts during the 2026 season.
Figures

- The quarterback is pinnedSo a completed pass only needs the receiver, the yards and a result.
- Typing and clicking agreeC 81 18 T ⏎ dispatches the same action as the buttons, and a test asserts the records match.
- One record, two creditsPasser and receiver yards come from the same entry, so they can never drift apart.
- The feed is the logEach card is one record. Undo pops it, and every total recomputes.



Before

Score, quarter and the current down.
After

Live game clock, down and distance, ball spot and possession, all fed from the press box by Titan Stats and /clock.
Methods
- Stack
- React 18, TypeScript, Vite, Vitest, Cloudflare Pages Functions, Cloudflare D1, Cloudflare R2, resvg.
- Data
- The demo runs in your browser on sample data; nothing is sent anywhere.
- Tests
- Vitest, including a test that typed and clicked entries produce identical records.
- Status
- Live since Sep 2026. Press box, Friday nights.