How rabbit20031225/lmu-telemetry-lab works
Purpose and Entry Points
LMU Telemetry Lab is a Windows desktop telemetry-analysis application for Le Mans Ultimate recordings. It combines a React analysis UI, a local FastAPI service that parses/manages telemetry sessions, and an Electron packaging/runtime shell. Primary entry points are backend/main.py, frontend/src/main.tsx, and desktop/main.js.
Desktop Composition and Delivery
Electron hosts the local application and bridges desktop capabilities such as native file/folder selection to the web UI. The production build packages the Python backend through PyInstaller and creates a Windows installer through the build script. Relevant paths: desktop/main.js, backend.spec, build_app.bat.
API Boundary and Backend Orchestration
FastAPI exposes the frontend-facing REST surface and delegates domain work to services. This is the principal boundary between browser-rendered analysis state and filesystem-backed telemetry processing. API routing is concentrated in backend/app/api/endpoints.py, with application startup in backend/main.py and backend package initialization at backend/app/__init__.py.
Telemetry Session Pipeline
Telemetry ingestion, session discovery, lap extraction, playback normalization, and analysis payload generation are centered in the telemetry service. Source recordings originate from the local Le Mans Ultimate telemetry folder; managed sessions are represented with DuckDB per the product behavior. Track geometry and corner metadata supplement recorded data. Paths: backend/app/services/telemetry_service.py, backend/app/data/track_corners.json, backend/app/utils/track_db.py.
Domain Enrichment and Export Integrations
Backend services enrich session data with vehicle, track elevation, and track metadata; separate services manage user profiles, setup export, and Discord sharing. Discord is an external service with a repository template for local credentials/configuration. Paths: backend/app/services/car_lookup.py, backend/app/services/elevation_service.py, backend/app/services/discord_service.py.
Analysis Workspace and State
The React/Vite frontend owns interactive playback, selected/reference laps, chart/map synchronization, HUD layout, and API calls. A centralized telemetry store is the likely client-state coordination point between the dashboard and visual components. Core paths: frontend/src/App.tsx, frontend/src/store/telemetryStore.ts, frontend/src/api/client.ts.
Visualization and Comparison Layers
The dashboard composes 2D/3D track visualization, multi-channel telemetry charts, lap selectors, and modular overlays. Cross-session reference laps drive comparison/ghost-car presentation; 3D rendering is isolated under the Lab3D component boundary. Paths: frontend/src/components/F1Dashboard.tsx, frontend/src/components/TrackMap3D.tsx, frontend/src/components/Lab3D/Lab3DRoot.tsx.
Ancillary Web Presence and Deployment
A separate Vite landing page is independent of the desktop analysis frontend. GitHub Pages deployment is automated through the repository workflow, making GitHub Pages and GitHub releases/update checks material external infrastructure. Paths: landing-page/src/main.tsx, landing-page/src/App.tsx, .github/workflows/deploy-pages.yml.
Main entry points: telemetry_service.py Telemetry service · main.js Electron shell · main.py FastAPI startup · endpoints.py REST API routes
Components 26
Desktop Runtime
- Electron shell · Hosts the local analysis application and native dialogs.
desktop/main.js - PyInstaller package
backend.spec - Windows installer build
build_app.bat
Local Backend
- FastAPI startup
backend/main.py - REST API routes · Frontend-facing endpoints for telemetry and desktop actions.
backend/app/api/endpoints.py - Backend package
backend/app/__init__.py - Telemetry service · Discovers recordings, extracts laps, normalizes playback, and builds analysis payloads.
backend/app/services/telemetry_service.py - LMU telemetry folder
- Managed sessions
- Track geometry and corners
backend/app/data/track_corners.json - Track database utility
backend/app/utils/track_db.py - Vehicle and elevation enrichment
backend/app/services/car_lookup.py - Discord sharing
backend/app/services/discord_service.py
Analysis Frontend
- React entry
frontend/src/main.tsx - Analysis workspace · Owns interactive playback, lap comparison, HUD, and synchronized analysis views.
frontend/src/App.tsx - Telemetry store · Coordinates selected and reference laps across the workspace.
frontend/src/store/telemetryStore.ts - API client
frontend/src/api/client.ts - Dashboard
frontend/src/components/F1Dashboard.tsx - 3D track visualization
frontend/src/components/TrackMap3D.tsx - Lab3D renderer
frontend/src/components/Lab3D/Lab3DRoot.tsx
Landing Site
- Landing entry
landing-page/src/main.tsx - Landing page
landing-page/src/App.tsx - Pages deployment
.github/workflows/deploy-pages.yml
Other components
- Discord
- GitHub Pages
- GitHub releases
Connections 26
- Windows installer build → PyInstaller package: packages
- PyInstaller package → FastAPI startup: bundles
- Windows installer build → Electron shell: builds
- Electron shell → React entry: hosts
- Electron shell → FastAPI startup: runs local service
- Electron shell → GitHub releases: checks updates
- React entry → Analysis workspace: mounts
- Analysis workspace → Telemetry store: reads and updates
- Analysis workspace → Dashboard: composes
- Dashboard → 3D track visualization: renders
- 3D track visualization → Lab3D renderer: uses
- Telemetry store → API client: loads telemetry
- API client → REST API routes: REST requests
- FastAPI startup → REST API routes: serves
- FastAPI startup → Backend package: initializes
- REST API routes → Telemetry service: delegates sessions
- REST API routes → Discord sharing: delegates sharing
- Telemetry service → LMU telemetry folder: discovers and parses
- Telemetry service → Managed sessions: manages
- Telemetry service → Track geometry and corners: uses corners
- Telemetry service → Track database utility: queries track data
- Telemetry service → Vehicle and elevation enrichment: enriches payloads
- Discord sharing → Discord: shares to
- Landing entry → Landing page: mounts
- Pages deployment → Landing page: deploys
- Pages deployment → GitHub Pages: publishes to