# dkjackle/turf-score architecture

> Architecture diagram of the GitHub repository dkjackle/turf-score, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-01). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dkjackle/turf-score
- Repository: https://github.com/dkjackle/turf-score

## Overview

Turf Score is a browser-based turf-cricket scoring app. A scorer records deliveries and match details, can review the over-by-over view and match state, and sees match highlights at the end. Match history stays on the scoring device; optional live sharing lets others follow using a watch code, and results or watch links can be shared on WhatsApp. The README identifies `index.html` as the app but no source excerpts were provided, so the graph reflects documented capabilities rather than verified implementation calls.

Main entry points: [`index.html`](https://github.com/dkjackle/turf-score/blob/main/index.html) (Match scoring)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_scoring["Scoring"]
  node_match_scoring["Match scoring<br/>[index.html]"]
  node_over_view["Over view<br/>[index.html]"]
  node_player_stats["Player tracking<br/>[index.html]"]
  node_match_highlights["Match highlights<br/>[index.html]"]
end

subgraph group_records["Records"]
  node_device_history[("Match history<br/>[index.html]")]
end

subgraph group_sharing["Sharing"]
  node_live_sharing["Live sharing<br/>[index.html]"]
  node_firebase[("Firebase database")]
end

node_scorer(("Scorer"))
node_watcher(("Watcher"))
node_whatsapp["WhatsApp"]

node_scorer -->|"records deliveries"| node_match_scoring
node_match_scoring -->|"shows overs"| node_over_view
node_match_scoring -->|"tracks players"| node_player_stats
node_match_scoring -->|"saves history"| node_device_history
node_match_scoring -->|"shows at end"| node_match_highlights
node_match_scoring -->|"offers sharing"| node_live_sharing
node_live_sharing -->|"syncs live score"| node_firebase
node_watcher -->|"follows by code"| node_live_sharing
node_match_scoring -->|"shares result"| node_whatsapp
node_live_sharing -->|"shares watch link"| node_whatsapp

click node_match_scoring "https://github.com/dkjackle/turf-score/blob/main/index.html"
click node_over_view "https://github.com/dkjackle/turf-score/blob/main/index.html"
click node_player_stats "https://github.com/dkjackle/turf-score/blob/main/index.html"
click node_match_highlights "https://github.com/dkjackle/turf-score/blob/main/index.html"
click node_device_history "https://github.com/dkjackle/turf-score/blob/main/index.html"
click node_live_sharing "https://github.com/dkjackle/turf-score/blob/main/index.html"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_match_scoring,node_over_view,node_player_stats,node_match_highlights toneBlue
class node_device_history toneAmber
class node_live_sharing,node_firebase toneMint
class node_scorer,node_watcher,node_whatsapp toneIndigo
```

## Components

### Scoring

- [Match scoring](https://github.com/dkjackle/turf-score/blob/main/index.html): `index.html`
- [Over view](https://github.com/dkjackle/turf-score/blob/main/index.html): `index.html`
- [Player tracking](https://github.com/dkjackle/turf-score/blob/main/index.html): `index.html`
- [Match highlights](https://github.com/dkjackle/turf-score/blob/main/index.html): `index.html`

### Records

- [Match history](https://github.com/dkjackle/turf-score/blob/main/index.html): `index.html`

### Sharing

- [Live sharing](https://github.com/dkjackle/turf-score/blob/main/index.html): `index.html`
- **Firebase database**

### Other components

- **Scorer**
- **Watcher**
- **WhatsApp**

## Connections

- Scorer → Match scoring: records deliveries (evidence: `README.md`)
- Match scoring → Over view: shows overs (evidence: `README.md`)
- Match scoring → Player tracking: tracks players (evidence: `README.md`)
- Match scoring → Match history: saves history (evidence: `README.md`)
- Match scoring → Match highlights: shows at end (evidence: `README.md`)
- Match scoring → Live sharing: offers sharing (evidence: `README.md`)
- Live sharing → Firebase database: syncs live score (evidence: `README.md`)
- Watcher → Live sharing: follows by code (evidence: `README.md`)
- Match scoring → WhatsApp: shares result (evidence: `README.md`)
- Live sharing → WhatsApp: shares watch link (evidence: `README.md`)
