https://producingtechnology.com/65-apps/mohansaksham_26171_15200369_acetracker.html
AceTracker is a tennis "live match intelligence" dashboard that
fetches a hard-coded JSON file
(mohansaksham_26171_14904082_sm985.json) and renders it as a
broadcast-style scoreboard. The JSON shape is domain-specific —
tournament, match, players[],
score (with sets and currentGame),
statistics keyed by player ID, headToHead, and
liveOdds.
The UI includes:
mockLiveOdds loop that jitters the win probability by
±2% every 2.8 seconds to simulate live movement.
mockLiveOdds is literally
Math.random() jitter around the fetched base number, so the
ticking clock feels real but the data is static. That's stylish but
deceptive on a screen that flashes LIVE.
players[] are
ever used. Doubles matches and larger rosters would silently be ignored.
stats[id1]
or headToHead.lastMeeting), the render function throws a
TypeError that bypasses the showError
path, leaving the "Loading match data…" placeholder on screen.
w1 /
w2) and there is no style for a set still in progress — an
unwon set renders with default styling regardless.
attendance of 0 displays as
"Fans 0", and a missing seeding just shows "SEED " with
nothing after it.
setInterval odds timer keeps running when the tab is
backgrounded (no visibilitychange guard).
Turn AceTracker from a one-match demo into a real-feeling live dashboard with honest data semantics. Specifically:
- Replace the hard-coded
JSON_URLwith a URL bar (defaulting to the current value) plus a match-picker dropdown populated from an index JSON of available matches. Reflect the active match in?match=so links are shareable.- Either make "Win probability" actually update by re-fetching the JSON on a polling interval, or rename it to "Model estimate" and drop the animated clock so the UI doesn't imply realtime data it doesn't have.
- Wrap
render()in atry/catchthat routes failures throughshowError, and add a small "validation report" panel in dev mode that lists which JSON fields were missing.- Support doubles: iterate all players, render two names per side, and key stats by a side identifier instead of by player ID.
- Add a third
.set-boxstate for in-progress sets (dashed border, muted score) and a visible "— yet to start" for future sets.- Pause the odds
setIntervalondocument.visibilityState === 'hidden'and resume on visible.- Hide the "Fans" and "SEED" lines entirely when those fields are absent rather than rendering blank artifacts.
- Preserve the existing visual design — court green, yellow ball accent, pulsing LIVE pill — and keep it single-file, no external libraries beyond the Google Fonts already loaded.