How darragh7/cs6422-complex-systems-design-group-3 works
ScoreLine combines a FastAPI football-match and prediction API with a separate match-result model-training workflow. A user requests matches; the controller delegates retrieval to the football-data.org client, which normalizes provider data for the API response. Prediction requests currently return fixed probabilities, not trained-model inference. Training code prepares historical match data, labels and chronologically splits it, then builds features, selects a model, and evaluates it. The README documents backend startup; sampled files do not show training-to-serving integration or database use by these routes.
Main entry points: database.py SQLAlchemy database · main.py FastAPI app · match_controller.py Match routes · football_api.py Football API client
Components 17
Backend API
- FastAPI app
backend/app/main.py - Match routes
backend/app/controllers/match_controller.py - Match response schema
backend/app/schemas/match_schema.py - Prediction route
backend/app/controllers/prediction_controller.py - Prediction service
backend/app/services/prediction_service.py - Runtime settings
backend/app/config/settings.py
Model Training
- Match preprocessing
ai/training/preprocessing.py - Training pipeline
ai/training/pipeline.py - Feature and model selection
ai/training/train.py
Persistence
- SQLAlchemy database
backend/app/database/database.py - Match ORM model
backend/app/models/match.py - Prediction ORM model
backend/app/models/prediction.py - User ORM model
backend/app/models/user.py - Database schema
database/schema.sql
External Systems
- Football API client
backend/app/services/football_api.py - football-data.org
Other components
- API user
Connections 14
- API user → FastAPI app: requests API
README.md - FastAPI app → Match routes: registers routes
backend/app/main.py - FastAPI app → Prediction route: registers routes
backend/app/main.py - Match routes → Football API client: fetches matches
backend/app/controllers/match_controller.py - Football API client → football-data.org: requests match data
backend/app/services/football_api.py - Match routes → Match response schema: formats response
backend/app/controllers/match_controller.py - Prediction route → Prediction service: requests prediction
backend/app/controllers/prediction_controller.py - Football API client → Runtime settings: reads configuration
backend/app/services/football_api.py - SQLAlchemy database → Runtime settings: reads database URL
backend/app/database/database.py - Training pipeline → Match preprocessing: runs preparation
ai/training/pipeline.py - Training pipeline → Feature and model selection: builds and evaluates
ai/training/pipeline.py - Match ORM model → SQLAlchemy database: uses declarative base
backend/app/models/match.py - Prediction ORM model → SQLAlchemy database: uses declarative base
backend/app/models/prediction.py - User ORM model → SQLAlchemy database: uses declarative base
backend/app/models/user.py