How magnusinst84-sudo/offside works
OFFSIDE is a football analytics dashboard whose main journey moves from the war-room entry to match discovery and a match view, where live match data and win-probability estimates provide tactical context. Separate branches support AI commentary, player profiles, insights, and user settings. The README documents API-Football/mock match sourcing, Gemini commentary, and an XGBoost-backed prediction capability; sampled source confirms app routing, polling, settings persistence, and some match handling, but not every backend route’s internal implementation.
Main entry points: main.py FastAPI entrypoint · players/page.tsx Player browser · ai/page.tsx AI tactical center · settings/page.tsx Settings screen
Components 22
Frontend experience
- War room entry
frontend/app/page.tsx - Match listings
frontend/app/matches/page.tsx - Match detail
frontend/app/match/[id]/page.tsx - Player browser
frontend/app/players/page.tsx - Player profile
frontend/app/player/[id]/page.tsx - AI tactical center
frontend/app/ai/page.tsx - Insights dashboard
frontend/app/insights/page.tsx - Settings screen
frontend/app/settings/page.tsx - Shared app state
frontend/context/AppContext.tsx - Settings persistence
frontend/hooks/useLocalStorage.ts - Match data hooks
frontend/hooks/useMatchData.ts - API client
frontend/lib/api.ts
Backend services
- FastAPI entrypoint
backend/main.py - Match service
backend/routers/matches.py - Prediction service
backend/routers/predict.py - Commentary service
backend/routers/commentary.py - Player service
backend/routers/players.py - Insights service
backend/routers/insights.py
Domain data
- Static player roster
frontend/lib/data/players.ts
Other components
- Fan or coach
- API-Football
- Gemini API
Connections 25
- Fan or coach → War room entry: opens app
- War room entry → Match listings: opens listings
- Fan or coach → Player browser: browses players
- Player browser → Player profile: opens profile
- Fan or coach → AI tactical center: asks analyst
- Fan or coach → Insights dashboard: views insights
- Fan or coach → Settings screen: changes settings
- Settings screen → Shared app state: reads panel state
- Settings screen → Settings persistence: persists preferences
- AI tactical center → Shared app state: reads match context
- AI tactical center → API client: sends question
- Match listings → Match data hooks: loads matches
- Match detail → Match data hooks: loads match data
- Match data hooks → API client: requests data
- API client → FastAPI entrypoint: calls API
- FastAPI entrypoint → Match service: routes matches
- FastAPI entrypoint → Prediction service: routes predictions
- FastAPI entrypoint → Commentary service: routes commentary
- FastAPI entrypoint → Player service: routes players
- FastAPI entrypoint → Insights service: routes insights
- Match service → API-Football: fetches fixtures
- Commentary service → Gemini API: requests analysis
- Player browser → Static player roster: browses roster
- Player profile → Static player roster: reads profile
- Insights dashboard → Insights service: loads insights