# farida-gaber44/levc-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/farida-gaber44/levc-dashboard
- Repository: https://github.com/farida-gaber44/levc-dashboard

## Overview

This project turns a team handoff of LEVC maintenance, parts, vehicle-order and VOR data into CSV tables, then presents them in a Streamlit dashboard for fleet overview, part intelligence and vehicle exploration. The main workflow is handoff → base tables → analytical profiles → dashboard. The dashboard also uses the profile builder’s VOR-requirement rule. The excerpts support the main pipeline and dashboard capabilities; internal dashboard details are grouped by product page, and no raw-data contents are present in the repository.

Main entry points: [`src/build_profiles.py`](https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py) (Profile builder), [`app/dashboard.py`](https://github.com/farida-gaber44/levc-dashboard/blob/main/app/dashboard.py) (Streamlit dashboard), [`processed`](https://github.com/farida-gaber44/levc-dashboard/tree/main/processed) (Base CSV tables), [`src/build_base_tables.py`](https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_base_tables.py) (Base-table builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prep["Data preparation"]
  node_base_builder["Base-table builder"]
  node_base_tables[("Base CSV tables")]
end

subgraph group_analytics["Analytical profiles"]
  node_profile_builder["Profile builder<br/>[build_profiles.py]"]
  node_part_usage["Part usage profile<br/>[build_profiles.py]"]
  node_demand_patterns["Demand patterns<br/>[build_profiles.py]"]
  node_part_families["Part families<br/>[build_profiles.py]"]
  node_vehicle_part["Vehicle-part history<br/>[build_profiles.py]"]
  node_vehicle_profile["Vehicle profile<br/>[build_profiles.py]"]
  node_profile_tables[("Profile CSV tables")]
end

subgraph group_app["Dashboard"]
  node_dashboard["Streamlit dashboard<br/>[dashboard.py]"]
  node_overview["Fleet overview<br/>[dashboard.py]"]
  node_part_intelligence["Part intelligence<br/>[dashboard.py]"]
  node_vehicle_explorer["Vehicle explorer<br/>[dashboard.py]"]
end

node_owner(("Project owner"))
node_handoff["Team handoff ZIP"]

node_owner -->|"provides"| node_handoff
node_handoff -->|"input data"| node_base_builder
node_base_builder -->|"writes base tables"| node_base_tables
node_base_tables -->|"input tables"| node_profile_builder
node_profile_builder -->|"writes profiles"| node_profile_tables
node_profile_builder -->|"builds"| node_part_usage
node_profile_builder -->|"classifies"| node_demand_patterns
node_profile_builder -->|"groups candidates"| node_part_families
node_profile_builder -->|"aggregates history"| node_vehicle_part
node_profile_builder -->|"builds"| node_vehicle_profile
node_owner -->|"uses"| node_dashboard
node_base_tables -->|"reads tables"| node_dashboard
node_profile_tables -->|"reads tables"| node_dashboard
node_dashboard -->|"imports VOR rule"| node_profile_builder
node_dashboard -->|"renders"| node_overview
node_dashboard -->|"renders"| node_part_intelligence
node_dashboard -->|"renders"| node_vehicle_explorer

click node_base_builder "https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_base_tables.py"
click node_base_tables "https://github.com/farida-gaber44/levc-dashboard/tree/main/processed"
click node_profile_builder "https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py"
click node_part_usage "https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py"
click node_demand_patterns "https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py"
click node_part_families "https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py"
click node_vehicle_part "https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py"
click node_vehicle_profile "https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py"
click node_profile_tables "https://github.com/farida-gaber44/levc-dashboard/tree/main/processed"
click node_dashboard "https://github.com/farida-gaber44/levc-dashboard/blob/main/app/dashboard.py"
click node_overview "https://github.com/farida-gaber44/levc-dashboard/blob/main/app/dashboard.py"
click node_part_intelligence "https://github.com/farida-gaber44/levc-dashboard/blob/main/app/dashboard.py"
click node_vehicle_explorer "https://github.com/farida-gaber44/levc-dashboard/blob/main/app/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_base_builder,node_base_tables toneBlue
class node_profile_builder,node_part_usage,node_demand_patterns,node_part_families,node_vehicle_part,node_vehicle_profile,node_profile_tables toneAmber
class node_dashboard,node_overview,node_part_intelligence,node_vehicle_explorer toneMint
class node_owner,node_handoff toneIndigo
```

## Components

### Data preparation

- [Base-table builder](https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_base_tables.py): `src/build_base_tables.py`
- [Base CSV tables](https://github.com/farida-gaber44/levc-dashboard/tree/main/processed): `processed`

### Analytical profiles

- [Profile builder](https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py): `src/build_profiles.py`
- [Part usage profile](https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py): `src/build_profiles.py`
- [Demand patterns](https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py): `src/build_profiles.py`
- [Part families](https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py): `src/build_profiles.py`
- [Vehicle-part history](https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py): `src/build_profiles.py`
- [Vehicle profile](https://github.com/farida-gaber44/levc-dashboard/blob/main/src/build_profiles.py): `src/build_profiles.py`
- [Profile CSV tables](https://github.com/farida-gaber44/levc-dashboard/tree/main/processed): `processed`

### Dashboard

- [Streamlit dashboard](https://github.com/farida-gaber44/levc-dashboard/blob/main/app/dashboard.py): `app/dashboard.py`
- [Fleet overview](https://github.com/farida-gaber44/levc-dashboard/blob/main/app/dashboard.py): `app/dashboard.py`
- [Part intelligence](https://github.com/farida-gaber44/levc-dashboard/blob/main/app/dashboard.py): `app/dashboard.py`
- [Vehicle explorer](https://github.com/farida-gaber44/levc-dashboard/blob/main/app/dashboard.py): `app/dashboard.py`

### Other components

- **Project owner**
- **Team handoff ZIP**

## Connections

- Project owner → Team handoff ZIP: provides (evidence: `README.md`)
- Team handoff ZIP → Base-table builder: input data (evidence: `README.md`)
- Base-table builder → Base CSV tables: writes base tables (evidence: `src/build_base_tables.py`)
- Base CSV tables → Profile builder: input tables (evidence: `src/build_profiles.py`)
- Profile builder → Profile CSV tables: writes profiles (evidence: `src/build_profiles.py`)
- Profile builder → Part usage profile: builds (evidence: `src/build_profiles.py`)
- Profile builder → Demand patterns: classifies (evidence: `src/build_profiles.py`)
- Profile builder → Part families: groups candidates (evidence: `src/build_profiles.py`)
- Profile builder → Vehicle-part history: aggregates history (evidence: `src/build_profiles.py`)
- Profile builder → Vehicle profile: builds (evidence: `src/build_profiles.py`)
- Project owner → Streamlit dashboard: uses (evidence: `README.md`)
- Base CSV tables → Streamlit dashboard: reads tables (evidence: `README.md`)
- Profile CSV tables → Streamlit dashboard: reads tables (evidence: `README.md`)
- Streamlit dashboard → Profile builder: imports VOR rule (evidence: `app/dashboard.py`)
- Streamlit dashboard → Fleet overview: renders (evidence: `app/dashboard.py`)
- Streamlit dashboard → Part intelligence: renders (evidence: `app/dashboard.py`)
- Streamlit dashboard → Vehicle explorer: renders (evidence: `app/dashboard.py`)
