How liamryan391/horse_predictor works
Horse Predictor is an operator-facing horse-racing intelligence platform. The main workflow ingests sample or licensed-provider race cards and results, validates and enriches them, stores them, then serves model-ranked runners and operational evidence through a FastAPI API to a React workspace. Separate branches cover model evaluation and registry governance, monitoring and data quality, and the bet journal and admin audit functions. Edges follow explicit README statements or shown imports/calls; unsampled endpoint and frontend wiring is intentionally not inferred.
Main entry points: api.py FastAPI service · data_pipeline.py Ingestion worker · main.tsx Racing workspace · racing_storage.py SQL storage
Components 19
Race Data Ingestion
- Ingestion worker
data_pipeline.py - Provider adapters
provider_adapters.py - Data validation
data_quality.py - Race enrichment
race_enrichment.py
Prediction Service
- SQL storage
racing_storage.py - Race schema
schema.py - FastAPI service
api.py - Prediction model
prediction_model.py - API contracts
api_contracts.py - Runtime settings
settings.py
Operations and Governance
- Monitoring
monitoring.py - Logs and tracing
observability.py - Admin governance
api.py
Operator Workspace
- Racing workspace
frontend/src/main.tsx - Race centre logic
frontend/src/raceCentre.ts - Bet journal logic
frontend/src/journal.ts - Legacy dashboard
horse_racing_app.py
Other components
- Racing operator
- Licensed data provider
Connections 25
- Racing operator → Ingestion worker: starts import
README.md - Ingestion worker → Provider adapters: fetches races
data_pipeline.py - Licensed data provider → Provider adapters: supplies race data
README.md - Ingestion worker → Data validation: validates data
- Ingestion worker → SQL storage: writes race rows
data_pipeline.py - Ingestion worker → Logs and tracing: configures logging
data_pipeline.py - Provider adapters → Race enrichment: enriches records
provider_adapters.py - Data validation → Race enrichment: checks enrichment
data_quality.py - SQL storage → Race schema: defines tables
racing_storage.py - FastAPI service → SQL storage: reads and records
api.py - FastAPI service → Prediction model: scores runners
api.py - FastAPI service → Data validation: reports quality
api.py - FastAPI service → Race enrichment: uses race features
api.py - FastAPI service → Monitoring: serves monitoring
api.py - FastAPI service → Logs and tracing: configures tracing
api.py - FastAPI service → API contracts: uses response models
api.py - FastAPI service → Runtime settings: loads configuration
api.py - FastAPI service → Admin governance: handles governance
README.md - Racing operator → Racing workspace: reviews workspace
README.md - Racing workspace → FastAPI service: requests data
- Racing workspace → Race centre logic: uses race logic
frontend/src/main.tsx - Racing workspace → Bet journal logic: parses journal
frontend/src/main.tsx - Racing operator → Legacy dashboard: uses internal checks
README.md - Legacy dashboard → Prediction model: uses predictions
horse_racing_app.py - Legacy dashboard → SQL storage: reads race data
horse_racing_app.py