# r055c/sunderland-leon-fc architecture

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

- Interactive diagram: https://gitdiagram.com/r055c/sunderland-leon-fc
- Repository: https://github.com/r055c/sunderland-leon-fc

## Overview

Sunderland Leon FC is a club results, squad and season-management app. Users view match and tournament records, while staff manage club data and branding; the React app loads and updates that data through Supabase. The sampled code also shows player appearances, match photos, image uploads, tournament summaries and locally cached branding. These feature areas share one large UI module, so the graph separates their responsibilities without implying separate implementations. The README is empty, and the App excerpt is partial; unsampled feature details and relationships are therefore limited to what its imports and shown calls support.

Main entry points: [`src/App.jsx`](https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx) (Club app), [`src/supabase.js`](https://github.com/r055c/sunderland-leon-fc/blob/main/src/supabase.js) (Supabase data API), [`src/main.jsx`](https://github.com/r055c/sunderland-leon-fc/blob/main/src/main.jsx) (React entry), [`src/branding.js`](https://github.com/r055c/sunderland-leon-fc/blob/main/src/branding.js) (Theme and cache)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Club app"]
  node_entry["React entry<br/>[main.jsx]"]
  node_app["Club app<br/>[App.jsx]"]
  node_results["Match results<br/>[App.jsx]"]
  node_seasons["Season records<br/>[App.jsx]"]
  node_tournaments["Tournament summaries<br/>[App.jsx]"]
  node_squad["Players and appearances<br/>[App.jsx]"]
  node_teams["Teams<br/>[App.jsx]"]
  node_photos["Match photos<br/>[App.jsx]"]
  node_branding_ui["Branding settings<br/>[App.jsx]"]
end

subgraph group_data["Club data"]
  node_api["Supabase data API<br/>[supabase.js]"]
  node_db[("Supabase tables")]
  node_storage[("Supabase storage")]
end

subgraph group_brand["Branding"]
  node_brand_logic["Theme and cache<br/>[branding.js]"]
  node_badge["Default badge<br/>[defaultBadge.js]"]
end

node_visitor(("Club user"))

node_visitor -->|"opens app"| node_entry
node_entry -->|"renders"| node_app
node_app -->|"presents"| node_results
node_app -->|"presents"| node_seasons
node_app -->|"builds summaries"| node_tournaments
node_app -->|"manages"| node_squad
node_app -->|"manages"| node_teams
node_app -->|"manages"| node_photos
node_app -->|"configures"| node_branding_ui
node_results -->|"reads and writes"| node_api
node_seasons -->|"reads and writes"| node_api
node_squad -->|"reads and writes"| node_api
node_teams -->|"reads and writes"| node_api
node_photos -->|"reads and writes"| node_api
node_branding_ui -->|"loads and saves"| node_api
node_api -->|"REST requests"| node_db
node_api -->|"uploads images"| node_storage
node_app -->|"applies and caches"| node_brand_logic
node_branding_ui -->|"derives theme"| node_brand_logic
node_app -->|"uses fallback"| node_badge

click node_entry "https://github.com/r055c/sunderland-leon-fc/blob/main/src/main.jsx"
click node_app "https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx"
click node_results "https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx"
click node_seasons "https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx"
click node_tournaments "https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx"
click node_squad "https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx"
click node_teams "https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx"
click node_photos "https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx"
click node_branding_ui "https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx"
click node_api "https://github.com/r055c/sunderland-leon-fc/blob/main/src/supabase.js"
click node_brand_logic "https://github.com/r055c/sunderland-leon-fc/blob/main/src/branding.js"
click node_badge "https://github.com/r055c/sunderland-leon-fc/blob/main/src/defaultBadge.js"

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_entry,node_app,node_results,node_seasons,node_tournaments,node_squad,node_teams,node_photos,node_branding_ui,node_visitor toneBlue
class node_api,node_db,node_storage toneAmber
class node_brand_logic,node_badge toneMint
```

## Components

### Club app

- [React entry](https://github.com/r055c/sunderland-leon-fc/blob/main/src/main.jsx): `src/main.jsx`
- [Club app](https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx): `src/App.jsx`
- [Match results](https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx): `src/App.jsx`
- [Season records](https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx): `src/App.jsx`
- [Tournament summaries](https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx): `src/App.jsx`
- [Players and appearances](https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx): `src/App.jsx`
- [Teams](https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx): `src/App.jsx`
- [Match photos](https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx): `src/App.jsx`
- [Branding settings](https://github.com/r055c/sunderland-leon-fc/blob/main/src/App.jsx): `src/App.jsx`

### Club data

- [Supabase data API](https://github.com/r055c/sunderland-leon-fc/blob/main/src/supabase.js): `src/supabase.js`
- **Supabase tables**
- **Supabase storage**

### Branding

- [Theme and cache](https://github.com/r055c/sunderland-leon-fc/blob/main/src/branding.js): `src/branding.js`
- [Default badge](https://github.com/r055c/sunderland-leon-fc/blob/main/src/defaultBadge.js): `src/defaultBadge.js`

### Other components

- **Club user**

## Connections

- Club user → React entry: opens app
- React entry → Club app: renders (evidence: `src/main.jsx`)
- Club app → Match results: presents (evidence: `src/App.jsx`)
- Club app → Season records: presents (evidence: `src/App.jsx`)
- Club app → Tournament summaries: builds summaries (evidence: `src/App.jsx`)
- Club app → Players and appearances: manages (evidence: `src/App.jsx`)
- Club app → Teams: manages (evidence: `src/App.jsx`)
- Club app → Match photos: manages (evidence: `src/App.jsx`)
- Club app → Branding settings: configures (evidence: `src/App.jsx`)
- Match results → Supabase data API: reads and writes (evidence: `src/App.jsx`)
- Season records → Supabase data API: reads and writes (evidence: `src/App.jsx`)
- Players and appearances → Supabase data API: reads and writes (evidence: `src/App.jsx`)
- Teams → Supabase data API: reads and writes (evidence: `src/App.jsx`)
- Match photos → Supabase data API: reads and writes (evidence: `src/App.jsx`)
- Branding settings → Supabase data API: loads and saves (evidence: `src/App.jsx`)
- Supabase data API → Supabase tables: REST requests (evidence: `src/supabase.js`)
- Supabase data API → Supabase storage: uploads images (evidence: `src/supabase.js`)
- Club app → Theme and cache: applies and caches (evidence: `src/App.jsx`)
- Branding settings → Theme and cache: derives theme (evidence: `src/App.jsx`)
- Club app → Default badge: uses fallback (evidence: `src/App.jsx`)
