# unaveragetech/trulysporting architecture

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

- Interactive diagram: https://gitdiagram.com/unaveragetech/trulysporting
- Repository: https://github.com/unaveragetech/trulysporting

## Overview

TrulySporting is a Streamlit sports analytics application backed by ESPN data, with an optional distributed fetching service. Users explore scores, trends, teams, news, rankings, and saved custom views through the app; administrators also have endpoint, schema, raw-response, and sync tools. The main application is a large monolith, so its documented capabilities are represented as distinct feature nodes sharing sporting.py. The excerpts show SQLite persistence and the fetch-worker protocol; unsampled feature-level calls are not inferred.

Main entry points: [`sporting.py`](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py) (Streamlit app), [`coordinator.py`](https://github.com/unaveragetech/trulysporting/blob/main/coordinator.py) (Job coordinator), [`fetch_node.py`](https://github.com/unaveragetech/trulysporting/blob/main/fetch_node.py) (Fetch worker)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Analytics application"]
  node_streamlit_app["Streamlit app<br/>[sporting.py]"]
  node_scoreboard["Scoreboard<br/>[sporting.py]"]
  node_trends["Team trends<br/>[sporting.py]"]
  node_team_info["Teams and rosters<br/>[sporting.py]"]
  node_news["League news<br/>[sporting.py]"]
  node_rankings["Rankings<br/>[sporting.py]"]
  node_custom_views["Custom views<br/>[sporting.py]"]
  node_support["Support page<br/>[sporting.py]"]
end

subgraph group_data["Sports data"]
  node_sqlite_db[("SQLite sports data<br/>[sporting.py]")]
  node_espn["ESPN public APIs"]
end

subgraph group_distributed["Distributed fetching"]
  node_coordinator["Job coordinator<br/>[coordinator.py]"]
  node_job_queue[("Fetch job queue<br/>[coordinator.py]")]
  node_fetch_worker["Fetch worker<br/>[fetch_node.py]"]
end

subgraph group_operations["Administration"]
  node_network_monitor["Endpoint health<br/>[sporting.py]"]
  node_schema_explorer["Schema explorer<br/>[sporting.py]"]
  node_raw_inspector["Raw API inspector<br/>[sporting.py]"]
  node_admin_panel["Sync and settings<br/>[sporting.py]"]
end

node_user(("Sports fan"))
node_admin(("Administrator"))

node_user -->|"uses"| node_streamlit_app
node_admin -->|"administers"| node_streamlit_app
node_streamlit_app -->|"fetches API data"| node_espn
node_streamlit_app -->|"writes sports data"| node_sqlite_db
node_streamlit_app -->|"offers"| node_scoreboard
node_streamlit_app -->|"offers"| node_trends
node_streamlit_app -->|"offers"| node_team_info
node_streamlit_app -->|"offers"| node_news
node_streamlit_app -->|"offers"| node_rankings
node_streamlit_app -->|"offers"| node_custom_views
node_streamlit_app -->|"offers"| node_support
node_streamlit_app -->|"offers"| node_network_monitor
node_streamlit_app -->|"offers"| node_schema_explorer
node_streamlit_app -->|"offers"| node_raw_inspector
node_streamlit_app -->|"offers"| node_admin_panel
node_admin_panel -.->|"triggers sync"| node_coordinator
node_fetch_worker -->|"polls jobs"| node_coordinator
node_fetch_worker -->|"fetches data"| node_espn
node_fetch_worker -->|"submits results"| node_coordinator
node_coordinator -->|"manages jobs"| node_job_queue
node_coordinator -->|"stores parsed data"| node_sqlite_db

click node_streamlit_app "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_scoreboard "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_trends "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_team_info "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_news "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_rankings "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_custom_views "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_support "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_sqlite_db "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_network_monitor "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_schema_explorer "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_raw_inspector "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_admin_panel "https://github.com/unaveragetech/trulysporting/blob/main/sporting.py"
click node_coordinator "https://github.com/unaveragetech/trulysporting/blob/main/coordinator.py"
click node_job_queue "https://github.com/unaveragetech/trulysporting/blob/main/coordinator.py"
click node_fetch_worker "https://github.com/unaveragetech/trulysporting/blob/main/fetch_node.py"

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_streamlit_app,node_scoreboard,node_trends,node_team_info,node_news,node_rankings,node_custom_views,node_support toneBlue
class node_sqlite_db,node_espn toneAmber
class node_coordinator,node_job_queue,node_fetch_worker toneMint
class node_network_monitor,node_schema_explorer,node_raw_inspector,node_admin_panel toneRose
class node_user,node_admin toneIndigo
```

## Components

### Analytics application

- [Streamlit app](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [Scoreboard](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [Team trends](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [Teams and rosters](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [League news](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [Rankings](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [Custom views](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [Support page](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`

### Sports data

- [SQLite sports data](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- **ESPN public APIs**

### Distributed fetching

- [Job coordinator](https://github.com/unaveragetech/trulysporting/blob/main/coordinator.py): `coordinator.py`
- [Fetch job queue](https://github.com/unaveragetech/trulysporting/blob/main/coordinator.py): `coordinator.py`
- [Fetch worker](https://github.com/unaveragetech/trulysporting/blob/main/fetch_node.py): `fetch_node.py`

### Administration

- [Endpoint health](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [Schema explorer](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [Raw API inspector](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`
- [Sync and settings](https://github.com/unaveragetech/trulysporting/blob/main/sporting.py): `sporting.py`

### Other components

- **Sports fan**
- **Administrator**

## Connections

- Sports fan → Streamlit app: uses (evidence: `README.md`)
- Administrator → Streamlit app: administers (evidence: `README.md`)
- Streamlit app → ESPN public APIs: fetches API data (evidence: `sporting.py`)
- Streamlit app → SQLite sports data: writes sports data (evidence: `sporting.py`)
- Streamlit app → Scoreboard: offers (evidence: `README.md`)
- Streamlit app → Team trends: offers (evidence: `README.md`)
- Streamlit app → Teams and rosters: offers (evidence: `README.md`)
- Streamlit app → League news: offers (evidence: `README.md`)
- Streamlit app → Rankings: offers (evidence: `README.md`)
- Streamlit app → Custom views: offers (evidence: `README.md`)
- Streamlit app → Support page: offers (evidence: `README.md`)
- Streamlit app → Endpoint health: offers (evidence: `README.md`)
- Streamlit app → Schema explorer: offers (evidence: `README.md`)
- Streamlit app → Raw API inspector: offers (evidence: `README.md`)
- Streamlit app → Sync and settings: offers (evidence: `README.md`)
- Sync and settings → Job coordinator: triggers sync (evidence: `README.md`)
- Fetch worker → Job coordinator: polls jobs (evidence: `fetch_node.py`)
- Fetch worker → ESPN public APIs: fetches data (evidence: `fetch_node.py`)
- Fetch worker → Job coordinator: submits results (evidence: `fetch_node.py`)
- Job coordinator → Fetch job queue: manages jobs (evidence: `coordinator.py`)
- Job coordinator → SQLite sports data: stores parsed data (evidence: `coordinator.py`)
