# ryankhou/project_dataengineering_khou_le architecture

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

- Interactive diagram: https://gitdiagram.com/ryankhou/project_dataengineering_khou_le
- Repository: https://github.com/ryankhou/project_dataengineering_khou_le

## Overview

Fort Boyard performance data flows from the source website through scraping and MongoDB into a Dash dashboard. The scraper discovers recent teams, extracts team details and images, and stores records; the dashboard waits for a readiness signal, loads records, prepares analyses, and presents charts and team search. The README documents MongoDB, shared readiness storage, and the dashboard’s capabilities. Unsampled deployment wiring and some callback details are not mapped beyond those documented or visible in the excerpts.

Main entry points: [`app/visualization.py`](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py) (Dash application), [`app/values.py`](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/values.py) (Data loading), [`scraper/data_collecting.py`](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/scraper/data_collecting.py) (Scraper workflow), [`app/main.py`](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/main.py) (Dashboard entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Data collection"]
  node_scraper["Scraper workflow<br/>[data_collecting.py]"]
  node_team_discovery["Team discovery<br/>[data_collecting.py]"]
  node_team_extraction["Team extraction<br/>[data_collecting.py]"]
  node_image_capture["Image capture<br/>[data_collecting.py]"]
end

subgraph group_storage["Persistence"]
  node_mongo[("MongoDB")]
  node_team_records[("Team records")]
  node_readiness["Scrape readiness"]
end

subgraph group_analysis["Analysis"]
  node_data_loader["Data loading<br/>[values.py]"]
  node_chart_metrics["Chart metrics<br/>[values.py]"]
  node_time_conversion["Time conversion<br/>[values.py]"]
end

subgraph group_dashboard["Dashboard"]
  node_dashboard_entry["Dashboard entry<br/>[main.py]"]
  node_dashboard_app["Dash application<br/>[visualization.py]"]
  node_readiness_gate["Readiness gate<br/>[visualization.py]"]
  node_dashboard_views["Dashboard views<br/>[visualization.py]"]
  node_team_search["Team search<br/>[visualization.py]"]
  node_team_table["Team details<br/>[visualization.py]"]
end

node_viewer(("Dashboard user"))
node_source_site["Fort Boyard site"]

node_scraper -->|"runs"| node_team_discovery
node_team_discovery -->|"fetches pages"| node_source_site
node_team_discovery -->|"scrapes teams"| node_team_extraction
node_team_extraction -->|"fetches subpages"| node_source_site
node_team_extraction -->|"captures image"| node_image_capture
node_image_capture -->|"downloads image"| node_source_site
node_image_capture -->|"stores image"| node_mongo
node_scraper -->|"checks and inserts"| node_team_records
node_scraper -->|"writes signal"| node_readiness
node_dashboard_entry -->|"creates app"| node_dashboard_app
node_dashboard_app -->|"defines callback"| node_readiness_gate
node_readiness_gate -->|"checks signal"| node_readiness
node_data_loader -->|"reads records"| node_team_records
node_data_loader -->|"queries collection"| node_mongo
node_data_loader -->|"prepares charts"| node_chart_metrics
node_chart_metrics -->|"converts times"| node_time_conversion
node_dashboard_app -->|"imports data and figures"| node_data_loader
node_dashboard_app -->|"renders tabs"| node_dashboard_views
node_dashboard_app -->|"updates search"| node_team_search
node_dashboard_app -->|"updates details"| node_team_table
node_viewer -.->|"opens dashboard"| node_dashboard_entry

click node_scraper "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/scraper/data_collecting.py"
click node_team_discovery "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/scraper/data_collecting.py"
click node_team_extraction "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/scraper/data_collecting.py"
click node_image_capture "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/scraper/data_collecting.py"
click node_data_loader "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/values.py"
click node_chart_metrics "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/values.py"
click node_time_conversion "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/values.py"
click node_dashboard_entry "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/main.py"
click node_dashboard_app "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py"
click node_readiness_gate "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py"
click node_dashboard_views "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py"
click node_team_search "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py"
click node_team_table "https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py"

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_scraper,node_team_discovery,node_team_extraction,node_image_capture,node_viewer toneBlue
class node_mongo,node_team_records,node_readiness toneAmber
class node_data_loader,node_chart_metrics,node_time_conversion toneMint
class node_dashboard_entry,node_dashboard_app,node_readiness_gate,node_dashboard_views,node_team_search,node_team_table toneRose
class node_source_site toneIndigo
```

## Components

### Data collection

- [Scraper workflow](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/scraper/data_collecting.py): `scraper/data_collecting.py`
- [Team discovery](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/scraper/data_collecting.py): `scraper/data_collecting.py`
- [Team extraction](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/scraper/data_collecting.py): `scraper/data_collecting.py`
- [Image capture](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/scraper/data_collecting.py): `scraper/data_collecting.py`

### Persistence

- **MongoDB**
- **Team records**
- **Scrape readiness**

### Analysis

- [Data loading](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/values.py): `app/values.py`
- [Chart metrics](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/values.py): `app/values.py`
- [Time conversion](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/values.py): `app/values.py`

### Dashboard

- [Dashboard entry](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/main.py): `app/main.py`
- [Dash application](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py): `app/visualization.py`
- [Readiness gate](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py): `app/visualization.py`
- [Dashboard views](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py): `app/visualization.py`
- [Team search](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py): `app/visualization.py`
- [Team details](https://github.com/ryankhou/project_dataengineering_khou_le/blob/main/app/visualization.py): `app/visualization.py`

### Other components

- **Dashboard user**
- **Fort Boyard site**

## Connections

- Scraper workflow → Team discovery: runs (evidence: `scraper/data_collecting.py`)
- Team discovery → Fort Boyard site: fetches pages (evidence: `scraper/data_collecting.py`)
- Team discovery → Team extraction: scrapes teams (evidence: `scraper/data_collecting.py`)
- Team extraction → Fort Boyard site: fetches subpages (evidence: `scraper/data_collecting.py`)
- Team extraction → Image capture: captures image (evidence: `scraper/data_collecting.py`)
- Image capture → Fort Boyard site: downloads image (evidence: `scraper/data_collecting.py`)
- Image capture → MongoDB: stores image (evidence: `scraper/data_collecting.py`)
- Scraper workflow → Team records: checks and inserts (evidence: `scraper/data_collecting.py`)
- Scraper workflow → Scrape readiness: writes signal (evidence: `scraper/data_collecting.py`)
- Dashboard entry → Dash application: creates app (evidence: `app/main.py`)
- Dash application → Readiness gate: defines callback (evidence: `app/visualization.py`)
- Readiness gate → Scrape readiness: checks signal (evidence: `app/visualization.py`)
- Data loading → Team records: reads records (evidence: `README.md`)
- Data loading → MongoDB: queries collection (evidence: `app/values.py`)
- Data loading → Chart metrics: prepares charts (evidence: `app/values.py`)
- Chart metrics → Time conversion: converts times (evidence: `app/values.py`)
- Dash application → Data loading: imports data and figures (evidence: `app/visualization.py`)
- Dash application → Dashboard views: renders tabs (evidence: `app/visualization.py`)
- Dash application → Team search: updates search (evidence: `app/visualization.py`)
- Dash application → Team details: updates details (evidence: `app/visualization.py`)
- Dashboard user → Dashboard entry: opens dashboard (evidence: `README.md`)
