# zimn09/calix architecture

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

- Interactive diagram: https://gitdiagram.com/zimn09/calix
- Repository: https://github.com/zimn09/calix

## Overview

CALIX is an offline calisthenics training desktop app, implemented in Python/PySide6 and Rust/egui, with shared SQLite data. The user workflow spans skill progression and exercise discovery, workout planning and logging, then history, statistics, XP, ranks and achievements; the local Coach can also answer diary questions or prepare workout entries. The graph preserves both editions and the README’s major product areas. Edges rely on the supplied excerpts, SOURCE INDEX references and README; unsampled page internals are represented cautiously rather than inferred as detailed call chains.

Main entry points: [`python/main.py`](https://github.com/zimn09/calix/blob/main/python/main.py) (Desktop shell), [`rust/src/app.rs`](https://github.com/zimn09/calix/blob/main/rust/src/app.rs) (Desktop shell), [`python/xp_engine.py`](https://github.com/zimn09/calix/blob/main/python/xp_engine.py) (XP and achievements), [`rust/src/db.rs`](https://github.com/zimn09/calix/blob/main/rust/src/db.rs) (Local SQLite store)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_python_app["Python desktop"]
  node_py_main["Desktop shell<br/>[main.py]"]
end

subgraph group_rust_app["Rust desktop"]
  node_rust_main["Desktop shell<br/>[app.rs]"]
  node_rust_data["Embedded catalogue<br/>[data.rs]"]
  node_rust_logic["Progression logic<br/>[logic.rs]"]
  node_rust_db[("Local SQLite store<br/>[db.rs]")]
  node_rust_coach_page["Coach interface<br/>[coach.rs]"]
  node_rust_coach["Rule-based Coach<br/>[assistant.rs]"]
  node_rust_pages["Product pages"]
end

subgraph group_domain["Training domain"]
  node_py_tree["Skill progression<br/>[tree_view.py]"]
  node_skill_data["Skill catalogue<br/>[skills_data.py]"]
  node_exercise_data["Exercise library<br/>[exercises_data.py]"]
  node_py_library["Exercise browsing<br/>[library_page.py]"]
  node_py_builder["Workout builder<br/>[builder_page.py]"]
  node_workouts["Workout repository<br/>[workouts.py]"]
  node_py_schedule["Training schedule<br/>[schedule_page.py]"]
  node_py_run["Run logging<br/>[run_page.py]"]
  node_py_history["Training history<br/>[history_page.py]"]
  node_database[("Local training store<br/>[database.py]")]
end

subgraph group_progress["Progress and rewards"]
  node_py_dashboard["Dashboard and stats<br/>[dashboard_page.py]"]
  node_stats["Training statistics<br/>[stats.py]"]
  node_xp_engine["XP and achievements<br/>[xp_engine.py]"]
  node_achievements["Achievement rules<br/>[achievements.py]"]
  node_ranks["Rank progression<br/>[ranks.py]"]
  node_py_profile["Profiles and settings<br/>[profile_page.py]"]
end

subgraph group_coach["Local Coach"]
  node_py_coach_page["Coach interface<br/>[assistant_page.py]"]
  node_py_coach["Rule-based Coach<br/>[assistant.py]"]
end

node_user(("Trainee"))
node_external_net(("Network services"))

node_user -->|"uses"| node_py_main
node_user -->|"uses"| node_rust_main
node_py_main -->|"opens"| node_py_tree
node_py_main -->|"opens"| node_py_library
node_py_main -->|"opens"| node_py_builder
node_py_main -->|"opens"| node_py_schedule
node_py_main -->|"opens"| node_py_run
node_py_main -->|"opens"| node_py_history
node_py_main -->|"opens"| node_py_dashboard
node_py_main -->|"opens"| node_py_profile
node_py_main -->|"opens"| node_py_coach_page
node_py_main -->|"initializes"| node_database
node_py_main -->|"syncs rewards"| node_xp_engine
node_py_tree -->|"renders"| node_skill_data
node_py_builder -->|"uses"| node_workouts
node_py_library -->|"uses"| node_workouts
node_workouts -->|"reads and writes"| node_database
node_py_coach_page -->|"uses"| node_py_coach
node_py_coach -->|"queries"| node_stats
node_py_coach -.->|"logs sessions"| node_database
node_xp_engine -->|"reads and credits"| node_database
node_xp_engine -->|"evaluates"| node_achievements
node_xp_engine -->|"uses"| node_ranks
node_py_dashboard -.->|"shows"| node_stats
node_rust_main -->|"loads"| node_rust_data
node_rust_main -->|"uses"| node_rust_logic
node_rust_main -->|"uses"| node_rust_db
node_rust_main -.->|"dispatches"| node_rust_pages
node_rust_pages -->|"includes"| node_rust_coach_page
node_rust_coach_page -->|"uses"| node_rust_coach
node_rust_coach -->|"queries and logs"| node_rust_db
node_rust_db -->|"uses catalogue"| node_rust_data
node_rust_db -->|"uses rules"| node_rust_logic
node_rust_main -->|"avoids"| node_external_net

click node_py_main "https://github.com/zimn09/calix/blob/main/python/main.py"
click node_py_tree "https://github.com/zimn09/calix/blob/main/python/tree_view.py"
click node_skill_data "https://github.com/zimn09/calix/blob/main/python/skills_data.py"
click node_exercise_data "https://github.com/zimn09/calix/blob/main/python/exercises_data.py"
click node_py_library "https://github.com/zimn09/calix/blob/main/python/library_page.py"
click node_py_builder "https://github.com/zimn09/calix/blob/main/python/builder_page.py"
click node_workouts "https://github.com/zimn09/calix/blob/main/python/workouts.py"
click node_py_schedule "https://github.com/zimn09/calix/blob/main/python/schedule_page.py"
click node_py_run "https://github.com/zimn09/calix/blob/main/python/run_page.py"
click node_py_history "https://github.com/zimn09/calix/blob/main/python/history_page.py"
click node_database "https://github.com/zimn09/calix/blob/main/python/database.py"
click node_py_dashboard "https://github.com/zimn09/calix/blob/main/python/dashboard_page.py"
click node_stats "https://github.com/zimn09/calix/blob/main/python/stats.py"
click node_xp_engine "https://github.com/zimn09/calix/blob/main/python/xp_engine.py"
click node_achievements "https://github.com/zimn09/calix/blob/main/python/achievements.py"
click node_ranks "https://github.com/zimn09/calix/blob/main/python/ranks.py"
click node_py_profile "https://github.com/zimn09/calix/blob/main/python/profile_page.py"
click node_py_coach_page "https://github.com/zimn09/calix/blob/main/python/assistant_page.py"
click node_py_coach "https://github.com/zimn09/calix/blob/main/python/assistant.py"
click node_rust_main "https://github.com/zimn09/calix/blob/main/rust/src/app.rs"
click node_rust_data "https://github.com/zimn09/calix/blob/main/rust/src/data.rs"
click node_rust_logic "https://github.com/zimn09/calix/blob/main/rust/src/logic.rs"
click node_rust_db "https://github.com/zimn09/calix/blob/main/rust/src/db.rs"
click node_rust_coach_page "https://github.com/zimn09/calix/blob/main/rust/src/pages/coach.rs"
click node_rust_coach "https://github.com/zimn09/calix/blob/main/rust/src/assistant.rs"
click node_rust_pages "https://github.com/zimn09/calix/tree/main/rust/src/pages"

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_py_main toneBlue
class node_rust_main,node_rust_data,node_rust_logic,node_rust_db,node_rust_coach_page,node_rust_coach,node_rust_pages toneAmber
class node_py_tree,node_skill_data,node_exercise_data,node_py_library,node_py_builder,node_workouts,node_py_schedule,node_py_run,node_py_history,node_database toneMint
class node_py_dashboard,node_stats,node_xp_engine,node_achievements,node_ranks,node_py_profile toneRose
class node_py_coach_page,node_py_coach,node_user,node_external_net toneIndigo
```

## Components

### Python desktop

- [Desktop shell](https://github.com/zimn09/calix/blob/main/python/main.py): `python/main.py`

### Rust desktop

- [Desktop shell](https://github.com/zimn09/calix/blob/main/rust/src/app.rs): `rust/src/app.rs`
- [Embedded catalogue](https://github.com/zimn09/calix/blob/main/rust/src/data.rs): `rust/src/data.rs`
- [Progression logic](https://github.com/zimn09/calix/blob/main/rust/src/logic.rs): `rust/src/logic.rs`
- [Local SQLite store](https://github.com/zimn09/calix/blob/main/rust/src/db.rs): `rust/src/db.rs`
- [Coach interface](https://github.com/zimn09/calix/blob/main/rust/src/pages/coach.rs): `rust/src/pages/coach.rs`
- [Rule-based Coach](https://github.com/zimn09/calix/blob/main/rust/src/assistant.rs): `rust/src/assistant.rs`
- [Product pages](https://github.com/zimn09/calix/tree/main/rust/src/pages): `rust/src/pages`

### Training domain

- [Skill progression](https://github.com/zimn09/calix/blob/main/python/tree_view.py): `python/tree_view.py`
- [Skill catalogue](https://github.com/zimn09/calix/blob/main/python/skills_data.py): `python/skills_data.py`
- [Exercise library](https://github.com/zimn09/calix/blob/main/python/exercises_data.py): `python/exercises_data.py`
- [Exercise browsing](https://github.com/zimn09/calix/blob/main/python/library_page.py): `python/library_page.py`
- [Workout builder](https://github.com/zimn09/calix/blob/main/python/builder_page.py): `python/builder_page.py`
- [Workout repository](https://github.com/zimn09/calix/blob/main/python/workouts.py): `python/workouts.py`
- [Training schedule](https://github.com/zimn09/calix/blob/main/python/schedule_page.py): `python/schedule_page.py`
- [Run logging](https://github.com/zimn09/calix/blob/main/python/run_page.py): `python/run_page.py`
- [Training history](https://github.com/zimn09/calix/blob/main/python/history_page.py): `python/history_page.py`
- [Local training store](https://github.com/zimn09/calix/blob/main/python/database.py): `python/database.py`

### Progress and rewards

- [Dashboard and stats](https://github.com/zimn09/calix/blob/main/python/dashboard_page.py): `python/dashboard_page.py`
- [Training statistics](https://github.com/zimn09/calix/blob/main/python/stats.py): `python/stats.py`
- [XP and achievements](https://github.com/zimn09/calix/blob/main/python/xp_engine.py): `python/xp_engine.py`
- [Achievement rules](https://github.com/zimn09/calix/blob/main/python/achievements.py): `python/achievements.py`
- [Rank progression](https://github.com/zimn09/calix/blob/main/python/ranks.py): `python/ranks.py`
- [Profiles and settings](https://github.com/zimn09/calix/blob/main/python/profile_page.py): `python/profile_page.py`

### Local Coach

- [Coach interface](https://github.com/zimn09/calix/blob/main/python/assistant_page.py): `python/assistant_page.py`
- [Rule-based Coach](https://github.com/zimn09/calix/blob/main/python/assistant.py): `python/assistant.py`

### Other components

- **Trainee**
- **Network services**

## Connections

- Trainee → Desktop shell: uses
- Trainee → Desktop shell: uses
- Desktop shell → Skill progression: opens (evidence: `python/main.py`)
- Desktop shell → Exercise browsing: opens (evidence: `python/main.py`)
- Desktop shell → Workout builder: opens (evidence: `python/main.py`)
- Desktop shell → Training schedule: opens (evidence: `python/main.py`)
- Desktop shell → Run logging: opens (evidence: `python/main.py`)
- Desktop shell → Training history: opens (evidence: `python/main.py`)
- Desktop shell → Dashboard and stats: opens (evidence: `python/main.py`)
- Desktop shell → Profiles and settings: opens (evidence: `python/main.py`)
- Desktop shell → Coach interface: opens (evidence: `python/main.py`)
- Desktop shell → Local training store: initializes (evidence: `python/main.py`)
- Desktop shell → XP and achievements: syncs rewards (evidence: `python/main.py`)
- Skill progression → Skill catalogue: renders (evidence: `python/tree_view.py`)
- Workout builder → Workout repository: uses (evidence: `python/builder_page.py`)
- Exercise browsing → Workout repository: uses (evidence: `python/library_page.py`)
- Workout repository → Local training store: reads and writes (evidence: `python/workouts.py`)
- Coach interface → Rule-based Coach: uses
- Rule-based Coach → Training statistics: queries (evidence: `python/assistant.py`)
- Rule-based Coach → Local training store: logs sessions
- XP and achievements → Local training store: reads and credits (evidence: `python/xp_engine.py`)
- XP and achievements → Achievement rules: evaluates (evidence: `python/xp_engine.py`)
- XP and achievements → Rank progression: uses (evidence: `python/xp_engine.py`)
- Dashboard and stats → Training statistics: shows
- Desktop shell → Embedded catalogue: loads (evidence: `rust/src/app.rs`)
- Desktop shell → Progression logic: uses (evidence: `rust/src/app.rs`)
- Desktop shell → Local SQLite store: uses (evidence: `rust/src/app.rs`)
- Desktop shell → Product pages: dispatches (evidence: `rust/src/pages/tree.rs`)
- Product pages → Coach interface: includes (evidence: `rust/src/pages/mod.rs`)
- Coach interface → Rule-based Coach: uses (evidence: `rust/src/pages/coach.rs`)
- Rule-based Coach → Local SQLite store: queries and logs (evidence: `rust/src/assistant.rs`)
- Local SQLite store → Embedded catalogue: uses catalogue (evidence: `rust/src/db.rs`)
- Local SQLite store → Progression logic: uses rules (evidence: `rust/src/db.rs`)
- Desktop shell → Network services: avoids
