# yanwela/vatscore-radar architecture

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

- Interactive diagram: https://gitdiagram.com/yanwela/vatscore-radar
- Repository: https://github.com/yanwela/vatscore-radar

## Overview

VatScore is a Streamlit dashboard for live VATSIM operations and historical analytics. The main user workflow starts at the live radar, where current network data is filtered and presented as flight telemetry; users can follow a flight into maps or replay, or open dedicated CID, airport, network-statistics, and event views. The repository also documents persistent event and anomaly history, administrative controls, and account/security features. The tree and sampled excerpts establish the page structure and several data paths; some feature wiring is documented in the README but its implementation was not sampled, so those links are limited to supported high-level relationships.

Main entry points: [`app.py`](https://github.com/yanwela/vatscore-radar/blob/main/app.py) (Live radar), [`vatsim_data.py`](https://github.com/yanwela/vatscore-radar/blob/main/vatsim_data.py) (Feed & reference data), [`pages/3_Airport.py`](https://github.com/yanwela/vatscore-radar/blob/main/pages/3_Airport.py) (Airport operations), [`pages/4_Events.py`](https://github.com/yanwela/vatscore-radar/blob/main/pages/4_Events.py) (Events calendar)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_live["Live Operations"]
  node_radar["Live radar<br/>[app.py]"]
  node_flightmap["Flight map<br/>[flight_map.js]"]
  node_anomalies["Anomaly detection<br/>[anomaly_engine.py]"]
  node_anomalyrules["Anomaly rules<br/>[anomaly_rules.py]"]
  node_airport["Airport operations<br/>[3_Airport.py]"]
  node_airportmap["Airport live map"]
end

subgraph group_analytics["Analytics"]
  node_cid["CID intelligence<br/>[1_CID_Stats.py]"]
  node_network["Network statistics<br/>[2_Network_Stats.py]"]
  node_statslogic["Network metrics<br/>[network_stats.py]"]
  node_events["Events calendar<br/>[4_Events.py]"]
  node_eventlogic["Event processing<br/>[events_data.py]"]
end

subgraph group_replay["Replay &amp; Maps"]
  node_flightreplay["Flight replay"]
  node_atcreplay["ATC replay<br/>[atc_replay_view.py]"]
end

subgraph group_platform["Platform Services"]
  node_feed["Feed &amp; reference data<br/>[vatsim_data.py]"]
  node_admin["Admin controls<br/>[admin_audit.py]"]
  node_security["Security &amp; redaction<br/>[security_utils.py]"]
end

subgraph group_persistence["Persistent Data"]
  node_anomalyarchive[("Anomaly archive")]
  node_eventhistory[("Event history")]
  node_githubstore["GitHub file storage"]
end

node_visitor(("Dashboard user"))
node_vatsim(("VATSIM feeds"))
node_statsim(("statsim.net"))
node_github[("Private GitHub store")]

node_visitor -->|"opens radar"| node_radar
node_visitor -->|"opens profile"| node_cid
node_visitor -->|"opens analytics"| node_network
node_visitor -->|"selects airport"| node_airport
node_visitor -->|"browses events"| node_events
node_vatsim -->|"serves network data"| node_feed
node_radar -->|"loads live data"| node_feed
node_feed -->|"returns feed"| node_radar
node_radar -->|"renders map data"| node_flightmap
node_radar -->|"updates snapshots"| node_anomalies
node_anomalies -->|"detects anomalies"| node_anomalyrules
node_anomalies -->|"archives closed events"| node_anomalyarchive
node_visitor -->|"selects flight"| node_flightreplay
node_visitor -->|"selects session"| node_atcreplay
node_statsim -->|"provides history"| node_cid
node_network -->|"loads live data"| node_feed
node_network -->|"builds statistics"| node_statslogic
node_airport -->|"loads feed &amp; airports"| node_feed
node_airport -->|"computes airport detail"| node_statslogic
node_airport -->|"renders map"| node_airportmap
node_events -->|"filters &amp; groups"| node_eventlogic
node_events -->|"records events"| node_eventhistory
node_events -->|"loads live context"| node_feed
node_admin -->|"persists admin data"| node_githubstore
node_githubstore -->|"reads &amp; writes"| node_github
node_security -.->|"protects requests"| node_radar
node_security -.->|"redacts member data"| node_cid

click node_radar "https://github.com/yanwela/vatscore-radar/blob/main/app.py"
click node_feed "https://github.com/yanwela/vatscore-radar/blob/main/vatsim_data.py"
click node_flightmap "https://github.com/yanwela/vatscore-radar/blob/main/flight_map.js"
click node_anomalies "https://github.com/yanwela/vatscore-radar/blob/main/anomaly_engine.py"
click node_anomalyrules "https://github.com/yanwela/vatscore-radar/blob/main/anomaly_rules.py"
click node_anomalyarchive "https://github.com/yanwela/vatscore-radar/blob/main/anomaly_archive_store.py"
click node_cid "https://github.com/yanwela/vatscore-radar/blob/main/pages/1_CID_Stats.py"
click node_network "https://github.com/yanwela/vatscore-radar/blob/main/pages/2_Network_Stats.py"
click node_statslogic "https://github.com/yanwela/vatscore-radar/blob/main/network_stats.py"
click node_airport "https://github.com/yanwela/vatscore-radar/blob/main/pages/3_Airport.py"
click node_airportmap "https://github.com/yanwela/vatscore-radar/blob/main/airport_live_map.js"
click node_events "https://github.com/yanwela/vatscore-radar/blob/main/pages/4_Events.py"
click node_eventlogic "https://github.com/yanwela/vatscore-radar/blob/main/events_data.py"
click node_eventhistory "https://github.com/yanwela/vatscore-radar/blob/main/events_history_store.py"
click node_flightreplay "https://github.com/yanwela/vatscore-radar/blob/main/flight_replay_view.py"
click node_atcreplay "https://github.com/yanwela/vatscore-radar/blob/main/atc_replay_view.py"
click node_admin "https://github.com/yanwela/vatscore-radar/blob/main/admin_audit.py"
click node_githubstore "https://github.com/yanwela/vatscore-radar/blob/main/github_file_store.py"
click node_security "https://github.com/yanwela/vatscore-radar/blob/main/security_utils.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_radar,node_flightmap,node_anomalies,node_anomalyrules,node_airport,node_airportmap,node_visitor toneBlue
class node_cid,node_network,node_statslogic,node_events,node_eventlogic,node_github toneAmber
class node_flightreplay,node_atcreplay toneMint
class node_feed,node_admin,node_security toneRose
class node_anomalyarchive,node_eventhistory,node_githubstore,node_vatsim,node_statsim toneIndigo
```

## Components

### Live Operations

- [Live radar](https://github.com/yanwela/vatscore-radar/blob/main/app.py): `app.py`
- [Flight map](https://github.com/yanwela/vatscore-radar/blob/main/flight_map.js): `flight_map.js`
- [Anomaly detection](https://github.com/yanwela/vatscore-radar/blob/main/anomaly_engine.py): `anomaly_engine.py`
- [Anomaly rules](https://github.com/yanwela/vatscore-radar/blob/main/anomaly_rules.py): `anomaly_rules.py`
- [Airport operations](https://github.com/yanwela/vatscore-radar/blob/main/pages/3_Airport.py): `pages/3_Airport.py`
- [Airport live map](https://github.com/yanwela/vatscore-radar/blob/main/airport_live_map.js): `airport_live_map.js`

### Analytics

- [CID intelligence](https://github.com/yanwela/vatscore-radar/blob/main/pages/1_CID_Stats.py): `pages/1_CID_Stats.py`
- [Network statistics](https://github.com/yanwela/vatscore-radar/blob/main/pages/2_Network_Stats.py): `pages/2_Network_Stats.py`
- [Network metrics](https://github.com/yanwela/vatscore-radar/blob/main/network_stats.py): `network_stats.py`
- [Events calendar](https://github.com/yanwela/vatscore-radar/blob/main/pages/4_Events.py): `pages/4_Events.py`
- [Event processing](https://github.com/yanwela/vatscore-radar/blob/main/events_data.py): `events_data.py`

### Replay & Maps

- [Flight replay](https://github.com/yanwela/vatscore-radar/blob/main/flight_replay_view.py): `flight_replay_view.py`
- [ATC replay](https://github.com/yanwela/vatscore-radar/blob/main/atc_replay_view.py): `atc_replay_view.py`

### Platform Services

- [Feed & reference data](https://github.com/yanwela/vatscore-radar/blob/main/vatsim_data.py): `vatsim_data.py`
- [Admin controls](https://github.com/yanwela/vatscore-radar/blob/main/admin_audit.py): `admin_audit.py`
- [Security & redaction](https://github.com/yanwela/vatscore-radar/blob/main/security_utils.py): `security_utils.py`

### Persistent Data

- [Anomaly archive](https://github.com/yanwela/vatscore-radar/blob/main/anomaly_archive_store.py): `anomaly_archive_store.py`
- [Event history](https://github.com/yanwela/vatscore-radar/blob/main/events_history_store.py): `events_history_store.py`
- [GitHub file storage](https://github.com/yanwela/vatscore-radar/blob/main/github_file_store.py): `github_file_store.py`

### Other components

- **Dashboard user**
- **VATSIM feeds**
- **statsim.net**
- **Private GitHub store**

## Connections

- Dashboard user → Live radar: opens radar
- Dashboard user → CID intelligence: opens profile
- Dashboard user → Network statistics: opens analytics
- Dashboard user → Airport operations: selects airport
- Dashboard user → Events calendar: browses events
- VATSIM feeds → Feed & reference data: serves network data
- Live radar → Feed & reference data: loads live data
- Feed & reference data → Live radar: returns feed
- Live radar → Flight map: renders map data
- Live radar → Anomaly detection: updates snapshots
- Anomaly detection → Anomaly rules: detects anomalies
- Anomaly detection → Anomaly archive: archives closed events
- Dashboard user → Flight replay: selects flight
- Dashboard user → ATC replay: selects session
- statsim.net → CID intelligence: provides history
- Network statistics → Feed & reference data: loads live data
- Network statistics → Network metrics: builds statistics
- Airport operations → Feed & reference data: loads feed & airports
- Airport operations → Network metrics: computes airport detail
- Airport operations → Airport live map: renders map
- Events calendar → Event processing: filters & groups
- Events calendar → Event history: records events
- Events calendar → Feed & reference data: loads live context
- Admin controls → GitHub file storage: persists admin data
- GitHub file storage → Private GitHub store: reads & writes
- Security & redaction → Live radar: protects requests
- Security & redaction → CID intelligence: redacts member data
