# bbenz/football-results-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/bbenz/football-results-dashboard
- Repository: https://github.com/bbenz/football-results-dashboard

## Overview

This is a football-insights application: a browser user asks questions about international football, deterministic analytics produce figures and charts, and an AI agent explains those results with grounding checks. The documented runtime includes a web UI, an internal insights service, a curated DuckDB/Parquet store, and a separate ingest job. The README also documents data download and verification, seven analytics topics, and optional Foundry model access. Source excerpts were unavailable, so links are limited to relationships the README states explicitly.

Main entry points: [`demo/src/football_insights/insights`](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/insights) (Insights service), [`demo/src/football_insights/agent`](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/agent) (AI agent), [`demo/src/football_insights/web`](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/web) (Web UI), [`demo/src/football_insights/ingest`](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/ingest) (Data ingest job)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web["Web UI"]
  node_insights["Insights service"]
end

subgraph group_analysis["Insights and analytics"]
  node_agent["AI agent"]
  node_analytics["Football analytics"]
  node_grounding["Answer grounding<br/>[grounding.py]"]
end

subgraph group_data["Data lifecycle"]
  node_store[("Curated DuckDB and Parquet<br/>[store.py]")]
  node_ingest["Data ingest job"]
  node_data_download["Data download and verification"]
end

node_browser(("Browser user"))
node_source_data[("Downloaded football and development data")]
node_foundry["Microsoft Foundry"]

node_browser -->|"asks questions"| node_web
node_web -->|"sends requests"| node_insights
node_insights -->|"reads data"| node_store
node_insights -->|"uses agent"| node_agent
node_agent -->|"calls tools"| node_analytics
node_agent -->|"checks numbers"| node_grounding
node_insights -.->|"requests model"| node_foundry
node_source_data -->|"supplies data"| node_ingest
node_ingest -->|"writes curated data"| node_store
node_source_data -.->|"downloaded by"| node_data_download

click node_web "https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/web"
click node_insights "https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/insights"
click node_agent "https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/agent"
click node_analytics "https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/analytics"
click node_grounding "https://github.com/bbenz/football-results-dashboard/blob/main/demo/src/football_insights/agent/grounding.py"
click node_store "https://github.com/bbenz/football-results-dashboard/blob/main/demo/src/football_insights/store.py"
click node_ingest "https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/ingest"
click node_data_download "https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/data"

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_web,node_insights,node_browser toneBlue
class node_agent,node_analytics,node_grounding,node_source_data toneAmber
class node_store,node_ingest,node_data_download toneMint
class node_foundry toneIndigo
```

## Components

### User experience

- [Web UI](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/web): `demo/src/football_insights/web`
- [Insights service](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/insights): `demo/src/football_insights/insights`

### Insights and analytics

- [AI agent](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/agent): `demo/src/football_insights/agent`
- [Football analytics](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/analytics): `demo/src/football_insights/analytics`
- [Answer grounding](https://github.com/bbenz/football-results-dashboard/blob/main/demo/src/football_insights/agent/grounding.py): `demo/src/football_insights/agent/grounding.py`

### Data lifecycle

- [Curated DuckDB and Parquet](https://github.com/bbenz/football-results-dashboard/blob/main/demo/src/football_insights/store.py): `demo/src/football_insights/store.py`
- [Data ingest job](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/ingest): `demo/src/football_insights/ingest`
- [Data download and verification](https://github.com/bbenz/football-results-dashboard/tree/main/demo/src/football_insights/data): `demo/src/football_insights/data`

### Other components

- **Browser user**
- **Downloaded football and development data**
- **Microsoft Foundry**

## Connections

- Browser user → Web UI: asks questions (evidence: `README.md`)
- Web UI → Insights service: sends requests (evidence: `README.md`)
- Insights service → Curated DuckDB and Parquet: reads data (evidence: `README.md`)
- Insights service → AI agent: uses agent (evidence: `README.md`)
- AI agent → Football analytics: calls tools (evidence: `README.md`)
- AI agent → Answer grounding: checks numbers (evidence: `README.md`)
- Insights service → Microsoft Foundry: requests model (evidence: `README.md`)
- Downloaded football and development data → Data ingest job: supplies data (evidence: `README.md`)
- Data ingest job → Curated DuckDB and Parquet: writes curated data (evidence: `README.md`)
- Downloaded football and development data → Data download and verification: downloaded by
