# e-ecstacy/warrior-dashboard architecture

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

- Interactive diagram: https://gitdiagram.com/e-ecstacy/warrior-dashboard
- Repository: https://github.com/e-ecstacy/warrior-dashboard

## Overview

Warrior Dashboard is a self-hosted Flask application that gamifies habit tracking as RPG character progression. The main workflow is to record activities in the browser, submit them to the server, calculate points and stat XP, and persist the resulting character state; users then review progress and use earned points for rewards. The README also describes separate budget, workout, coding, notes, challenge, personal-record, and analytics features. The backend is largely a monolith in app.py, so its domain components share that source path. Some feature wiring is documented but not visible in the sampled excerpts.

Main entry points: [`app.py`](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py) (Flask application), [`static/js/app.js`](https://github.com/e-ecstacy/warrior-dashboard/blob/main/static/js/app.js) (Browser logic), [`templates/index.html`](https://github.com/e-ecstacy/warrior-dashboard/blob/main/templates/index.html) (Dashboard UI), [`db_adapter.py`](https://github.com/e-ecstacy/warrior-dashboard/blob/main/db_adapter.py) (Storage adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_dashboard["Dashboard UI<br/>[index.html]"]
  node_browser_logic["Browser logic<br/>[app.js]"]
  node_quest_logging["Quest logging<br/>[app.js]"]
end

subgraph group_progression["RPG progression"]
  node_character_progression["Character progression<br/>[app.py]"]
  node_streaks_combos["Streaks and combos<br/>[app.py]"]
  node_achievements_skills["Achievements and skills<br/>[app.py]"]
  node_analytics["Analytics and ghost data<br/>[app.py]"]
end

subgraph group_tracking["Life tracking"]
  node_budget["Budget tracker<br/>[app.py]"]
  node_workouts_records["Workouts and records<br/>[app.py]"]
  node_programming_skills["Programming skills<br/>[app.py]"]
  node_notes_planning["Notes and planning<br/>[app.py]"]
  node_challenges_nemesis["Challenges and nemesis<br/>[app.py]"]
end

subgraph group_platform["Application and storage"]
  node_flask_app["Flask application<br/>[app.py]"]
  node_storage_adapter["Storage adapter<br/>[db_adapter.py]"]
  node_persistent_data[("Persistent data")]
end

node_user(("User"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"loads"| node_browser_logic
node_browser_logic -->|"requests API"| node_flask_app
node_quest_logging -.->|"submits activity"| node_flask_app
node_flask_app -->|"uses"| node_storage_adapter
node_storage_adapter -->|"reads and writes"| node_persistent_data
node_flask_app -->|"calculates XP"| node_character_progression
node_character_progression -.->|"updates"| node_streaks_combos
node_flask_app -.->|"serves features"| node_achievements_skills
node_flask_app -->|"serves analytics"| node_analytics
node_browser_logic -->|"submits transactions"| node_budget
node_browser_logic -->|"submits records"| node_workouts_records
node_browser_logic -->|"logs sessions"| node_programming_skills
node_browser_logic -->|"submits notes"| node_notes_planning
node_browser_logic -->|"loads and completes"| node_challenges_nemesis
node_flask_app -.->|"serves feature"| node_budget
node_flask_app -.->|"serves feature"| node_workouts_records
node_flask_app -.->|"serves feature"| node_programming_skills
node_flask_app -.->|"serves feature"| node_notes_planning
node_flask_app -.->|"serves feature"| node_challenges_nemesis

click node_dashboard "https://github.com/e-ecstacy/warrior-dashboard/blob/main/templates/index.html"
click node_browser_logic "https://github.com/e-ecstacy/warrior-dashboard/blob/main/static/js/app.js"
click node_quest_logging "https://github.com/e-ecstacy/warrior-dashboard/blob/main/static/js/app.js"
click node_character_progression "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_streaks_combos "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_achievements_skills "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_analytics "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_budget "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_workouts_records "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_programming_skills "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_notes_planning "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_challenges_nemesis "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_flask_app "https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py"
click node_storage_adapter "https://github.com/e-ecstacy/warrior-dashboard/blob/main/db_adapter.py"
click node_persistent_data "https://github.com/e-ecstacy/warrior-dashboard/tree/main/data"

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_dashboard,node_browser_logic,node_quest_logging,node_user toneBlue
class node_character_progression,node_streaks_combos,node_achievements_skills,node_analytics toneAmber
class node_budget,node_workouts_records,node_programming_skills,node_notes_planning,node_challenges_nemesis toneMint
class node_flask_app,node_storage_adapter,node_persistent_data toneRose
```

## Components

### Web experience

- [Dashboard UI](https://github.com/e-ecstacy/warrior-dashboard/blob/main/templates/index.html): `templates/index.html`
- [Browser logic](https://github.com/e-ecstacy/warrior-dashboard/blob/main/static/js/app.js): `static/js/app.js`
- [Quest logging](https://github.com/e-ecstacy/warrior-dashboard/blob/main/static/js/app.js): `static/js/app.js`

### RPG progression

- [Character progression](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`
- [Streaks and combos](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`
- [Achievements and skills](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`
- [Analytics and ghost data](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`

### Life tracking

- [Budget tracker](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`
- [Workouts and records](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`
- [Programming skills](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`
- [Notes and planning](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`
- [Challenges and nemesis](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`

### Application and storage

- [Flask application](https://github.com/e-ecstacy/warrior-dashboard/blob/main/app.py): `app.py`
- [Storage adapter](https://github.com/e-ecstacy/warrior-dashboard/blob/main/db_adapter.py): `db_adapter.py`
- [Persistent data](https://github.com/e-ecstacy/warrior-dashboard/tree/main/data): `data`

### Other components

- **User**

## Connections

- User → Dashboard UI: uses (evidence: `README.md`)
- Dashboard UI → Browser logic: loads (evidence: `README.md`)
- Browser logic → Flask application: requests API (evidence: `static/js/app.js`)
- Quest logging → Flask application: submits activity
- Flask application → Storage adapter: uses (evidence: `app.py`)
- Storage adapter → Persistent data: reads and writes (evidence: `db_adapter.py`)
- Flask application → Character progression: calculates XP (evidence: `app.py`)
- Character progression → Streaks and combos: updates (evidence: `app.py`)
- Flask application → Achievements and skills: serves features (evidence: `README.md`)
- Flask application → Analytics and ghost data: serves analytics (evidence: `app.py`)
- Browser logic → Budget tracker: submits transactions (evidence: `static/js/app.js`)
- Browser logic → Workouts and records: submits records (evidence: `static/js/app.js`)
- Browser logic → Programming skills: logs sessions (evidence: `static/js/app.js`)
- Browser logic → Notes and planning: submits notes (evidence: `static/js/app.js`)
- Browser logic → Challenges and nemesis: loads and completes (evidence: `static/js/app.js`)
- Flask application → Budget tracker: serves feature (evidence: `README.md`)
- Flask application → Workouts and records: serves feature (evidence: `README.md`)
- Flask application → Programming skills: serves feature (evidence: `README.md`)
- Flask application → Notes and planning: serves feature (evidence: `README.md`)
- Flask application → Challenges and nemesis: serves feature (evidence: `README.md`)
