# a-mabe/openhiit architecture

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

- Interactive diagram: https://gitdiagram.com/a-mabe/openhiit
- Repository: https://github.com/a-mabe/openhiit

## Overview

OpenHIIT is a Flutter interval-workout timer. Its documented user journey is to create and customize intervals, label exercises, save a timer, then run it with visual and audio cues; users can also export or import timer configurations. The tree identifies corresponding UI, provider, model, utility, and persistence areas, but no Dart implementation excerpts were supplied, so internal call relationships are not verified. The graph uses README-backed workflow links and marks inferred connections to internal layers as unverified.

Main entry points: [`lib/features/edit_timer/ui/edit_timer.dart`](https://github.com/a-mabe/openhiit/blob/main/lib/features/edit_timer/ui/edit_timer.dart) (Timer editor), [`lib/features/run_timer/workout.dart`](https://github.com/a-mabe/openhiit/blob/main/lib/features/run_timer/workout.dart) (Workout runner), [`lib/features/home/ui/home.dart`](https://github.com/a-mabe/openhiit/blob/main/lib/features/home/ui/home.dart) (Timer home), [`lib/core/providers/timer_provider/timer_provider.dart`](https://github.com/a-mabe/openhiit/blob/main/lib/core/providers/timer_provider/timer_provider.dart) (Timer state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workout["Workout flow"]
  node_home["Timer home<br/>[home.dart]"]
  node_edit["Timer editor<br/>[edit_timer.dart]"]
  node_intervals["Interval editing<br/>[editor_tab.dart]"]
  node_run["Workout runner<br/>[workout.dart]"]
  node_cues["Audio cues"]
end

subgraph group_timerdata["Timer data"]
  node_timerprovider["Timer state"]
  node_creationprovider["Timer creation"]
  node_intervalprovider["Interval state"]
  node_models["Timer settings"]
  node_calculation["Interval calculations"]
  node_database[("Local database<br/>[database.dart]")]
  node_timerrepo["Timer storage"]
  node_intervalrepo["Interval storage"]
end

subgraph group_sharing["Timer sharing"]
  node_importexport["Import and export"]
  node_fileutil["File handling<br/>[file_util.dart]"]
end

subgraph group_app["App support"]
  node_settings["App settings<br/>[settings.dart]"]
  node_theme["Theme state"]
  node_entry["App entry<br/>[main.dart]"]
end

node_user(("User"))

node_user -->|"creates and customizes"| node_edit
node_edit -->|"sets intervals"| node_intervals
node_user -->|"starts workout"| node_run
node_run -->|"plays cues"| node_cues
node_user -->|"shares configurations"| node_importexport
node_user -.->|"accesses timers"| node_home
node_home -.->|"uses timer state"| node_timerprovider
node_edit -.->|"uses creation state"| node_creationprovider
node_intervals -.->|"uses interval state"| node_intervalprovider
node_run -.->|"uses timer state"| node_timerprovider
node_timerprovider -.->|"persists timers"| node_timerrepo
node_intervalprovider -.->|"persists intervals"| node_intervalrepo
node_timerrepo -.->|"stores records"| node_database
node_intervalrepo -.->|"stores records"| node_database
node_importexport -.->|"handles files"| node_fileutil
node_entry -.->|"opens interface"| node_home

click node_home "https://github.com/a-mabe/openhiit/blob/main/lib/features/home/ui/home.dart"
click node_edit "https://github.com/a-mabe/openhiit/blob/main/lib/features/edit_timer/ui/edit_timer.dart"
click node_intervals "https://github.com/a-mabe/openhiit/blob/main/lib/features/edit_timer/ui/widgets/tabs/editor_tab/editor_tab.dart"
click node_run "https://github.com/a-mabe/openhiit/blob/main/lib/features/run_timer/workout.dart"
click node_cues "https://github.com/a-mabe/openhiit/tree/main/assets/audio"
click node_timerprovider "https://github.com/a-mabe/openhiit/blob/main/lib/core/providers/timer_provider/timer_provider.dart"
click node_creationprovider "https://github.com/a-mabe/openhiit/blob/main/lib/core/providers/timer_creation_provider/timer_creation_provider.dart"
click node_intervalprovider "https://github.com/a-mabe/openhiit/blob/main/lib/core/providers/interval_provider/interval_provider.dart"
click node_models "https://github.com/a-mabe/openhiit/blob/main/lib/core/models/timer_time_settings.dart"
click node_calculation "https://github.com/a-mabe/openhiit/blob/main/lib/core/utils/interval_calculation.dart"
click node_database "https://github.com/a-mabe/openhiit/blob/main/lib/core/db/database.dart"
click node_timerrepo "https://github.com/a-mabe/openhiit/blob/main/lib/core/db/repositories/timer_repository.dart"
click node_intervalrepo "https://github.com/a-mabe/openhiit/blob/main/lib/core/db/repositories/interval_repository.dart"
click node_importexport "https://github.com/a-mabe/openhiit/blob/main/lib/features/import_export_timers/utils/import_export_util.dart"
click node_fileutil "https://github.com/a-mabe/openhiit/blob/main/lib/features/import_export_timers/utils/file_util.dart"
click node_settings "https://github.com/a-mabe/openhiit/blob/main/lib/features/settings/ui/settings.dart"
click node_theme "https://github.com/a-mabe/openhiit/blob/main/lib/core/providers/theme_provider/theme_provider.dart"
click node_entry "https://github.com/a-mabe/openhiit/blob/main/lib/main.dart"

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_home,node_edit,node_intervals,node_run,node_cues,node_user toneBlue
class node_timerprovider,node_creationprovider,node_intervalprovider,node_models,node_calculation,node_database,node_timerrepo,node_intervalrepo toneAmber
class node_importexport,node_fileutil toneMint
class node_settings,node_theme,node_entry toneRose
```

## Components

### Workout flow

- [Timer home](https://github.com/a-mabe/openhiit/blob/main/lib/features/home/ui/home.dart): `lib/features/home/ui/home.dart`
- [Timer editor](https://github.com/a-mabe/openhiit/blob/main/lib/features/edit_timer/ui/edit_timer.dart): `lib/features/edit_timer/ui/edit_timer.dart`
- [Interval editing](https://github.com/a-mabe/openhiit/blob/main/lib/features/edit_timer/ui/widgets/tabs/editor_tab/editor_tab.dart): `lib/features/edit_timer/ui/widgets/tabs/editor_tab/editor_tab.dart`
- [Workout runner](https://github.com/a-mabe/openhiit/blob/main/lib/features/run_timer/workout.dart): `lib/features/run_timer/workout.dart`
- [Audio cues](https://github.com/a-mabe/openhiit/tree/main/assets/audio): `assets/audio`

### Timer data

- [Timer state](https://github.com/a-mabe/openhiit/blob/main/lib/core/providers/timer_provider/timer_provider.dart): `lib/core/providers/timer_provider/timer_provider.dart`
- [Timer creation](https://github.com/a-mabe/openhiit/blob/main/lib/core/providers/timer_creation_provider/timer_creation_provider.dart): `lib/core/providers/timer_creation_provider/timer_creation_provider.dart`
- [Interval state](https://github.com/a-mabe/openhiit/blob/main/lib/core/providers/interval_provider/interval_provider.dart): `lib/core/providers/interval_provider/interval_provider.dart`
- [Timer settings](https://github.com/a-mabe/openhiit/blob/main/lib/core/models/timer_time_settings.dart): `lib/core/models/timer_time_settings.dart`
- [Interval calculations](https://github.com/a-mabe/openhiit/blob/main/lib/core/utils/interval_calculation.dart): `lib/core/utils/interval_calculation.dart`
- [Local database](https://github.com/a-mabe/openhiit/blob/main/lib/core/db/database.dart): `lib/core/db/database.dart`
- [Timer storage](https://github.com/a-mabe/openhiit/blob/main/lib/core/db/repositories/timer_repository.dart): `lib/core/db/repositories/timer_repository.dart`
- [Interval storage](https://github.com/a-mabe/openhiit/blob/main/lib/core/db/repositories/interval_repository.dart): `lib/core/db/repositories/interval_repository.dart`

### Timer sharing

- [Import and export](https://github.com/a-mabe/openhiit/blob/main/lib/features/import_export_timers/utils/import_export_util.dart): `lib/features/import_export_timers/utils/import_export_util.dart`
- [File handling](https://github.com/a-mabe/openhiit/blob/main/lib/features/import_export_timers/utils/file_util.dart): `lib/features/import_export_timers/utils/file_util.dart`

### App support

- [App settings](https://github.com/a-mabe/openhiit/blob/main/lib/features/settings/ui/settings.dart): `lib/features/settings/ui/settings.dart`
- [Theme state](https://github.com/a-mabe/openhiit/blob/main/lib/core/providers/theme_provider/theme_provider.dart): `lib/core/providers/theme_provider/theme_provider.dart`
- [App entry](https://github.com/a-mabe/openhiit/blob/main/lib/main.dart): `lib/main.dart`

### Other components

- **User**

## Connections

- User → Timer editor: creates and customizes (evidence: `README.md`)
- Timer editor → Interval editing: sets intervals (evidence: `README.md`)
- User → Workout runner: starts workout (evidence: `README.md`)
- Workout runner → Audio cues: plays cues (evidence: `README.md`)
- User → Import and export: shares configurations (evidence: `README.md`)
- User → Timer home: accesses timers
- Timer home → Timer state: uses timer state
- Timer editor → Timer creation: uses creation state
- Interval editing → Interval state: uses interval state
- Workout runner → Timer state: uses timer state
- Timer state → Timer storage: persists timers
- Interval state → Interval storage: persists intervals
- Timer storage → Local database: stores records
- Interval storage → Local database: stores records
- Import and export → File handling: handles files
- App entry → Timer home: opens interface
