How aliemad0/pitchiq works
PitchIQ is a Premier League history and statistics web application, with an interactive football-game suite alongside its encyclopedia. The main user journey is browsing a season or entity profile, where server-rendered routes and API handlers resolve requests against validated, committed JSON snapshots and feature-specific data services, then present localized results. Major branches include fixtures and standings, player comparisons and leaderboards, teams and managers, the historic map, and deterministic trivia. The README documents these capabilities and the snapshot architecture; sampled source confirms several data, search, manager, and trivia relationships, while some feature internals were not sampled.
Main entry points: loaders.ts Data loaders · [locale] App routes · view Game sessions · data JSON snapshots
Components 21
Web experience
- App routes
src/app/[locale] - Route handlers
src/app/api - Localization
src/i18n
Data platform
- JSON snapshots
src/data - Data loaders
src/data/loaders.ts - Data schemas
src/data/schemas.ts - Entity names
src/features/i18n/entity-names.ts
Football encyclopedia
- Search
src/app/api/search/route.ts - Fixtures & tables
src/features/leagues - Player profiles
src/features/players - Player comparison
src/features/players/comparison-metrics.ts - Club profiles
src/features/teams - Manager profiles
src/features/managers/manager-profile.api.ts - Historic map
src/features/map - Fact engine
src/features/trivia/engine.ts
Interactive games
- Game modes
src/features/game/components - Game rules
src/features/game/domain - Game sessions
src/features/game/view - Game storage
src/features/game/storage
Other components
- Visitor
- Refresh pipeline
Connections 22
- Visitor → App routes: browses
README.md - App routes → Data loaders: loads data
- Route handlers → Data loaders: loads data
src/app/api/search/route.ts - Data loaders → JSON snapshots: reads snapshots
src/data/loaders.ts - Data loaders → Data schemas: validates with
src/data/loaders.ts - Route handlers → Entity names: resolves names
src/app/api/search/route.ts - Entity names → Data loaders: loads translations
src/features/i18n/entity-names.ts - App routes → Localization: localizes pages
README.md - Visitor → Search: searches
README.md - Visitor → Fixtures & tables: views fixtures
README.md - Visitor → Player profiles: views profiles
README.md - Visitor → Player comparison: compares players
README.md - Visitor → Club profiles: views clubs
README.md - Visitor → Manager profiles: views managers
README.md - Visitor → Historic map: explores map
README.md - Visitor → Fact engine: requests facts
README.md - Fact engine → JSON snapshots: derives facts
- Visitor → Game modes: plays modes
README.md - Game modes → Game sessions: runs sessions
- Game sessions → Game rules: applies rules
- Game sessions → Game storage: persists progress
- Refresh pipeline → JSON snapshots: refreshes daily
README.md