How nishancshetty/premier-league-analytics works
The product is a Premier League analytics web app. Users enter through a landing page, then view dashboard and fixtures pages; live match updates have a separate Socket.IO path. The backend exposes football and dashboard routes backed by an external football-data API, and runs a simulated live-match engine. The README also describes player/team statistics, comparisons, predictions, summaries, and news, but their implementation is not established by the sampled source. Those capabilities are represented cautiously; no database or AI runtime is evidenced.
Main entry points: App.jsx Route selection · server.js Server startup · liveMatchEngine.js Match simulation · app.js API application
Components 28
Web experience
- Route selection
client/src/App.jsx - Landing page
client/src/pages/LandingPage.tsx - Dashboard
client/src/pages/Home.jsx - League table
client/src/components/dashboard/LeagueTable.jsx - Fixtures
client/src/pages/Fixtures.jsx - Player statistics
client/src/pages/Players.jsx - Team statistics
client/src/pages/Teams.jsx - Live match view
client/src/pages/LiveMatch.jsx - Live match hook
client/src/hooks/useLiveMatch.js - Socket client
client/src/services/socket.js - Match data hook
client/src/hooks/useMatches.js - HTTP client
client/src/services/api.js
Football API
- API application
app.js - Football routes
routes/footballRoutes.js - Match controller
controllers/footballController.js - Dashboard routes
routes/dashboardRoutes.js - Dashboard controller
controllers/dashboardController.js - Football data service
services/footballApi.js
Live match
- Server startup
server.js - Match simulation
services/liveMatchEngine.js - Match state
services/matchService.js - Socket server
sockets/socket.js
External data
- Football data provider
- AI predictions
- AI summaries
- Player and club comparisons
- Injury and transfer news
Other components
- Football fan
Connections 28
- Football fan → Route selection: opens
- Route selection → Landing page: routes to
client/src/App.jsx - Route selection → Dashboard: routes to
client/src/App.jsx - Route selection → Fixtures: routes to
client/src/App.jsx - Route selection → Live match view: routes to
client/src/App.jsx - Dashboard → League table: renders
client/src/pages/Home.jsx - Live match hook → Socket client: uses
client/src/hooks/useLiveMatch.js - Live match view → Socket client: uses
client/src/pages/LiveMatch.jsx - Live match hook → Live match view: supplies updates
- Match data hook → HTTP client: uses
client/src/hooks/useMatches.js - Fixtures → HTTP client: fetches matches
client/src/pages/Fixtures.jsx - API application → Football routes: mounts
app.js - API application → Dashboard routes: mounts
app.js - Football routes → Match controller: dispatches
routes/footballRoutes.js - Dashboard routes → Dashboard controller: dispatches
routes/dashboardRoutes.js - Match controller → Football data service: fetches matches
controllers/footballController.js - Dashboard controller → Football data service: fetches matches
controllers/dashboardController.js - Football data service → Football data provider: requests data
services/footballApi.js - Server startup → API application: starts
server.js - Server startup → Socket server: initializes
server.js - Server startup → Match simulation: starts
server.js - Match simulation → Match state: updates
services/liveMatchEngine.js - Match simulation → Socket server: broadcasts through
services/liveMatchEngine.js - Socket client → Socket server: receives events
- Football fan → AI predictions: explores
README.md - Football fan → AI summaries: reads
README.md - Football fan → Player and club comparisons: compares
README.md - Football fan → Injury and transfer news: checks
README.md