# jojo165556/tourneo architecture

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

- Interactive diagram: https://gitdiagram.com/jojo165556/tourneo
- Repository: https://github.com/jojo165556/tourneo

## Overview

Tourneo is a Lomé logistics-data pipeline: it generates simulated clients, orders, vehicles and depot data, validates the dataset, provides date-based order queries, computes demand indicators, and visualizes those indicators. The README documents this workflow and the Spark-to-Pandas fallback. The graph includes the shared Lomé reference data as an internal domain layer. Some connections are documented only at pipeline level; unsampled implementation details are not inferred.

Main entry points: [`src/tourneo/analysis.py`](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/analysis.py) (Demand analysis), [`src/tourneo/dashboard.py`](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/dashboard.py) (Plotly visualizations), [`data`](https://github.com/jojo165556/tourneo/tree/main/data) (Logistics dataset), [`src/tourneo/generate.py`](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/generate.py) (Dataset generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_generation["Data generation"]
  node_reference["Lomé reference data<br/>[referentiel.py]"]
  node_generator["Dataset generator<br/>[generate.py]"]
end

subgraph group_quality_access["Quality and access"]
  node_dataset[("Logistics dataset")]
  node_validator["Contract validation<br/>[validate.py]"]
  node_query["Order query access<br/>[storage.py]"]
end

subgraph group_analytics["Analytics and visualization"]
  node_analysis["Demand analysis<br/>[analysis.py]"]
  node_indicators[("Indicator tables<br/>[analysis.py]")]
  node_dashboard["Plotly visualizations<br/>[dashboard.py]"]
  node_html["HTML exports<br/>[dashboard.py]"]
end

node_operator(("Pipeline operator"))
node_optimizer(("Route optimizer"))

node_operator -->|"runs generation"| node_generator
node_generator -->|"uses parameters"| node_reference
node_generator -->|"writes dataset"| node_dataset
node_operator -->|"runs validation"| node_validator
node_validator -->|"checks geography"| node_reference
node_validator -->|"validates tables"| node_dataset
node_operator -->|"runs query"| node_query
node_query -->|"reads orders"| node_dataset
node_optimizer -->|"requests date"| node_query
node_operator -->|"runs analysis"| node_analysis
node_analysis -->|"reads dataset"| node_dataset
node_analysis -->|"writes indicators"| node_indicators
node_analysis -.->|"uses Pandas fallback"| node_indicators
node_operator -->|"runs visualization"| node_dashboard
node_dashboard -->|"uses labels"| node_reference
node_dashboard -->|"reads indicators"| node_indicators
node_dashboard -->|"exports figures"| node_html

click node_reference "https://github.com/jojo165556/tourneo/blob/main/src/tourneo/referentiel.py"
click node_generator "https://github.com/jojo165556/tourneo/blob/main/src/tourneo/generate.py"
click node_dataset "https://github.com/jojo165556/tourneo/tree/main/data"
click node_validator "https://github.com/jojo165556/tourneo/blob/main/src/tourneo/validate.py"
click node_query "https://github.com/jojo165556/tourneo/blob/main/src/tourneo/storage.py"
click node_analysis "https://github.com/jojo165556/tourneo/blob/main/src/tourneo/analysis.py"
click node_indicators "https://github.com/jojo165556/tourneo/blob/main/src/tourneo/analysis.py"
click node_dashboard "https://github.com/jojo165556/tourneo/blob/main/src/tourneo/dashboard.py"
click node_html "https://github.com/jojo165556/tourneo/blob/main/src/tourneo/dashboard.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_reference,node_generator toneBlue
class node_dataset,node_validator,node_query toneAmber
class node_analysis,node_indicators,node_dashboard,node_html,node_optimizer toneMint
class node_operator toneIndigo
```

## Components

### Data generation

- [Lomé reference data](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/referentiel.py): `src/tourneo/referentiel.py`
- [Dataset generator](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/generate.py): `src/tourneo/generate.py`

### Quality and access

- [Logistics dataset](https://github.com/jojo165556/tourneo/tree/main/data): `data`
- [Contract validation](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/validate.py): `src/tourneo/validate.py`
- [Order query access](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/storage.py): `src/tourneo/storage.py`

### Analytics and visualization

- [Demand analysis](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/analysis.py): `src/tourneo/analysis.py`
- [Indicator tables](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/analysis.py): `src/tourneo/analysis.py`
- [Plotly visualizations](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/dashboard.py): `src/tourneo/dashboard.py`
- [HTML exports](https://github.com/jojo165556/tourneo/blob/main/src/tourneo/dashboard.py): `src/tourneo/dashboard.py`

### Other components

- **Pipeline operator**
- **Route optimizer**

## Connections

- Pipeline operator → Dataset generator: runs generation (evidence: `README.md`)
- Dataset generator → Lomé reference data: uses parameters (evidence: `src/tourneo/generate.py`)
- Dataset generator → Logistics dataset: writes dataset (evidence: `README.md`)
- Pipeline operator → Contract validation: runs validation (evidence: `README.md`)
- Contract validation → Lomé reference data: checks geography (evidence: `src/tourneo/validate.py`)
- Contract validation → Logistics dataset: validates tables (evidence: `README.md`)
- Pipeline operator → Order query access: runs query (evidence: `README.md`)
- Order query access → Logistics dataset: reads orders (evidence: `src/tourneo/storage.py`)
- Route optimizer → Order query access: requests date (evidence: `README.md`)
- Pipeline operator → Demand analysis: runs analysis (evidence: `README.md`)
- Demand analysis → Logistics dataset: reads dataset (evidence: `README.md`)
- Demand analysis → Indicator tables: writes indicators (evidence: `README.md`)
- Demand analysis → Indicator tables: uses Pandas fallback (evidence: `src/tourneo/analysis.py`)
- Pipeline operator → Plotly visualizations: runs visualization (evidence: `README.md`)
- Plotly visualizations → Lomé reference data: uses labels (evidence: `src/tourneo/dashboard.py`)
- Plotly visualizations → Indicator tables: reads indicators (evidence: `README.md`)
- Plotly visualizations → HTML exports: exports figures (evidence: `src/tourneo/dashboard.py`)
