# lboehme/griptrack architecture

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

- Interactive diagram: https://gitdiagram.com/lboehme/griptrack
- Repository: https://github.com/lboehme/griptrack
- Video tour (about a minute): https://gitdiagram.com/lboehme/griptrack/video

## Overview

GripTrack is a mobile-first finger-strength training app with a FastAPI server-rendered web interface and an Android WebView shell that can run the backend on-device. The main workflow is to choose a session from Today, follow the guided warmup and work sets, save the session as it progresses, then review strength and climbing trends. Separate product paths cover max testing, plate-aware loading, climbing logs, settings and backup/restore. Router-to-domain wiring is explicit in the README and sampled routes; unsampled subsystem links are omitted where their callers cannot be verified.

Main entry points: [`backend/main.py`](https://github.com/lboehme/griptrack/blob/main/backend/main.py) (FastAPI app), [`backend/db.py`](https://github.com/lboehme/griptrack/blob/main/backend/db.py) (SQLite database), [`backend/routers/settings.py`](https://github.com/lboehme/griptrack/blob/main/backend/routers/settings.py) (Settings routes), [`backend/training_log.py`](https://github.com/lboehme/griptrack/blob/main/backend/training_log.py) (Session logging)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["Clients"]
  node_web["Browser UI"]
  node_android["Android WebView<br/>[MainActivity.kt]"]
  node_embedded["Embedded server<br/>[ServerManager.kt]"]
end

subgraph group_http["HTTP application"]
  node_server["FastAPI app<br/>[main.py]"]
  node_authroutes["Auth routes<br/>[auth.py]"]
  node_deviceroutes["Device sign-in<br/>[device_auth.py]"]
  node_homeroutes["Today routes<br/>[home.py]"]
  node_sessionroutes["Session routes"]
  node_maxroutes["Max-test routes<br/>[max_tests.py]"]
  node_climbroutes["Climb and log routes<br/>[climbs.py]"]
  node_progressroutes["Progress routes<br/>[progress.py]"]
  node_settingsroutes["Settings routes<br/>[settings.py]"]
end

subgraph group_training["Training and insights"]
  node_auth["Identity and access<br/>[auth.py]"]
  node_todayplan["Session planning<br/>[today.py]"]
  node_traininglog["Session logging<br/>[training_log.py]"]
  node_maxplan["Max testing and plans<br/>[plan.py]"]
  node_plates["Plate loading<br/>[plates.py]"]
  node_analytics["Strength analytics<br/>[analytics.py]"]
  node_climbing["Climbing correlation<br/>[climbing.py]"]
  node_archive["Backup and restore<br/>[archive.py]"]
end

subgraph group_records["User records"]
  node_models["Domain records<br/>[models.py]"]
  node_database[("SQLite database<br/>[db.py]")]
end

node_climber(("Climber"))

node_climber -->|"uses"| node_web
node_climber -->|"uses"| node_android
node_web -->|"HTTP requests"| node_server
node_android -->|"starts"| node_embedded
node_embedded -->|"serves locally"| node_server
node_server -->|"registers"| node_authroutes
node_server -.->|"registers on device"| node_deviceroutes
node_server -->|"registers"| node_homeroutes
node_server -->|"registers"| node_sessionroutes
node_server -->|"registers"| node_maxroutes
node_server -->|"registers"| node_climbroutes
node_server -->|"registers"| node_progressroutes
node_server -->|"registers"| node_settingsroutes
node_authroutes -->|"calls"| node_auth
node_deviceroutes -->|"calls"| node_auth
node_homeroutes -->|"calls"| node_todayplan
node_sessionroutes -->|"calls"| node_traininglog
node_maxroutes -->|"calls"| node_maxplan
node_climbroutes -->|"calls"| node_climbing
node_progressroutes -->|"calls"| node_analytics
node_settingsroutes -->|"calls"| node_plates
node_settingsroutes -->|"calls"| node_archive
node_traininglog -->|"uses loading"| node_plates
node_auth -->|"reads and writes"| node_database
node_todayplan -->|"reads"| node_database
node_traininglog -->|"reads and writes"| node_database
node_maxplan -->|"reads and writes"| node_database
node_plates -->|"reads and writes"| node_database
node_analytics -->|"reads"| node_database
node_climbing -->|"reads"| node_database
node_archive -->|"exports and restores"| node_database
node_database -->|"stores"| node_models

click node_web "https://github.com/lboehme/griptrack/tree/main/backend/static"
click node_android "https://github.com/lboehme/griptrack/blob/main/android/app/src/main/java/org/griptrack/app/MainActivity.kt"
click node_server "https://github.com/lboehme/griptrack/blob/main/backend/main.py"
click node_authroutes "https://github.com/lboehme/griptrack/blob/main/backend/routers/auth.py"
click node_deviceroutes "https://github.com/lboehme/griptrack/blob/main/backend/routers/device_auth.py"
click node_homeroutes "https://github.com/lboehme/griptrack/blob/main/backend/routers/home.py"
click node_sessionroutes "https://github.com/lboehme/griptrack/blob/main/backend/routers/training_session.py"
click node_maxroutes "https://github.com/lboehme/griptrack/blob/main/backend/routers/max_tests.py"
click node_climbroutes "https://github.com/lboehme/griptrack/blob/main/backend/routers/climbs.py"
click node_progressroutes "https://github.com/lboehme/griptrack/blob/main/backend/routers/progress.py"
click node_settingsroutes "https://github.com/lboehme/griptrack/blob/main/backend/routers/settings.py"
click node_auth "https://github.com/lboehme/griptrack/blob/main/backend/auth.py"
click node_todayplan "https://github.com/lboehme/griptrack/blob/main/backend/today.py"
click node_traininglog "https://github.com/lboehme/griptrack/blob/main/backend/training_log.py"
click node_maxplan "https://github.com/lboehme/griptrack/blob/main/backend/plan.py"
click node_plates "https://github.com/lboehme/griptrack/blob/main/backend/plates.py"
click node_analytics "https://github.com/lboehme/griptrack/blob/main/backend/analytics.py"
click node_climbing "https://github.com/lboehme/griptrack/blob/main/backend/climbing.py"
click node_archive "https://github.com/lboehme/griptrack/blob/main/backend/archive.py"
click node_models "https://github.com/lboehme/griptrack/blob/main/backend/models.py"
click node_database "https://github.com/lboehme/griptrack/blob/main/backend/db.py"
click node_embedded "https://github.com/lboehme/griptrack/blob/main/android/app/src/main/java/org/griptrack/app/ServerManager.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_web,node_android,node_embedded toneBlue
class node_server,node_authroutes,node_deviceroutes,node_homeroutes,node_sessionroutes,node_maxroutes,node_climbroutes,node_progressroutes,node_settingsroutes toneAmber
class node_auth,node_todayplan,node_traininglog,node_maxplan,node_plates,node_analytics,node_climbing,node_archive toneMint
class node_models,node_database toneRose
class node_climber toneIndigo
```

## Components

### Clients

- [Browser UI](https://github.com/lboehme/griptrack/tree/main/backend/static): `backend/static`
- [Android WebView](https://github.com/lboehme/griptrack/blob/main/android/app/src/main/java/org/griptrack/app/MainActivity.kt): `android/app/src/main/java/org/griptrack/app/MainActivity.kt`
- [Embedded server](https://github.com/lboehme/griptrack/blob/main/android/app/src/main/java/org/griptrack/app/ServerManager.kt): `android/app/src/main/java/org/griptrack/app/ServerManager.kt`

### HTTP application

- [FastAPI app](https://github.com/lboehme/griptrack/blob/main/backend/main.py): `backend/main.py`
- [Auth routes](https://github.com/lboehme/griptrack/blob/main/backend/routers/auth.py): `backend/routers/auth.py`
- [Device sign-in](https://github.com/lboehme/griptrack/blob/main/backend/routers/device_auth.py): `backend/routers/device_auth.py`
- [Today routes](https://github.com/lboehme/griptrack/blob/main/backend/routers/home.py): `backend/routers/home.py`
- [Session routes](https://github.com/lboehme/griptrack/blob/main/backend/routers/training_session.py): `backend/routers/training_session.py`
- [Max-test routes](https://github.com/lboehme/griptrack/blob/main/backend/routers/max_tests.py): `backend/routers/max_tests.py`
- [Climb and log routes](https://github.com/lboehme/griptrack/blob/main/backend/routers/climbs.py): `backend/routers/climbs.py`
- [Progress routes](https://github.com/lboehme/griptrack/blob/main/backend/routers/progress.py): `backend/routers/progress.py`
- [Settings routes](https://github.com/lboehme/griptrack/blob/main/backend/routers/settings.py): `backend/routers/settings.py`

### Training and insights

- [Identity and access](https://github.com/lboehme/griptrack/blob/main/backend/auth.py): `backend/auth.py`
- [Session planning](https://github.com/lboehme/griptrack/blob/main/backend/today.py): `backend/today.py`
- [Session logging](https://github.com/lboehme/griptrack/blob/main/backend/training_log.py): `backend/training_log.py`
- [Max testing and plans](https://github.com/lboehme/griptrack/blob/main/backend/plan.py): `backend/plan.py`
- [Plate loading](https://github.com/lboehme/griptrack/blob/main/backend/plates.py): `backend/plates.py`
- [Strength analytics](https://github.com/lboehme/griptrack/blob/main/backend/analytics.py): `backend/analytics.py`
- [Climbing correlation](https://github.com/lboehme/griptrack/blob/main/backend/climbing.py): `backend/climbing.py`
- [Backup and restore](https://github.com/lboehme/griptrack/blob/main/backend/archive.py): `backend/archive.py`

### User records

- [Domain records](https://github.com/lboehme/griptrack/blob/main/backend/models.py): `backend/models.py`
- [SQLite database](https://github.com/lboehme/griptrack/blob/main/backend/db.py): `backend/db.py`

### Other components

- **Climber**

## Connections

- Climber → Browser UI: uses
- Climber → Android WebView: uses
- Browser UI → FastAPI app: HTTP requests
- Android WebView → Embedded server: starts
- Embedded server → FastAPI app: serves locally
- FastAPI app → Auth routes: registers
- FastAPI app → Device sign-in: registers on device
- FastAPI app → Today routes: registers
- FastAPI app → Session routes: registers
- FastAPI app → Max-test routes: registers
- FastAPI app → Climb and log routes: registers
- FastAPI app → Progress routes: registers
- FastAPI app → Settings routes: registers
- Auth routes → Identity and access: calls
- Device sign-in → Identity and access: calls
- Today routes → Session planning: calls
- Session routes → Session logging: calls
- Max-test routes → Max testing and plans: calls
- Climb and log routes → Climbing correlation: calls
- Progress routes → Strength analytics: calls
- Settings routes → Plate loading: calls
- Settings routes → Backup and restore: calls
- Session logging → Plate loading: uses loading
- Identity and access → SQLite database: reads and writes
- Session planning → SQLite database: reads
- Session logging → SQLite database: reads and writes
- Max testing and plans → SQLite database: reads and writes
- Plate loading → SQLite database: reads and writes
- Strength analytics → SQLite database: reads
- Climbing correlation → SQLite database: reads
- Backup and restore → SQLite database: exports and restores
- SQLite database → Domain records: stores
