DG Live Scores

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.

The DG Live Scores map of the upper Midwest, with a marker on each course that has rounds. A panel for Indian Creek in Cedar Rapids, Iowa lists two rounds in progress, each with its players and their scores to par.

I built it so a casual round gets what a tour event gets: live scores anyone can follow, and commentators calling each hole.

A map of live rounds

Public rounds in progress are on the map at their course, with each player's score to par.

A scorecard that updates live

Followers see each score as the hole is saved, over websockets, with no refresh.

Sportscasters on each hole

A pregame, a call for each hole and a wrap-up, as text with optional audio.

How a call is made

  1. Save & NextStep 1

    Hole saved

    The scorer saves the hole for the whole group in one request.

  2. HoleCompletedStep 2

    Queued job

    Once every player has a score, the event queues a job, which checks the daily spend limit first.

  3. RoundNarrativeContextStep 3

    Round context

    The hole's results, running totals, streaks and lead changes, computed from the scorecard.

  4. Prism::structured()Step 4

    Structured output

    Claude Sonnet writes the exchange through Prism, each line tagged with its speaker.

  5. text-to-dialogueStep 5

    Audio

    When audio is on, ElevenLabs voices the exchange.

  6. CommentaryUpdatedStep 6

    Broadcast

    Each status change goes out over Reverb, so the call's text is on the round page before its audio.

What the model is given

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.

app/Services/CommentaryService.phpPHP
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);
}

The sportscasters

Dr. Sarah Chen

Technical & Analytical

Statistics, form analysis and a breakdown of each part of the game.

David Sterling

Classic Balanced Sports Commentary

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.

Centennial Park · Final · Par 56
PlayerTotal± Par
Adam57+1
Phil Mareu60+4
  • Hole 15Dr. Sarah Chen & David Sterling

    Both Phil and Adam taking bogeys on this par 3. A bit of a struggle on fifteen for the group.

  • Hole 17Dr. Sarah Chen & David Sterling

    Phil with a nice birdie on seventeen, keeps him at plus four heading into the final hole.

  • Hole 18Dr. Sarah Chen & David Sterling

    Final hole at Centennial Park! Adam's sitting at plus-one, Phil at plus-four. Everything to play for on this par 3!

  • Wrap-upDr. Sarah Chen & David Sterling

    And that's a wrap on Centennial Park! Adam takes it with a 57, just one over par on this beautiful 18-hole layout!

The round page

A finished round: the scorecard for Phil and Adam, the two sportscasters, and the per-hole commentary list
  1. The scorecard

    Birdies in green and bogeys in red, with totals and score to par updated as each hole is saved.

  2. The round's sportscasters

    The one or two picked when the round was started.

  3. A call for each hole

    Newest first, with the wrap-up at the top, each with a play button.

Stack

Laravel 13

Rounds, scoring, queued jobs and broadcast events.

Livewire 4

Score entry, the scorecard and the map page, with Mapbox GL for the map.

Reverb

Websockets for live scores and the status of each call.

Filament 5

The admin panel: courses, rounds, sportscasters, invite requests and API costs.

Prism and Claude Sonnet

Structured output for each call: a list of lines, each tagged with its speaker.

ElevenLabs

Text-to-dialogue audio, with per-line text-to-speech as the fallback.

What's next

  • Next
    Recap videoA video after a round, told by two commentators.
  • Later
    More detailed round statistics
  • Later
    Better player comparisons

Feature updates are in the sandbox.

I build AI features like these into Laravel apps. Work with me