# amhu01/bukubesikodsuasana architecture

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

- Interactive diagram: https://gitdiagram.com/amhu01/bukubesikodsuasana
- Repository: https://github.com/amhu01/bukubesikodsuasana

## Overview

IronLog is a workout-tracking mobile app: users record exercises and sets, then review session history, progress, and training statistics, with backup and share-card features. The graph follows the documented screen and data responsibilities; several screen implementations are represented by their exact paths based on the SOURCE INDEX, but their internal calls were not sampled. Accordingly, edges are limited to relationships evidenced by excerpts or the index.

Main entry points: [`src/db/repository.ts`](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/db/repository.ts) (Workout repository), [`src/components/SessionEditor.tsx`](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/SessionEditor.tsx) (Session editor), [`App.tsx`](https://github.com/amhu01/bukubesikodsuasana/blob/main/App.tsx) (App bootstrap), [`src/navigation/RootNavigator.tsx`](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/navigation/RootNavigator.tsx) (Screen navigation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App startup"]
  node_app["App bootstrap<br/>[App.tsx]"]
  node_nav["Screen navigation<br/>[RootNavigator.tsx]"]
end

subgraph group_logging["Workout logging"]
  node_log["Workout logging<br/>[LogScreen.tsx]"]
  node_editor["Session editor<br/>[SessionEditor.tsx]"]
  node_draft["Draft conversion<br/>[sessionDraft.ts]"]
  node_draftstore["Crash draft restore<br/>[draftStore.ts]"]
  node_exercisepicker["Exercise selection<br/>[ExercisePicker.tsx]"]
  node_search["Exercise search"]
end

subgraph group_review["Training review"]
  node_history["Session history<br/>[HistoryScreen.tsx]"]
  node_detail["Session details"]
  node_summary["Session summary"]
  node_progress["Exercise progress<br/>[ProgressScreen.tsx]"]
  node_stats["Training statistics<br/>[StatsScreen.tsx]"]
  node_backup["Backup and restore<br/>[BackupScreen.tsx]"]
  node_share["Share card rendering<br/>[ShareCard.tsx]"]
  node_heatmap["Activity heatmap"]
  node_musclemap["Muscle map<br/>[MuscleMap.tsx]"]
  node_chart["Progress charts<br/>[LineChart.tsx]"]
end

subgraph group_data["Local data"]
  node_db[("SQLite database<br/>[database.ts]")]
  node_repo["Workout repository<br/>[repository.ts]"]
  node_backuputil["Backup serialization<br/>[backup.ts]"]
end

subgraph group_shared["Shared services"]
  node_prefs["User preferences<br/>[prefs.tsx]"]
  node_i18n["English and Malay<br/>[index.ts]"]
  node_theme["Theme system<br/>[theme.ts]"]
  node_types["Workout data types<br/>[index.ts]"]
end

node_user(("Lifter"))

node_user -->|"opens app"| node_app
node_app -->|"opens database"| node_db
node_app -->|"restores draft"| node_draftstore
node_app -->|"loads preferences"| node_prefs
node_app -->|"mounts navigator"| node_nav
node_nav -->|"routes to"| node_log
node_nav -->|"routes to"| node_history
node_nav -->|"routes to"| node_progress
node_nav -->|"routes to"| node_stats
node_nav -->|"routes to"| node_backup
node_log -->|"renders editor"| node_editor
node_log -->|"loads and saves"| node_repo
node_log -->|"uses draft store"| node_draftstore
node_editor -->|"loads last use"| node_repo
node_editor -->|"converts exercises"| node_draft
node_editor -->|"offers selection"| node_exercisepicker
node_exercisepicker -->|"opens search"| node_search
node_detail -->|"loads and updates"| node_repo
node_detail -->|"renders editor"| node_editor
node_detail -->|"converts exercises"| node_draft
node_history -->|"loads sessions"| node_repo
node_summary -->|"loads summary"| node_repo
node_summary -->|"renders share card"| node_share
node_progress -->|"loads progress"| node_repo
node_progress -->|"renders chart"| node_chart
node_progress -->|"renders muscle map"| node_musclemap
node_stats -->|"loads statistics"| node_repo
node_stats -->|"renders heatmap"| node_heatmap
node_stats -->|"renders muscle map"| node_musclemap
node_backup -->|"exports sessions"| node_repo
node_backup -->|"uses backup utilities"| node_backuputil
node_repo -->|"reads and writes"| node_db
node_prefs -->|"persists preferences"| node_repo
node_app -->|"applies theme"| node_theme
node_editor -->|"translates labels"| node_i18n
node_editor -->|"styles controls"| node_theme
node_repo -->|"uses domain types"| node_types
node_backuputil -->|"serializes sessions"| node_types
node_share -->|"renders map"| node_musclemap

click node_app "https://github.com/amhu01/bukubesikodsuasana/blob/main/App.tsx"
click node_nav "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/navigation/RootNavigator.tsx"
click node_log "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/LogScreen.tsx"
click node_editor "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/SessionEditor.tsx"
click node_draft "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/utils/sessionDraft.ts"
click node_draftstore "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/draftStore.ts"
click node_history "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/HistoryScreen.tsx"
click node_detail "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/SessionDetailScreen.tsx"
click node_summary "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/SessionSummaryScreen.tsx"
click node_progress "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/ProgressScreen.tsx"
click node_stats "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/StatsScreen.tsx"
click node_backup "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/BackupScreen.tsx"
click node_share "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/ShareCard.tsx"
click node_db "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/db/database.ts"
click node_repo "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/db/repository.ts"
click node_backuputil "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/utils/backup.ts"
click node_prefs "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/prefs.tsx"
click node_i18n "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/i18n/index.ts"
click node_theme "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/theme.ts"
click node_types "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/types/index.ts"
click node_exercisepicker "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/ExercisePicker.tsx"
click node_search "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/ExerciseSearchModal.tsx"
click node_heatmap "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/ActivityHeatmap.tsx"
click node_musclemap "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/MuscleMap.tsx"
click node_chart "https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/LineChart.tsx"

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_app,node_nav toneBlue
class node_log,node_editor,node_draft,node_draftstore,node_exercisepicker,node_search toneAmber
class node_history,node_detail,node_summary,node_progress,node_stats,node_backup,node_share,node_heatmap,node_musclemap,node_chart toneMint
class node_db,node_repo,node_backuputil toneRose
class node_prefs,node_i18n,node_theme,node_types,node_user toneIndigo
```

## Components

### App startup

- [App bootstrap](https://github.com/amhu01/bukubesikodsuasana/blob/main/App.tsx): `App.tsx`
- [Screen navigation](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/navigation/RootNavigator.tsx): `src/navigation/RootNavigator.tsx`

### Workout logging

- [Workout logging](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/LogScreen.tsx): `src/screens/LogScreen.tsx`
- [Session editor](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/SessionEditor.tsx): `src/components/SessionEditor.tsx`
- [Draft conversion](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/utils/sessionDraft.ts): `src/utils/sessionDraft.ts`
- [Crash draft restore](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/draftStore.ts): `src/draftStore.ts`
- [Exercise selection](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/ExercisePicker.tsx): `src/components/ExercisePicker.tsx`
- [Exercise search](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/ExerciseSearchModal.tsx): `src/components/ExerciseSearchModal.tsx`

### Training review

- [Session history](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/HistoryScreen.tsx): `src/screens/HistoryScreen.tsx`
- [Session details](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/SessionDetailScreen.tsx): `src/screens/SessionDetailScreen.tsx`
- [Session summary](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/SessionSummaryScreen.tsx): `src/screens/SessionSummaryScreen.tsx`
- [Exercise progress](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/ProgressScreen.tsx): `src/screens/ProgressScreen.tsx`
- [Training statistics](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/StatsScreen.tsx): `src/screens/StatsScreen.tsx`
- [Backup and restore](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/screens/BackupScreen.tsx): `src/screens/BackupScreen.tsx`
- [Share card rendering](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/ShareCard.tsx): `src/components/ShareCard.tsx`
- [Activity heatmap](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/ActivityHeatmap.tsx): `src/components/ActivityHeatmap.tsx`
- [Muscle map](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/MuscleMap.tsx): `src/components/MuscleMap.tsx`
- [Progress charts](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/components/LineChart.tsx): `src/components/LineChart.tsx`

### Local data

- [SQLite database](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/db/database.ts): `src/db/database.ts`
- [Workout repository](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/db/repository.ts): `src/db/repository.ts`
- [Backup serialization](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/utils/backup.ts): `src/utils/backup.ts`

### Shared services

- [User preferences](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/prefs.tsx): `src/prefs.tsx`
- [English and Malay](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/i18n/index.ts): `src/i18n/index.ts`
- [Theme system](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/theme.ts): `src/theme.ts`
- [Workout data types](https://github.com/amhu01/bukubesikodsuasana/blob/main/src/types/index.ts): `src/types/index.ts`

### Other components

- **Lifter**

## Connections

- Lifter → App bootstrap: opens app (evidence: `App.tsx`)
- App bootstrap → SQLite database: opens database (evidence: `App.tsx`)
- App bootstrap → Crash draft restore: restores draft (evidence: `App.tsx`)
- App bootstrap → User preferences: loads preferences (evidence: `App.tsx`)
- App bootstrap → Screen navigation: mounts navigator (evidence: `App.tsx`)
- Screen navigation → Workout logging: routes to (evidence: `src/navigation/RootNavigator.tsx`)
- Screen navigation → Session history: routes to (evidence: `src/navigation/RootNavigator.tsx`)
- Screen navigation → Exercise progress: routes to (evidence: `src/navigation/RootNavigator.tsx`)
- Screen navigation → Training statistics: routes to (evidence: `src/navigation/RootNavigator.tsx`)
- Screen navigation → Backup and restore: routes to (evidence: `src/navigation/RootNavigator.tsx`)
- Workout logging → Session editor: renders editor (evidence: `src/screens/LogScreen.tsx`)
- Workout logging → Workout repository: loads and saves (evidence: `src/screens/LogScreen.tsx`)
- Workout logging → Crash draft restore: uses draft store (evidence: `src/screens/LogScreen.tsx`)
- Session editor → Workout repository: loads last use (evidence: `src/components/SessionEditor.tsx`)
- Session editor → Draft conversion: converts exercises (evidence: `src/components/SessionEditor.tsx`)
- Session editor → Exercise selection: offers selection (evidence: `src/components/SessionEditor.tsx`)
- Exercise selection → Exercise search: opens search (evidence: `src/components/ExercisePicker.tsx`)
- Session details → Workout repository: loads and updates (evidence: `src/screens/SessionDetailScreen.tsx`)
- Session details → Session editor: renders editor (evidence: `src/screens/SessionDetailScreen.tsx`)
- Session details → Draft conversion: converts exercises (evidence: `src/screens/SessionDetailScreen.tsx`)
- Session history → Workout repository: loads sessions (evidence: `src/screens/HistoryScreen.tsx`)
- Session summary → Workout repository: loads summary (evidence: `src/screens/SessionSummaryScreen.tsx`)
- Session summary → Share card rendering: renders share card (evidence: `src/screens/SessionSummaryScreen.tsx`)
- Exercise progress → Workout repository: loads progress (evidence: `src/screens/ProgressScreen.tsx`)
- Exercise progress → Progress charts: renders chart (evidence: `src/screens/ProgressScreen.tsx`)
- Exercise progress → Muscle map: renders muscle map (evidence: `src/screens/ProgressScreen.tsx`)
- Training statistics → Workout repository: loads statistics (evidence: `src/screens/StatsScreen.tsx`)
- Training statistics → Activity heatmap: renders heatmap (evidence: `src/screens/StatsScreen.tsx`)
- Training statistics → Muscle map: renders muscle map (evidence: `src/screens/StatsScreen.tsx`)
- Backup and restore → Workout repository: exports sessions (evidence: `src/screens/BackupScreen.tsx`)
- Backup and restore → Backup serialization: uses backup utilities (evidence: `src/screens/BackupScreen.tsx`)
- Workout repository → SQLite database: reads and writes (evidence: `src/db/repository.ts`)
- User preferences → Workout repository: persists preferences (evidence: `src/prefs.tsx`)
- App bootstrap → Theme system: applies theme (evidence: `App.tsx`)
- Session editor → English and Malay: translates labels (evidence: `src/components/SessionEditor.tsx`)
- Session editor → Theme system: styles controls (evidence: `src/components/SessionEditor.tsx`)
- Workout repository → Workout data types: uses domain types (evidence: `src/db/repository.ts`)
- Backup serialization → Workout data types: serializes sessions (evidence: `src/utils/backup.ts`)
- Share card rendering → Muscle map: renders map (evidence: `src/components/ShareCard.tsx`)
