← Dev Blog / Origin Story Series

Episode 03  ·  Origin Story Series

Building the Scoring Engine

The most complex piece of the platform — and the one that had to work perfectly the first time a player stood on the first tee with their phone.

Golf scoring sounds simple. Count the strokes, lower number wins. But the moment you introduce match play, handicaps, team aggregation, dual-player verification, and a live mobile interface — you've built something that can go wrong in a hundred different ways, most of them invisible until someone is standing on the 14th fairway looking at a number that doesn't make sense.

The scoring engine is the heart of the NTMGL platform. Every other feature — the standings, the captain dashboard, the handicap index, the skins game — derives its data from what happens inside the scoring pipeline. Get this wrong and you don't just have a software bug. You have a league that players don't trust.

I spent more time designing this component than anything else in the application. And I still had to go back and fix a fundamental assumption three months after Season 1 launched.

"In match play, the score isn't just a number. It's a statement about who won each hole, by how much, with what handicap advantage, contributing to what team total. Every one of those dimensions has to be correct simultaneously."

— Brian Hackney, Founder

The Scoring Model

Before writing a single line of code, the scoring model had to be completely locked down in writing. There's no recovering from a mid-season change to how points are calculated — not without a data migration and a very uncomfortable conversation with every captain in the league.

NTMGL Point Accumulation Format

How every hole produces a team result

  • Net score is calculated per player: gross strokes minus handicap strokes received on that hole
  • Lower net score wins the hole: winning player's team receives 1.0 point
  • Tied net scores halve the hole: each team receives 0.5 points
  • All 18 holes are played to completion — no early concession, no clinched matches
  • All individual match points within a team matchup accumulate into a single team total
  • The team with the higher total wins the ScheduledMatch; ties are recorded as splits

The "all 18 holes played to completion" rule is not obvious and deserves explanation. In traditional match play, once a player is mathematically eliminated — say, 5 down with only 4 holes remaining — the match ends. The NTMGL format doesn't work that way. Every hole is worth points to the team, even if your individual match result is settled. A player who is 5 down with 4 to play still has 2 points available for their team. You play every hole.

Handicap Stroke Allocation

Net scoring requires knowing not just a player's handicap index, but exactly which holes they receive strokes on — determined by the course handicap and the hole's handicap rating (1–18 as stamped on every scorecard). A player with a course handicap of 10 receives one stroke on each of the 10 hardest holes. The engine evaluates this per player, per hole, per course, on every scorecard render and hole result calculation — all through a single shared service to prevent duplication.

The Verification System

One of the most important design decisions in the entire application was the dual-player scorecard verification system. The concept is deliberately simple for players to use, but has real integrity built into it: one player enters all the scores for the match, then both players must review and confirm them before the scorecard is posted. No match finalizes on one person's say-so alone.

This mirrors what already happens on a real golf course — one player keeps the card, both players sign it at the end. The platform just enforces it digitally.

The flow: one player enters all 18 gross scores via the mobile scorecard, moving the match to "Pending Verification." Both players then see the complete scorecard and either confirm or dispute. Only when both have confirmed does FinalizeScheduledMatchAsync run — inside a database transaction, touching almost every entity in the system: net score calculation, hole result assignment, individual match aggregation, team total aggregation, NTMGL handicap differential recording, and status update to Complete. A dispute by either player flags the match for admin review before anything posts.

The two-step confirmation requirement is what gives the system its integrity. It's the digital equivalent of both players signing the scorecard — a rule as old as competitive golf itself, now enforced by the platform rather than left to trust.

What Shipped

By the time Season 1 teed off, the scoring engine handled the complete pipeline: handicap stroke allocation per hole per player, gross score entry via mobile, dual-player verification with discrepancy flagging, net score calculation, hole-by-hole point assignment, individual match aggregation, team total aggregation, and finalization inside a database transaction with NTMGL handicap differential recording.

Every match in Season 1 ran through that pipeline. The Dallas Pin Seekers won the championship 29–22 — and every decimal in that score is correct.


Next episode: the GameDay experience — building the live scoring interface that players actually use on the course, and everything that had to be true about it before anyone trusted it with a real match.

Tags scoring architecture match play handicaps debugging