# rohithkarnati/gym-dude architecture

> Architecture diagram of the GitHub repository rohithkarnati/gym-dude, 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/rohithkarnati/gym-dude
- Repository: https://github.com/rohithkarnati/gym-dude

## Overview

Gym Dude is an offline-first, single-user fitness app. Its main workflow is to plan weekday workouts, open a session, log sets against previous-session targets, and review personal records; the app also supports routine tracking, body-progress logging, and reminders. Flutter screens use Riverpod state and on-device SQLite storage. The README documents these capabilities and the technology choices, but the sampled source contains only the Android Flutter entry point, so internal call relationships are not verified; the graph shows documented relationships rather than inferred implementation details.

Main entry points: [`lib/screens/app_shell.dart`](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/app_shell.dart) (App navigation), [`lib/screens/train/session_logger_screen.dart`](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/train/session_logger_screen.dart) (Session logging), [`lib/data/database.dart`](https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/database.dart) (SQLite database), [`lib/screens/me/settings_screen.dart`](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/me/settings_screen.dart) (Settings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_training["Training"]
  node_workout_plan["Workout planning<br/>[train_screen.dart]"]
  node_session["Session logging"]
  node_pr_history["PR history"]
  node_pr_card["Shareable PR cards"]
end

subgraph group_wellbeing["Daily wellbeing"]
  node_routine["Routine checklist"]
  node_body_progress["Body progress<br/>[body_screen.dart]"]
end

subgraph group_app["App experience"]
  node_app_shell["App navigation<br/>[app_shell.dart]"]
  node_home["Home glance<br/>[home_screen.dart]"]
  node_onboarding["App tour"]
  node_settings["Settings"]
end

subgraph group_state["State and storage"]
  node_database[("SQLite database<br/>[database.dart]")]
  node_workout_data["Workout data access<br/>[workout_dao.dart]"]
  node_routine_data["Routine data access<br/>[routine_dao.dart]"]
  node_body_data["Body data access<br/>[body_dao.dart]"]
  node_settings_data["Settings data access<br/>[settings_dao.dart]"]
end

subgraph group_reminders["Reminders"]
  node_notification_settings["Notification settings state"]
  node_notification_helper["Reminder scheduling"]
  node_notification_service["Local notifications"]
end

node_user(("User"))

node_user -->|"uses"| node_app_shell
node_app_shell -->|"shows home"| node_home
node_home -->|"shows today's plan"| node_workout_plan
node_home -->|"starts workout"| node_session
node_workout_plan -->|"plans sessions"| node_session
node_session -->|"detects records"| node_pr_history
node_pr_history -->|"creates card"| node_pr_card
node_app_shell -->|"provides routine"| node_routine
node_app_shell -->|"provides progress"| node_body_progress
node_app_shell -->|"shows tour"| node_onboarding
node_settings -->|"replays tour"| node_onboarding
node_settings -->|"configures reminders"| node_notification_settings
node_notification_settings -->|"schedules reminders"| node_notification_helper
node_notification_helper -->|"uses service"| node_notification_service
node_workout_plan -.->|"persists plans"| node_workout_data
node_session -.->|"persists sessions"| node_workout_data
node_routine -.->|"persists checklist"| node_routine_data
node_body_progress -.->|"persists entries"| node_body_data
node_settings -.->|"persists preferences"| node_settings_data
node_workout_data -->|"uses SQLite"| node_database
node_routine_data -->|"uses SQLite"| node_database
node_body_data -->|"uses SQLite"| node_database
node_settings_data -->|"uses SQLite"| node_database

click node_app_shell "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/app_shell.dart"
click node_home "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/home/home_screen.dart"
click node_onboarding "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/onboarding/onboarding_screen.dart"
click node_settings "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/me/settings_screen.dart"
click node_workout_plan "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/train/train_screen.dart"
click node_session "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/train/session_logger_screen.dart"
click node_pr_history "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/train/pr_history_screen.dart"
click node_pr_card "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/train/pr_card_screen.dart"
click node_routine "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/routine/routine_screen.dart"
click node_body_progress "https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/me/body_screen.dart"
click node_database "https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/database.dart"
click node_workout_data "https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/workout_dao.dart"
click node_routine_data "https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/routine_dao.dart"
click node_body_data "https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/body_dao.dart"
click node_settings_data "https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/settings_dao.dart"
click node_notification_settings "https://github.com/rohithkarnati/gym-dude/blob/main/lib/providers/settings_providers.dart"
click node_notification_helper "https://github.com/rohithkarnati/gym-dude/blob/main/lib/providers/notification_helper.dart"
click node_notification_service "https://github.com/rohithkarnati/gym-dude/blob/main/lib/services/notification_service.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_workout_plan,node_session,node_pr_history,node_pr_card,node_user toneBlue
class node_routine,node_body_progress toneAmber
class node_app_shell,node_home,node_onboarding,node_settings toneMint
class node_database,node_workout_data,node_routine_data,node_body_data,node_settings_data toneRose
class node_notification_settings,node_notification_helper,node_notification_service toneIndigo
```

## Components

### Training

- [Workout planning](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/train/train_screen.dart): `lib/screens/train/train_screen.dart`
- [Session logging](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/train/session_logger_screen.dart): `lib/screens/train/session_logger_screen.dart`
- [PR history](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/train/pr_history_screen.dart): `lib/screens/train/pr_history_screen.dart`
- [Shareable PR cards](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/train/pr_card_screen.dart): `lib/screens/train/pr_card_screen.dart`

### Daily wellbeing

- [Routine checklist](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/routine/routine_screen.dart): `lib/screens/routine/routine_screen.dart`
- [Body progress](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/me/body_screen.dart): `lib/screens/me/body_screen.dart`

### App experience

- [App navigation](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/app_shell.dart): `lib/screens/app_shell.dart`
- [Home glance](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/home/home_screen.dart): `lib/screens/home/home_screen.dart`
- [App tour](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/onboarding/onboarding_screen.dart): `lib/screens/onboarding/onboarding_screen.dart`
- [Settings](https://github.com/rohithkarnati/gym-dude/blob/main/lib/screens/me/settings_screen.dart): `lib/screens/me/settings_screen.dart`

### State and storage

- [SQLite database](https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/database.dart): `lib/data/database.dart`
- [Workout data access](https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/workout_dao.dart): `lib/data/workout_dao.dart`
- [Routine data access](https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/routine_dao.dart): `lib/data/routine_dao.dart`
- [Body data access](https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/body_dao.dart): `lib/data/body_dao.dart`
- [Settings data access](https://github.com/rohithkarnati/gym-dude/blob/main/lib/data/settings_dao.dart): `lib/data/settings_dao.dart`

### Reminders

- [Notification settings state](https://github.com/rohithkarnati/gym-dude/blob/main/lib/providers/settings_providers.dart): `lib/providers/settings_providers.dart`
- [Reminder scheduling](https://github.com/rohithkarnati/gym-dude/blob/main/lib/providers/notification_helper.dart): `lib/providers/notification_helper.dart`
- [Local notifications](https://github.com/rohithkarnati/gym-dude/blob/main/lib/services/notification_service.dart): `lib/services/notification_service.dart`

### Other components

- **User**

## Connections

- User → App navigation: uses (evidence: `README.md`)
- App navigation → Home glance: shows home (evidence: `README.md`)
- Home glance → Workout planning: shows today's plan (evidence: `README.md`)
- Home glance → Session logging: starts workout (evidence: `README.md`)
- Workout planning → Session logging: plans sessions (evidence: `README.md`)
- Session logging → PR history: detects records (evidence: `README.md`)
- PR history → Shareable PR cards: creates card (evidence: `README.md`)
- App navigation → Routine checklist: provides routine (evidence: `README.md`)
- App navigation → Body progress: provides progress (evidence: `README.md`)
- App navigation → App tour: shows tour (evidence: `README.md`)
- Settings → App tour: replays tour (evidence: `README.md`)
- Settings → Notification settings state: configures reminders (evidence: `README.md`)
- Notification settings state → Reminder scheduling: schedules reminders (evidence: `README.md`)
- Reminder scheduling → Local notifications: uses service (evidence: `README.md`)
- Workout planning → Workout data access: persists plans
- Session logging → Workout data access: persists sessions
- Routine checklist → Routine data access: persists checklist
- Body progress → Body data access: persists entries
- Settings → Settings data access: persists preferences
- Workout data access → SQLite database: uses SQLite (evidence: `README.md`)
- Routine data access → SQLite database: uses SQLite (evidence: `README.md`)
- Body data access → SQLite database: uses SQLite (evidence: `README.md`)
- Settings data access → SQLite database: uses SQLite (evidence: `README.md`)
