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 or a shared link. A round can also have a feed: a box score computed from the scores, or AI sportscasters who call each hole.

Live, by invite

  1. Rounds, score entry and the live map · Built Dec 2025
  2. AI sportscasters, with audio · Built Dec 2025
  3. Player following and statistics · Built Dec 2025
  4. Live score updates over websockets · Built Jan 1
  5. Box score feed · Built Sep 7
Started
Dec 12, 2025
Latest update
Sep 25
Sign-up
By invite request
Stack
Laravel 13, Livewire 4, Filament 5, Reverb, Prism, ElevenLabs, Pest

Updates

Spam checks on the invite form

Sign-up is by invite. A visitor requests one with a name, an email address and the course they play most, and I approve each request. Submissions that fail the form's spam checks are discarded.

How it's built: A Livewire form with server-side spam checks and a per-IP rate limit on Laravel's RateLimiter, with no CAPTCHA and no added package. Approving a request in the Filament 5 admin panel creates the account and emails a link to set a password.

Box score feed

A round starts with one of three feeds: none, a box score or sportscasting. The box score lists each hole's results and running totals, with up to three lines on what the hole changed, such as a lead change or a streak. A hole appears once every player in the round has scored it, and a hole where nothing changed gets no lines.

New round / SettingsScreenshot
The last step of starting a round. Round feed has three options: No feed, just the scorecard; Box score, hole-by-hole facts and standings, written as you score; and Sportscasting, AI sportscasters call your round. Box score is selected.
Scorecard / Box scoreScreenshot
A live round at Centennial Park with three players through seven holes, and its box score below. Hole 7 lists two birdies and a par with no comment. Hole 6 notes two straight birdies for one player. Hole 5 notes that he takes the lead for the first time since hole 3, up by 2, and that another player has three straight holes over par.

How it's built: Nothing is generated or stored. BoxScoreService derives every entry from the scores on render, so a corrected score corrects the feed and there are no model calls. Standings, lead changes and streaks come from RoundNarrativeContext, which also feeds the sportscasters' prompt. The Livewire component re-renders on the round's ScoreUpdated and HoleCompleted broadcasts. Pest tests cover the cases where it says nothing.

tests/Feature/Services/BoxScoreServiceTest.phpPHP
it('does not publish a hole that is still being played', function () {
    $round = boxScoreRound();
    $sam = boxScorePlayer($round, 'Sam');
    boxScorePlayer($round, 'Casey');

    createScoreForRound($sam, $round, 1, 3);

    // Casey has not thrown. Publishing now would mean the entry
    // rewrites itself under whoever is reading it.
    expect($this->service->completedSequences($round->fresh()))
        ->toBe([]);
});

it('says nothing about a quiet hole', function () {
    $round = boxScoreRound();
    $sam = boxScorePlayer($round, 'Sam');
    $casey = boxScorePlayer($round, 'Casey');

    createScoreForRound($sam, $round, 1, 3);
    createScoreForRound($casey, $round, 1, 3);

    expect($this->service->insightsForHole($round->fresh(), 1, 3))
        ->toBe([]);
});

Screenshots show demo data.

Live score updates

Anyone following a round sees each score on the scorecard as the hole is saved, without a refresh. Sportscaster calls appear the same way as they finish generating.

How it's built: Laravel Reverb, with Laravel Echo on the client. Saving a hole broadcasts one ScoreUpdated event per score on the round's public channel, and each open scorecard is a Livewire component that listens for it and re-renders. The event implements ShouldBroadcastNow, so it skips the queue, and CommentaryUpdated reports each call's status on the same channel. A round is listed as live while it's public, in progress and started within the last 12 hours, so an unfinished round drops off the map.

From the scorer's phone to a follower's screen
Save & NextOnce a hole
ScoreUpdatedPer score
rounds.{id}Reverb channel
ScorecardUpdates live

Score entry

One player scores for the whole group on a phone. Plus and minus set each player's strokes, and Save & Next stores the hole and moves to the next one. A round can start on any hole and wraps around, so a group that starts on hole 9 finishes on hole 8.

Scoring / Hole 8Screenshot
The scoring screen for hole 8, par 3, at Centennial Park. Three players, each with their total so far and a minus and a plus button, and a Save and Next button at the bottom. Seven of eighteen progress marks are filled.

How it's built: The taps are Alpine state, and Save & Next sends the hole to Livewire in one request, saved in one transaction. A round has its own round_holes, each with a sequence, a label and a par, and a score belongs to one of them. A mid-course start rebuilds the sequence from the starting hole, and a par can be overridden for one round without changing the course. Pest browser tests cover the boundary between Alpine and Livewire.

AI sportscasters

A round can be called by up to two AI sportscasters, picked from a cast that includes a roast master, a hype man, a stats analyst and a classic sportscaster. They open with a pregame, call each hole in a few lines as it's scored and close with a wrap-up, and each call can be played as audio. The case study follows one hole from the scorecard to the call.

How it's built: A HoleCompleted event queues a job that builds the prompt from the scorecard: the hole's results, running totals, streaks and lead changes. Claude Sonnet writes the exchange through Prism as structured output, each line tagged with its speaker, and ElevenLabs' text-to-dialogue API voices it, with per-line text-to-speech as the fallback. Each hole gets an excitement level from one to five that sets the length of the call. Each request to either provider is logged with its estimated cost, and a daily spend limit is checked before a job sends one.

Decisions

Decision 01Dec 13, 2025

Rounds are public by default

  • Context: The app is for watching friends play, from anywhere.
  • Decision: Every round starts public, and a guest can follow it without an account.
  • Why: Following a round shouldn't need an invitation from the scorer.
Decision 02Dec 14, 2025

A web app instead of a native app

  • Context: A live scoring app can ship as a native app or as a web app.
  • Decision: One web app that installs to the home screen, with websockets for anything live.
  • Why: A follower needs only a link, and there's nothing to install to watch a round.
Decision 03Sep 5

A daily spend limit on paid API calls

  • Context: Sportscasting, its audio and the AI course search each call a paid API.
  • Decision: A daily limit on recorded spend, checked before any job calls a provider, and a per-user rate limit on the actions that start one.
  • Why: A signed-in user in a loop shouldn't be able to run up a bill.
Decision 04Sep 7

One feed per round

  • Context: Sportscasting costs money, needs a connection and can get the scorecard wrong.
  • Decision: A round picks one feed: none, box score or sportscasting. The box score is computed from the scores and never stored.
  • Why: Every line can be checked against the scorecard, and a corrected score corrects it.

What's next

  1. Next
    A recap video after a round, told by two commentators
  2. Later
    More detailed round statistics
  3. Later
    Better player comparisons

Follow along

Updates are posted here as features are built. The repo is private.

I build live updates and AI features into Laravel apps. Work with me