# monohighest/samplelabtest1 architecture

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

- Interactive diagram: https://gitdiagram.com/monohighest/samplelabtest1
- Repository: https://github.com/monohighest/samplelabtest1

## Overview

This is a small command-line Fitness Tracker. A user selects an option in the menu; the main loop loads workout records from CSV and dispatches to record display, statistics, or longest-workout reporting. Statistics use duration calculations, while CSV loading turns rows into workout dictionaries. The only runtime implementation is labsample1.py; no README or other product documentation was provided. Edges are based on calls visible in that excerpt.

Main entry points: [`labsample1.py`](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py) (Menu loop), [`workouts.csv`](https://github.com/monohighest/samplelabtest1/blob/main/workouts.csv) (Workout CSV)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["CLI interaction"]
  node_main["Menu loop<br/>[labsample1.py]"]
  node_menu["Menu display<br/>[labsample1.py]"]
  node_records["Record display<br/>[labsample1.py]"]
  node_statistics["Statistics display<br/>[labsample1.py]"]
  node_longest_report["Longest report<br/>[labsample1.py]"]
end

subgraph group_workouts["Workout processing"]
  node_csv_loader["CSV loader<br/>[labsample1.py]"]
  node_csv_data[("Workout CSV<br/>[workouts.csv]")]
  node_longest_calc["Longest workout<br/>[labsample1.py]"]
  node_total_calc["Total duration<br/>[labsample1.py]"]
  node_average_calc["Average duration<br/>[labsample1.py]"]
end

node_user(("User"))

node_user -->|"selects"| node_main
node_main -->|"displays"| node_menu
node_main -->|"loads records"| node_csv_loader
node_csv_loader -->|"reads"| node_csv_data
node_main -->|"dispatches to"| node_records
node_main -->|"dispatches to"| node_statistics
node_main -->|"calls"| node_longest_calc
node_main -->|"prints"| node_longest_report
node_statistics -->|"calls"| node_total_calc
node_statistics -->|"calls"| node_average_calc
node_average_calc -->|"calls"| node_total_calc

click node_main "https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py"
click node_menu "https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py"
click node_records "https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py"
click node_statistics "https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py"
click node_longest_report "https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py"
click node_csv_loader "https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py"
click node_csv_data "https://github.com/monohighest/samplelabtest1/blob/main/workouts.csv"
click node_longest_calc "https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py"
click node_total_calc "https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py"
click node_average_calc "https://github.com/monohighest/samplelabtest1/blob/main/labsample1.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_main,node_menu,node_records,node_statistics,node_longest_report,node_user toneBlue
class node_csv_loader,node_csv_data,node_longest_calc,node_total_calc,node_average_calc toneAmber
```

## Components

### CLI interaction

- [Menu loop](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py): `labsample1.py`
- [Menu display](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py): `labsample1.py`
- [Record display](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py): `labsample1.py`
- [Statistics display](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py): `labsample1.py`
- [Longest report](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py): `labsample1.py`

### Workout processing

- [CSV loader](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py): `labsample1.py`
- [Workout CSV](https://github.com/monohighest/samplelabtest1/blob/main/workouts.csv): `workouts.csv`
- [Longest workout](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py): `labsample1.py`
- [Total duration](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py): `labsample1.py`
- [Average duration](https://github.com/monohighest/samplelabtest1/blob/main/labsample1.py): `labsample1.py`

### Other components

- **User**

## Connections

- User → Menu loop: selects (evidence: `labsample1.py`)
- Menu loop → Menu display: displays (evidence: `labsample1.py`)
- Menu loop → CSV loader: loads records (evidence: `labsample1.py`)
- CSV loader → Workout CSV: reads (evidence: `labsample1.py`)
- Menu loop → Record display: dispatches to (evidence: `labsample1.py`)
- Menu loop → Statistics display: dispatches to (evidence: `labsample1.py`)
- Menu loop → Longest workout: calls (evidence: `labsample1.py`)
- Menu loop → Longest report: prints (evidence: `labsample1.py`)
- Statistics display → Total duration: calls (evidence: `labsample1.py`)
- Statistics display → Average duration: calls (evidence: `labsample1.py`)
- Average duration → Total duration: calls (evidence: `labsample1.py`)
