How guminskiadrian/footballstats works
FootballStats is a small React football-stats site scaffold. Its visible runtime boots a heading-only app; separate modules define standings and team API requests, fetch state with caching, and football data types. The README names TheSportsDB, but the sampled configuration instead points its API proxy at football-data.org. The excerpts do not show the app invoking the fetch hook or rendering the API results, so those capabilities are shown as separate, currently unconnected pieces rather than an inferred user-to-results flow.
Main entry points: client.ts HTTP client · endpoints.ts League endpoints · main.tsx React entry · ErrorMessage.tsx Error message
Components 11
Presentation
- React entry
src/main.tsx - App heading
src/App.tsx - Error message
src/components/ErrorMessage.tsx - Loading indicator
src/components/Loader.tsx
Data retrieval
- Fetch hook
src/hooks/useFetch.ts - League endpoints
src/api/endpoints.ts - HTTP client
src/api/client.ts - API settings
src/config.ts
Football data
- Football types
src/types/interfaces.ts
Other components
- Site user
- Football-data API
Connections 8
- Site user → React entry: opens site
src/main.tsx - React entry → App heading: renders
src/main.tsx - League endpoints → HTTP client: requests data
src/api/endpoints.ts - League endpoints → Football types: uses shapes
src/api/endpoints.ts - HTTP client → API settings: reads base URL
src/api/client.ts - HTTP client → Football-data API: sends HTTP requests
- Fetch hook → HTTP client: uses API errors
src/hooks/useFetch.ts - Error message → HTTP client: displays API errors
src/components/ErrorMessage.tsx