Skip to content

Core concepts

You can show live scores knowing just one thing: a match. But when you’re ready to go further, here’s the whole mental model on one page.

flowchart TD Club -->|has| Court Tournament -->|uses| Club Tournament -->|contains| Draw[Draw / bracket] Draw -->|each slot is a| Match Match -.played on.-> Court Match -->|two sides| Player
Clubs provide the courts; tournaments organise matches onto them.

A quick tour:

  • Club — a venue. It owns the courts.
  • Court — a physical court, where matches are played.
  • Tournament — an event. It contains one or more draws.
  • Draw — a bracket (size 8 / 16 / 32 / 64). Each slot becomes a match.
  • Match — a game between two sides, scored in sets like [{ home: 6, guest: 4 }]. This is the thing you read.

Every match moves through the same states. Your status field will always be one of these:

stateDiagram-v2 [*] --> scheduled scheduled --> in_progress: start in_progress --> completed: confirm in_progress --> suspended: pause suspended --> in_progress: resume scheduled --> cancelled in_progress --> cancelled completed --> [*]
The match state machine. Most live-score apps only care about in_progress → completed.

These are deliberately separate:

  • A Player is a participant in a match. They can exist before they ever sign up — an organiser can add “Roger Federer” to a draw, and the real Roger claims that profile later.
  • A User is an account (a login). When a person claims their player profile, the two link up.

So: every match has players; not every player has a user. For reading live scores, you only ever deal with players.