How darragh7/scoreline works
Scoreline combines a Django website, a separate FastAPI backend, and football prediction/modeling code. The user-facing flow is website signup/login through FastAPI to the database; match browsing calls the external football data service, while prediction requests enter a separate service. The AI tree contains both a staged training pipeline and a separate baseline/evaluation suite. The README documents the service split and Supabase connection; arrows for unsampled model internals are omitted where source evidence does not establish their calls.
Main entry points: predict.py Prediction inference · user_controller.py Signup and login · season_eval.py Season evaluation · pipeline.py Training orchestrator
Components 27
Django Website
- Website routes
Django/webplay/urls.py - Web views and sessions
Django/webplay/views.py
FastAPI Backend
- API app and routes
backend/app/main.py - Signup and login
backend/app/controllers/user_controller.py - Password hashing
backend/app/services/authentication_service.py - User validation
backend/app/schemas/user_schema.py - User records
backend/app/models/user.py - PostgreSQL
backend/app/database/database.py - Match lookup
backend/app/controllers/match_controller.py - Football data client
backend/app/services/football_api.py - Prediction endpoint
backend/app/controllers/prediction_controller.py - Prediction service
backend/app/services/prediction_service.py
Training Pipeline
- Training orchestrator
ai/training/pipeline.py - Historical match pull
ai/training/data_pull.py - Match preparation
ai/training/preprocessing.py - Team normalization
ai/training/teams.py - Feature engineering
ai/training/features.py - Model selection
ai/training/train.py - Prediction inference
ai/training/predict.py - Season evaluation
ai/training/season_eval.py
ML Baselines
- Shared ML data and metrics
ai/ml_pipeline/common.py - Elo baseline
ai/ml_pipeline/elo_baseline.py - Poisson baseline
ai/ml_pipeline/poisson_baseline.py - Baseline model training
ai/ml_pipeline/train_models.py - Baseline evaluation
ai/ml_pipeline/evaluate.py
Other components
- Website visitor
- Football data service
Connections 31
- Website visitor → Website routes: opens website
- Website routes → Web views and sessions: routes requests
Django/webplay/urls.py - Web views and sessions → API app and routes: POSTs auth requests
Django/webplay/views.py - API app and routes → Signup and login: registers router
backend/app/main.py - API app and routes → Match lookup: registers router
backend/app/main.py - API app and routes → Prediction endpoint: registers router
backend/app/main.py - Signup and login → PostgreSQL: queries and writes
backend/app/controllers/user_controller.py - Signup and login → Password hashing: hashes and verifies
backend/app/controllers/user_controller.py - Signup and login → User records: uses records
backend/app/controllers/user_controller.py - Signup and login → User validation: validates payloads
backend/app/controllers/user_controller.py - Match lookup → Football data client: requests matches
backend/app/controllers/match_controller.py - Football data client → Football data service: fetches data
- Prediction endpoint → Prediction service: requests prediction
backend/app/controllers/prediction_controller.py - Training orchestrator → Match preparation: prepares matches
ai/training/pipeline.py - Training orchestrator → Feature engineering: builds features
ai/training/pipeline.py - Training orchestrator → Model selection: selects and evaluates
ai/training/pipeline.py - Training orchestrator → Historical match pull: loads historical data
ai/training/pipeline.py - Match preparation → Team normalization: normalizes teams
ai/training/preprocessing.py - Prediction inference → Feature engineering: uses features
ai/training/predict.py - Prediction inference → Match preparation: uses preparation
ai/training/predict.py - Prediction inference → Model selection: uses trained models
ai/training/predict.py - Prediction inference → Team normalization: uses team mappings
ai/training/predict.py - Prediction inference → Season evaluation: uses season evaluation
ai/training/predict.py - Season evaluation → Feature engineering: uses features
ai/training/season_eval.py - Season evaluation → Match preparation: uses preparation
ai/training/season_eval.py - Season evaluation → Model selection: uses training
ai/training/season_eval.py - Season evaluation → Baseline evaluation: uses evaluation
ai/training/season_eval.py - Elo baseline → Shared ML data and metrics: uses shared helpers
ai/ml_pipeline/elo_baseline.py - Poisson baseline → Shared ML data and metrics: uses shared helpers
ai/ml_pipeline/poisson_baseline.py - Model selection → Shared ML data and metrics: uses shared helpers
- Baseline evaluation → Shared ML data and metrics: uses shared helpers
ai/ml_pipeline/evaluate.py