How avneeshw/twin-athlete works
Twin-Athlete is a sports-performance digital-twin platform: sensor or demo telemetry is validated and analyzed, used to update athlete state and forecasts, then surfaced through athlete, coach, and auditor views. The graph preserves documented scenario simulation, squad management, model-card, and feedback-ledger capabilities. Some subsystem links are based on README statements; unsampled implementation details are not inferred.
Main entry points: app.py REST / Stream API · coach.py Athlete Twin & Coach · app.js Role Cockpit · storage.py SQLite Vault
Components 16
Telemetry Ingestion
- ESP32 Sensors
firmware/esp32_athlete_tracker/esp32_athlete_tracker.ino - Packet Contracts
twin/contracts.py - Signal Pipeline
twin/telemetry.py
Twin Analytics
- Athlete Twin & Coach
twin/coach.py - Scenario Simulator
twin/simulator.py - Forecast Models
ml/models/twin_fatigue_model.pkl - Synthetic Data Generator
ml/generate_data.py - Data Compatibility
twin/compat.py - Prediction Feedback Ledger
twin/coach.py
Athlete Platform
- REST / Stream API
app.py - Squad Registry
twin/registry.py - SQLite Vault
twin/storage.py
Role Cockpit
- Role Cockpit
static/app.js - Cockpit Interface
static/index.html
Other components
- Athlete
- Coach / Scientist
Connections 22
- Athlete → ESP32 Sensors: wears sensors
README.md - ESP32 Sensors → Packet Contracts: sends packets
README.md - REST / Stream API → Packet Contracts: validates payloads
app.py - Signal Pipeline → Packet Contracts: validates packets
twin/telemetry.py - REST / Stream API → Signal Pipeline: processes telemetry
app.py - REST / Stream API → Athlete Twin & Coach: requests twin metrics
app.py - REST / Stream API → Squad Registry: reads squad data
app.py - REST / Stream API → Scenario Simulator: runs scenarios
app.py - REST / Stream API → Synthetic Data Generator: generates datasets
app.py - Athlete Twin & Coach → SQLite Vault: loads and saves profiles
twin/coach.py - Athlete Twin & Coach → SQLite Vault: persists outcomes
twin/coach.py - Squad Registry → Athlete Twin & Coach: creates athlete twins
twin/registry.py - Squad Registry → SQLite Vault: reads device mappings
twin/registry.py - Scenario Simulator → Forecast Models: loads forecasts
- Synthetic Data Generator → Data Compatibility: uses dataframe support
ml/generate_data.py - Athlete → Role Cockpit: views personal cockpit
README.md - Coach / Scientist → Role Cockpit: views squad matrix
README.md - Coach / Scientist → Role Cockpit: reviews diagnostics
README.md - REST / Stream API → Role Cockpit: streams live telemetry
app.py - Cockpit Interface → Role Cockpit: hosts cockpit
- Athlete Twin & Coach → Prediction Feedback Ledger: tracks predictions
twin/coach.py - Prediction Feedback Ledger → SQLite Vault: loads ledger records
twin/coach.py