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
- 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 derived from the log, so undo and edit are always correct.

The problem
The Port Arthur Memorial Titans broadcast needed live stats on screen, but there was one person in the press box to log every play. Generic stat apps are slow and click-heavy, and they break when the stadium Wi-Fi does.
What I built
A single-operator tool that logs a full game from the keyboard and feeds the broadcast overlay, a live box score for the broadcasters, leaders pages, and the public site at titanstats.app.
- A command language made of keystrokes.
C 81 18 T ⏎logs a completed pass to #81 for 18 yards and a touchdown. The passer is implied by the pinned QB, and focus moves on as each field resolves. - Booth box score that refreshes every 4 seconds in place without reloading, and shows
RECONNECTINGrather than going blank. - Generated graphics: social cards, QR codes and a splash image rendered with resvg.
The hard part
Records are the only stored state. Every number on screen is derived. Stat lines, team totals and the feed are all recomputed from an append-only log of records. Nothing is stored twice, so undo and edit are always correct. A completed pass is one record with two credits, so the QB’s and receiver’s yards can never drift apart.
The typed path and the click path dispatch the same reducer actions, and a test asserts that both produce identical records.
Offline first
The browser’s local data is the source of truth during a game. Cloudflare D1 is only a published copy, so a dropped connection never stops logging.
Result
Used on real Friday-night broadcasts in 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, 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.