# kobevdb06/fitlog architecture

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

- Interactive diagram: https://gitdiagram.com/kobevdb06/fitlog
- Repository: https://github.com/kobevdb06/fitlog

## Overview

FitLog is a Dutch-language, offline-first strength-training log for Android and iOS. Its core user workflow is to create routines, record sets during a workout, and review progress; additional capabilities include exercise browsing, plans, health imports, photos, backups, routine sharing, and an opt-in AI coach. The README establishes the product boundaries, while the excerpts show Android workout-notification and panel behavior. Flutter feature-level call wiring was not sampled, so those links are omitted or marked unverified.

Main entry points: [`lib/features/workout`](https://github.com/kobevdb06/fitlog/tree/main/lib/features/workout) (Active workout), [`lib/core/db`](https://github.com/kobevdb06/fitlog/tree/main/lib/core/db) (On-device database), [`android/app/src/main/kotlin/be/fitlog/app/WorkoutLiveNotice.kt`](https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/WorkoutLiveNotice.kt) (Workout notice), [`android/app/src/main/kotlin/be/fitlog/app/WorkoutActionReceiver.kt`](https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/WorkoutActionReceiver.kt) (Notice actions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Training"]
  node_routines["Routines"]
  node_exercises["Exercise library"]
  node_plans["Training plans"]
  node_workout["Active workout"]
  node_android_notice["Workout notice"]
  node_android_receiver["Notice actions"]
  node_android_panel["Workout panel"]
end

subgraph group_insights["Progress &amp; health"]
  node_history["Workout history"]
  node_progress["Progress &amp; recovery"]
  node_health["Health imports"]
  node_morning_review["Reports &amp; reviews"]
  node_photos["Progress photos"]
end

subgraph group_support["Coaching &amp; tools"]
  node_coach["AI coach"]
  node_readiness["Training readiness"]
  node_backup["Backups"]
  node_sharing["Routine sharing"]
end

subgraph group_platform["Local data &amp; platform"]
  node_app_entry["Flutter app entry<br/>[main.dart]"]
  node_database[("On-device database")]
  node_android_activity["Android bridge<br/>[FitLogActivity.kt]"]
end

node_user(("Lifter"))
node_ai_service{{"Google AI service"}}

node_user -.->|"opens"| node_app_entry
node_user -->|"creates routines"| node_routines
node_user -->|"logs sets"| node_workout
node_user -->|"reviews progress"| node_progress
node_routines -.->|"starts workout"| node_workout
node_workout -.->|"updates notice"| node_android_notice
node_android_receiver -->|"confirms or restores"| node_android_notice
node_android_receiver -->|"requests set tick"| node_workout
node_android_notice -->|"schedules actions"| node_android_receiver
node_android_panel -->|"relays requests"| node_workout
node_android_panel -->|"reads app channel"| node_android_notice
node_android_activity -->|"shows notice"| node_android_notice
node_android_activity -->|"launches panel"| node_android_panel
node_workout -.->|"stores workout"| node_database
node_history -.->|"reads workout log"| node_database
node_progress -.->|"reads training data"| node_database
node_health -.->|"imports on device"| node_database
node_backup -.->|"backs up local data"| node_database
node_user -->|"shares by QR"| node_sharing
node_user -->|"configures API key"| node_coach
node_coach -->|"sends requests"| node_ai_service
node_photos -.->|"stores locally"| node_database

click node_routines "https://github.com/kobevdb06/fitlog/tree/main/lib/features/routines"
click node_exercises "https://github.com/kobevdb06/fitlog/tree/main/lib/features/exercises"
click node_plans "https://github.com/kobevdb06/fitlog/tree/main/lib/features/plans"
click node_workout "https://github.com/kobevdb06/fitlog/tree/main/lib/features/workout"
click node_android_notice "https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/WorkoutLiveNotice.kt"
click node_android_receiver "https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/WorkoutActionReceiver.kt"
click node_android_panel "https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/WorkoutPanelActivity.kt"
click node_history "https://github.com/kobevdb06/fitlog/tree/main/lib/features/history"
click node_progress "https://github.com/kobevdb06/fitlog/tree/main/lib/features/progress"
click node_health "https://github.com/kobevdb06/fitlog/tree/main/lib/features/health"
click node_morning_review "https://github.com/kobevdb06/fitlog/tree/main/lib/features/morning"
click node_photos "https://github.com/kobevdb06/fitlog/tree/main/lib/features/photos"
click node_coach "https://github.com/kobevdb06/fitlog/tree/main/lib/features/chat"
click node_readiness "https://github.com/kobevdb06/fitlog/tree/main/lib/features/readiness"
click node_backup "https://github.com/kobevdb06/fitlog/tree/main/lib/features/backup"
click node_sharing "https://github.com/kobevdb06/fitlog/tree/main/lib/features/share"
click node_app_entry "https://github.com/kobevdb06/fitlog/blob/main/lib/main.dart"
click node_database "https://github.com/kobevdb06/fitlog/tree/main/lib/core/db"
click node_android_activity "https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/FitLogActivity.kt"

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_routines,node_exercises,node_plans,node_workout,node_android_notice,node_android_receiver,node_android_panel toneBlue
class node_history,node_progress,node_health,node_morning_review,node_photos toneAmber
class node_coach,node_readiness,node_backup,node_sharing toneMint
class node_app_entry,node_database,node_android_activity toneRose
class node_user,node_ai_service toneIndigo
```

## Components

### Training

- [Routines](https://github.com/kobevdb06/fitlog/tree/main/lib/features/routines): `lib/features/routines`
- [Exercise library](https://github.com/kobevdb06/fitlog/tree/main/lib/features/exercises): `lib/features/exercises`
- [Training plans](https://github.com/kobevdb06/fitlog/tree/main/lib/features/plans): `lib/features/plans`
- [Active workout](https://github.com/kobevdb06/fitlog/tree/main/lib/features/workout): `lib/features/workout`
- [Workout notice](https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/WorkoutLiveNotice.kt): `android/app/src/main/kotlin/be/fitlog/app/WorkoutLiveNotice.kt`
- [Notice actions](https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/WorkoutActionReceiver.kt): `android/app/src/main/kotlin/be/fitlog/app/WorkoutActionReceiver.kt`
- [Workout panel](https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/WorkoutPanelActivity.kt): `android/app/src/main/kotlin/be/fitlog/app/WorkoutPanelActivity.kt`

### Progress & health

- [Workout history](https://github.com/kobevdb06/fitlog/tree/main/lib/features/history): `lib/features/history`
- [Progress & recovery](https://github.com/kobevdb06/fitlog/tree/main/lib/features/progress): `lib/features/progress`
- [Health imports](https://github.com/kobevdb06/fitlog/tree/main/lib/features/health): `lib/features/health`
- [Reports & reviews](https://github.com/kobevdb06/fitlog/tree/main/lib/features/morning): `lib/features/morning`
- [Progress photos](https://github.com/kobevdb06/fitlog/tree/main/lib/features/photos): `lib/features/photos`

### Coaching & tools

- [AI coach](https://github.com/kobevdb06/fitlog/tree/main/lib/features/chat): `lib/features/chat`
- [Training readiness](https://github.com/kobevdb06/fitlog/tree/main/lib/features/readiness): `lib/features/readiness`
- [Backups](https://github.com/kobevdb06/fitlog/tree/main/lib/features/backup): `lib/features/backup`
- [Routine sharing](https://github.com/kobevdb06/fitlog/tree/main/lib/features/share): `lib/features/share`

### Local data & platform

- [Flutter app entry](https://github.com/kobevdb06/fitlog/blob/main/lib/main.dart): `lib/main.dart`
- [On-device database](https://github.com/kobevdb06/fitlog/tree/main/lib/core/db): `lib/core/db`
- [Android bridge](https://github.com/kobevdb06/fitlog/blob/main/android/app/src/main/kotlin/be/fitlog/app/FitLogActivity.kt): `android/app/src/main/kotlin/be/fitlog/app/FitLogActivity.kt`

### Other components

- **Lifter**
- **Google AI service**

## Connections

- Lifter → Flutter app entry: opens
- Lifter → Routines: creates routines (evidence: `README.md`)
- Lifter → Active workout: logs sets (evidence: `README.md`)
- Lifter → Progress & recovery: reviews progress (evidence: `README.md`)
- Routines → Active workout: starts workout
- Active workout → Workout notice: updates notice
- Notice actions → Workout notice: confirms or restores (evidence: `android/app/src/main/kotlin/be/fitlog/app/WorkoutActionReceiver.kt`)
- Notice actions → Active workout: requests set tick (evidence: `android/app/src/main/kotlin/be/fitlog/app/WorkoutActionReceiver.kt`)
- Workout notice → Notice actions: schedules actions (evidence: `android/app/src/main/kotlin/be/fitlog/app/WorkoutLiveNotice.kt`)
- Workout panel → Active workout: relays requests (evidence: `android/app/src/main/kotlin/be/fitlog/app/WorkoutPanelActivity.kt`)
- Workout panel → Workout notice: reads app channel (evidence: `android/app/src/main/kotlin/be/fitlog/app/WorkoutPanelActivity.kt`)
- Android bridge → Workout notice: shows notice (evidence: `android/app/src/main/kotlin/be/fitlog/app/FitLogActivity.kt`)
- Android bridge → Workout panel: launches panel (evidence: `android/app/src/main/kotlin/be/fitlog/app/FitLogActivity.kt`)
- Active workout → On-device database: stores workout
- Workout history → On-device database: reads workout log
- Progress & recovery → On-device database: reads training data
- Health imports → On-device database: imports on device
- Backups → On-device database: backs up local data
- Lifter → Routine sharing: shares by QR (evidence: `README.md`)
- Lifter → AI coach: configures API key (evidence: `README.md`)
- AI coach → Google AI service: sends requests (evidence: `README.md`)
- Progress photos → On-device database: stores locally
