# lissovkevin/football-stats-explorer architecture

> Architecture diagram of the GitHub repository lissovkevin/football-stats-explorer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lissovkevin/football-stats-explorer
- Repository: https://github.com/lissovkevin/football-stats-explorer

## Overview

Football Stats Explorer is a React frontend for exploring football match data through a GraphQL API. Visitors browse paginated, league-filtered matches, open match details, and view three interactive statistics charts; signed-in users can create, edit, and delete matches. Google OAuth supplies the client-side sign-in flow, while match operations send GraphQL requests directly to the API. The main runtime flow is routed by App; Login and one chart implementation were not excerpted, so their internal API relationships are omitted where unverified.

Main entry points: [`src/App.jsx`](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/App.jsx) (Route Dispatcher), [`src/pages/Home.jsx`](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/Home.jsx) (Statistics Home), [`src/pages/Dashboard.jsx`](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/Dashboard.jsx) (Match Browser), [`src/pages/MatchDetail.jsx`](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/MatchDetail.jsx) (Match Details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["App Routing"]
  node_app["Route Dispatcher<br/>[App.jsx]"]
  node_navbar["Navigation Bar<br/>[Navbar.jsx]"]
end

subgraph group_explore["Match Exploration"]
  node_dashboard["Match Browser<br/>[Dashboard.jsx]"]
  node_detail["Match Details<br/>[MatchDetail.jsx]"]
end

subgraph group_analytics["Statistics Charts"]
  node_home["Statistics Home<br/>[Home.jsx]"]
  node_goals_league["Goals per League<br/>[GoalsPerLeague.jsx]"]
  node_wins_team["Team Wins Chart<br/>[WinsPerTeam.jsx]"]
  node_goals_scored["Scored-Conceded Chart<br/>[GoalsScored.jsx]"]
end

subgraph group_identity["Authentication"]
  node_login["Google Sign-in<br/>[Login.jsx]"]
  node_auth["Session Helpers<br/>[auth.js]"]
end

subgraph group_mutation["Match Management"]
  node_create["Create Match Form<br/>[CreateMatch.jsx]"]
end

node_visitor(("Visitor"))
node_api{{"Football GraphQL API"}}

node_visitor -->|"opens"| node_app
node_app -->|"renders"| node_navbar
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_detail
node_app -->|"routes to"| node_create
node_home -->|"renders"| node_goals_league
node_home -->|"renders"| node_wins_team
node_home -->|"renders"| node_goals_scored
node_navbar -->|"checks session"| node_auth
node_detail -->|"checks session"| node_auth
node_dashboard -->|"queries matches"| node_api
node_dashboard -->|"queries leagues"| node_api
node_detail -->|"queries and mutates"| node_api
node_create -->|"queries and creates"| node_api
node_goals_league -->|"queries matches"| node_api
node_wins_team -->|"queries matches"| node_api
node_goals_scored -->|"queries matches"| node_api
node_login -.->|"exchanges token"| node_api

click node_app "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/App.jsx"
click node_navbar "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/components/Navbar.jsx"
click node_dashboard "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/Dashboard.jsx"
click node_detail "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/MatchDetail.jsx"
click node_home "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/Home.jsx"
click node_goals_league "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/components/charts/GoalsPerLeague.jsx"
click node_wins_team "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/components/charts/WinsPerTeam.jsx"
click node_goals_scored "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/components/charts/GoalsScored.jsx"
click node_login "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/Login.jsx"
click node_auth "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/utils/auth.js"
click node_create "https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/CreateMatch.jsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_navbar toneBlue
class node_dashboard,node_detail toneAmber
class node_home,node_goals_league,node_wins_team,node_goals_scored,node_api toneMint
class node_login,node_auth toneRose
class node_create,node_visitor toneIndigo
```

## Components

### App Routing

- [Route Dispatcher](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/App.jsx): `src/App.jsx`
- [Navigation Bar](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/components/Navbar.jsx): `src/components/Navbar.jsx`

### Match Exploration

- [Match Browser](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/Dashboard.jsx): `src/pages/Dashboard.jsx`
- [Match Details](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/MatchDetail.jsx): `src/pages/MatchDetail.jsx`

### Statistics Charts

- [Statistics Home](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/Home.jsx): `src/pages/Home.jsx`
- [Goals per League](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/components/charts/GoalsPerLeague.jsx): `src/components/charts/GoalsPerLeague.jsx`
- [Team Wins Chart](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/components/charts/WinsPerTeam.jsx): `src/components/charts/WinsPerTeam.jsx`
- [Scored-Conceded Chart](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/components/charts/GoalsScored.jsx): `src/components/charts/GoalsScored.jsx`

### Authentication

- [Google Sign-in](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/Login.jsx): `src/pages/Login.jsx`
- [Session Helpers](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/utils/auth.js): `src/utils/auth.js`

### Match Management

- [Create Match Form](https://github.com/lissovkevin/football-stats-explorer/blob/main/src/pages/CreateMatch.jsx): `src/pages/CreateMatch.jsx`

### Other components

- **Visitor**
- **Football GraphQL API**

## Connections

- Visitor → Route Dispatcher: opens (evidence: `src/App.jsx`)
- Route Dispatcher → Navigation Bar: renders (evidence: `src/App.jsx`)
- Route Dispatcher → Statistics Home: routes to (evidence: `src/App.jsx`)
- Route Dispatcher → Match Browser: routes to (evidence: `src/App.jsx`)
- Route Dispatcher → Google Sign-in: routes to (evidence: `src/App.jsx`)
- Route Dispatcher → Match Details: routes to (evidence: `src/App.jsx`)
- Route Dispatcher → Create Match Form: routes to (evidence: `src/App.jsx`)
- Statistics Home → Goals per League: renders (evidence: `src/pages/Home.jsx`)
- Statistics Home → Team Wins Chart: renders (evidence: `src/pages/Home.jsx`)
- Statistics Home → Scored-Conceded Chart: renders (evidence: `src/pages/Home.jsx`)
- Navigation Bar → Session Helpers: checks session (evidence: `src/components/Navbar.jsx`)
- Match Details → Session Helpers: checks session (evidence: `src/pages/MatchDetail.jsx`)
- Match Browser → Football GraphQL API: queries matches (evidence: `src/pages/Dashboard.jsx`)
- Match Browser → Football GraphQL API: queries leagues (evidence: `src/pages/Dashboard.jsx`)
- Match Details → Football GraphQL API: queries and mutates (evidence: `src/pages/MatchDetail.jsx`)
- Create Match Form → Football GraphQL API: queries and creates (evidence: `src/pages/CreateMatch.jsx`)
- Goals per League → Football GraphQL API: queries matches (evidence: `src/components/charts/GoalsPerLeague.jsx`)
- Team Wins Chart → Football GraphQL API: queries matches (evidence: `src/components/charts/WinsPerTeam.jsx`)
- Scored-Conceded Chart → Football GraphQL API: queries matches (evidence: `src/components/charts/GoalsScored.jsx`)
- Google Sign-in → Football GraphQL API: exchanges token
