Dr. Sarah Chen
Statistics, form analysis and a breakdown of each part of the game.
DG Live Scores is a live scoring app for disc golf, built on Laravel 13, Livewire 4 and Reverb. One player keeps the group's scorecard on a phone, and anyone can follow the round hole by hole from a map of live rounds. Up to two AI sportscasters can call the round.
I built it so a casual round gets what a tour event gets: live scores anyone can follow, and commentators calling each hole.
Public rounds in progress are on the map at their course, with each player's score to par.
Followers see each score as the hole is saved, over websockets, with no refresh.
A pregame, a call for each hole and a wrap-up, as text with optional audio.
Save & NextStep 1The scorer saves the hole for the whole group in one request.
HoleCompletedStep 2Once every player has a score, the event queues a job, which checks the daily spend limit first.
RoundNarrativeContextStep 3The hole's results, running totals, streaks and lead changes, computed from the scorecard.
Prism::structured()Step 4Claude Sonnet writes the exchange through Prism, each line tagged with its speaker.
text-to-dialogueStep 5When audio is on, ElevenLabs voices the exchange.
CommentaryUpdatedStep 6Each status change goes out over Reverb, so the call's text is on the round page before its audio.
The prompt is built from the scorecard: each player's strokes and running total, streaks and any lead change. RoundNarrativeContext computes them from the scores. The box score, a round's other feed, reads the same class with no model call, so both feeds state the same facts.
Call length is set in code. Each hole gets an excitement level from one to five, from the events the scorer tagged on it, a close race, a lead change and the final hole. The level sets the word limit in the prompt.
public function calculateExcitementLevel(array $context): int
{
$excitement = self::EXCITEMENT_MINIMAL;
// Events boost excitement significantly
foreach ($context['player_results'] ?? [] as $player) {
$events = $player['events'] ?? [];
foreach ($events as $event) {
$excitement += match ($event) {
'Ace' => 4,
'Eagle' => 3,
'Birdie' => 1,
'Long Putt', 'Clutch Putt', 'Great Drive' => 1,
'OB', 'Water', 'Lost Disc' => 1, // Drama is exciting too
default => 0,
};
}
}
// … plus a close race, the final hole and a lead change …
return min($excitement, self::EXCITEMENT_MAXIMUM);
}
Statistics, form analysis and a breakdown of each part of the game.
A professional, articulate voice that treats disc golf like any traditional sport.
The cast: There are eight sportscasters, among them a roast master, a hype man and a deadpan AI. A round picks up to two.
| Player | Total | ± Par |
|---|---|---|
| Adam | 57 | +1 |
| Phil Mareu | 60 | +4 |
Both Phil and Adam taking bogeys on this par 3. A bit of a struggle on fifteen for the group.
Phil with a nice birdie on seventeen, keeps him at plus four heading into the final hole.
Final hole at Centennial Park! Adam's sitting at plus-one, Phil at plus-four. Everything to play for on this par 3!
And that's a wrap on Centennial Park! Adam takes it with a 57, just one over par on this beautiful 18-hole layout!
Birdies in green and bogeys in red, with totals and score to par updated as each hole is saved.
The one or two picked when the round was started.
Newest first, with the wrap-up at the top, each with a play button.
Rounds, scoring, queued jobs and broadcast events.
Score entry, the scorecard and the map page, with Mapbox GL for the map.
Websockets for live scores and the status of each call.
The admin panel: courses, rounds, sportscasters, invite requests and API costs.
Structured output for each call: a list of lines, each tagged with its speaker.
Text-to-dialogue audio, with per-line text-to-speech as the fallback.
Feature updates are in the sandbox.