# marcle-bert26-ui/strava_analyse architecture

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

- Interactive diagram: https://gitdiagram.com/marcle-bert26-ui/strava_analyse
- Repository: https://github.com/marcle-bert26-ui/strava_analyse

## Overview

Strava Analyse is a local desktop and command-line tool for turning a Strava activities CSV into training summaries and visualizations. The main workflow is to select or provide the CSV, normalize its dates, encoding and activity fields, then explore sport-filtered monthly or weekly distance, a monthly calendar and running records—or produce a text report and PNG charts in report mode. The README documents these capabilities; edges below are limited to relationships shown in the excerpts or README, not unsampled implementation details.

Main entry points: [`strava_analyse/cli.py`](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/cli.py) (CLI router), [`strava_analyse/dashboard.py`](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/dashboard.py) (Dashboard), [`strava_analyse/loading.py`](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/loading.py) (CSV normalization), [`strava_analyse/stats.py`](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/stats.py) (Analysis functions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry points"]
  node_main["Script entry<br/>[main.py]"]
  node_cli["CLI router<br/>[cli.py]"]
end

subgraph group_data["Import and analysis"]
  node_loading["CSV normalization<br/>[loading.py]"]
  node_stats["Analysis functions<br/>[stats.py]"]
end

subgraph group_views["User-facing results"]
  node_dashboard["Dashboard<br/>[dashboard.py]"]
  node_gui_results["Interactive views<br/>[dashboard.py]"]
  node_report["Text report<br/>[stats.py]"]
  node_chart_export["PNG charts<br/>[cli.py]"]
end

node_user(("Local user"))
node_csv["Strava CSV"]
node_output["Report files"]

node_user -->|"launches"| node_main
node_main -->|"calls"| node_cli
node_cli -->|"launches"| node_dashboard
node_user -->|"provides"| node_csv
node_csv -->|"reads"| node_loading
node_cli -->|"loads"| node_loading
node_dashboard -->|"loads"| node_loading
node_loading -->|"normalizes for"| node_stats
node_dashboard -->|"calls"| node_stats
node_cli -->|"calls"| node_stats
node_dashboard -->|"renders"| node_gui_results
node_stats -->|"formats"| node_report
node_cli -->|"prints"| node_report
node_cli -->|"exports"| node_chart_export
node_chart_export -->|"writes"| node_output
node_user -->|"interacts"| node_dashboard

click node_main "https://github.com/marcle-bert26-ui/strava_analyse/blob/main/main.py"
click node_cli "https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/cli.py"
click node_dashboard "https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/dashboard.py"
click node_loading "https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/loading.py"
click node_stats "https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/stats.py"
click node_gui_results "https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/dashboard.py"
click node_report "https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/stats.py"
click node_chart_export "https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/cli.py"
click node_output "https://github.com/marcle-bert26-ui/strava_analyse/tree/main/output"

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_main,node_cli,node_user toneBlue
class node_loading,node_stats toneAmber
class node_dashboard,node_gui_results,node_report,node_chart_export toneMint
class node_csv toneIndigo
class node_output toneTeal
```

## Components

### Entry points

- [Script entry](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/main.py): `main.py`
- [CLI router](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/cli.py): `strava_analyse/cli.py`

### Import and analysis

- [CSV normalization](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/loading.py): `strava_analyse/loading.py`
- [Analysis functions](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/stats.py): `strava_analyse/stats.py`

### User-facing results

- [Dashboard](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/dashboard.py): `strava_analyse/dashboard.py`
- [Interactive views](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/dashboard.py): `strava_analyse/dashboard.py`
- [Text report](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/stats.py): `strava_analyse/stats.py`
- [PNG charts](https://github.com/marcle-bert26-ui/strava_analyse/blob/main/strava_analyse/cli.py): `strava_analyse/cli.py`

### Other components

- **Local user**
- **Strava CSV**
- [Report files](https://github.com/marcle-bert26-ui/strava_analyse/tree/main/output): `output`

## Connections

- Local user → Script entry: launches (evidence: `README.md`)
- Script entry → CLI router: calls (evidence: `main.py`)
- CLI router → Dashboard: launches (evidence: `strava_analyse/cli.py`)
- Local user → Strava CSV: provides (evidence: `README.md`)
- Strava CSV → CSV normalization: reads (evidence: `README.md`)
- CLI router → CSV normalization: loads (evidence: `strava_analyse/cli.py`)
- Dashboard → CSV normalization: loads (evidence: `README.md`)
- CSV normalization → Analysis functions: normalizes for (evidence: `strava_analyse/stats.py`)
- Dashboard → Analysis functions: calls (evidence: `strava_analyse/dashboard.py`)
- CLI router → Analysis functions: calls (evidence: `strava_analyse/cli.py`)
- Dashboard → Interactive views: renders (evidence: `strava_analyse/dashboard.py`)
- Analysis functions → Text report: formats (evidence: `strava_analyse/stats.py`)
- CLI router → Text report: prints (evidence: `strava_analyse/cli.py`)
- CLI router → PNG charts: exports (evidence: `strava_analyse/cli.py`)
- PNG charts → Report files: writes (evidence: `README.md`)
- Local user → Dashboard: interacts (evidence: `README.md`)
