# codervipersan/taskflow architecture

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

- Interactive diagram: https://gitdiagram.com/codervipersan/taskflow
- Repository: https://github.com/codervipersan/taskflow

## Overview

TaskFlow is a self-balancing task manager: users track tasks whose scores rise with daily increments and fall on completion, aiming for a total at or below zero. The documented workflow is to manage tasks in the web interface, send requests to the Flask API, and persist task and activity data in SQLite. The sampled `run.py` also implements streaks, achievements, statistics, critical-task lookup, and data transfer. The README documents dashboard, analytics, help, and activity-log capabilities, but their detailed frontend implementation was not sampled; the repository also contains a simpler Vue prototype.

Main entry points: [`run.py`](https://github.com/codervipersan/taskflow/blob/master/run.py) (Task records), [`frontend/index.html`](https://github.com/codervipersan/taskflow/blob/master/frontend/index.html) (Web dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_dashboard["Web dashboard<br/>[index.html]"]
  node_vue_prototype["Vue prototype<br/>[App.vue]"]
end

subgraph group_tasks["Task lifecycle"]
  node_task_api["Task API<br/>[run.py]"]
  node_score_updates["Score and streak updates<br/>[run.py]"]
  node_daily_increment["Daily increments<br/>[run.py]"]
end

subgraph group_insights["Insights and data tools"]
  node_activity_log[("Activity log<br/>[run.py]")]
  node_daily_stats[("Daily statistics<br/>[run.py]")]
  node_achievements[("Achievements<br/>[run.py]")]
  node_summary_api["Dashboard statistics<br/>[run.py]"]
  node_achievement_api["Achievement lookup<br/>[run.py]"]
  node_history_api["Completion history<br/>[run.py]"]
  node_category_api["Category lookup<br/>[run.py]"]
  node_critical_api["Critical task lookup<br/>[run.py]"]
  node_data_transfer["Export and import<br/>[run.py]"]
end

subgraph group_storage["Persistence"]
  node_task_store[("Task records<br/>[run.py]")]
end

node_user(("TaskFlow user"))
node_browser(("Browser"))

node_user -->|"uses"| node_dashboard
node_dashboard -->|"requests task API"| node_task_api
node_browser -.->|"loads"| node_dashboard
node_task_api -->|"reads and writes"| node_task_store
node_score_updates -->|"updates scores"| node_task_store
node_score_updates -->|"records completions"| node_activity_log
node_score_updates -->|"updates completion stats"| node_daily_stats
node_score_updates -->|"checks streak achievements"| node_achievements
node_daily_increment -->|"increments scores"| node_task_store
node_daily_increment -->|"records increment"| node_activity_log
node_summary_api -->|"queries task totals"| node_task_store
node_achievement_api -.->|"reads achievements"| node_achievements
node_history_api -->|"reads daily counts"| node_daily_stats
node_history_api -->|"falls back to logs"| node_activity_log
node_category_api -->|"reads categories"| node_task_store
node_critical_api -->|"finds critical tasks"| node_task_store
node_data_transfer -->|"exports and imports tasks"| node_task_store
node_data_transfer -->|"exports logs"| node_activity_log
node_data_transfer -->|"exports achievements"| node_achievements

click node_dashboard "https://github.com/codervipersan/taskflow/blob/master/frontend/index.html"
click node_vue_prototype "https://github.com/codervipersan/taskflow/blob/master/frontend/src/App.vue"
click node_task_api "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_score_updates "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_daily_increment "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_task_store "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_activity_log "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_daily_stats "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_achievements "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_summary_api "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_achievement_api "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_history_api "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_category_api "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_critical_api "https://github.com/codervipersan/taskflow/blob/master/run.py"
click node_data_transfer "https://github.com/codervipersan/taskflow/blob/master/run.py"

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_vue_prototype,node_browser toneBlue
class node_task_api,node_score_updates,node_daily_increment toneAmber
class node_activity_log,node_daily_stats,node_achievements,node_summary_api,node_achievement_api,node_history_api,node_category_api,node_critical_api,node_data_transfer toneMint
class node_task_store,node_user toneRose
```

## Components

### User interface

- [Web dashboard](https://github.com/codervipersan/taskflow/blob/master/frontend/index.html): `frontend/index.html`
- [Vue prototype](https://github.com/codervipersan/taskflow/blob/master/frontend/src/App.vue): `frontend/src/App.vue`

### Task lifecycle

- [Task API](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Score and streak updates](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Daily increments](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`

### Insights and data tools

- [Activity log](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Daily statistics](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Achievements](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Dashboard statistics](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Achievement lookup](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Completion history](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Category lookup](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Critical task lookup](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`
- [Export and import](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`

### Persistence

- [Task records](https://github.com/codervipersan/taskflow/blob/master/run.py): `run.py`

### Other components

- **TaskFlow user**
- **Browser**

## Connections

- TaskFlow user → Web dashboard: uses (evidence: `README.md`)
- Web dashboard → Task API: requests task API (evidence: `README.md`)
- Browser → Web dashboard: loads
- Task API → Task records: reads and writes (evidence: `run.py`)
- Score and streak updates → Task records: updates scores (evidence: `run.py`)
- Score and streak updates → Activity log: records completions (evidence: `run.py`)
- Score and streak updates → Daily statistics: updates completion stats (evidence: `run.py`)
- Score and streak updates → Achievements: checks streak achievements (evidence: `run.py`)
- Daily increments → Task records: increments scores (evidence: `run.py`)
- Daily increments → Activity log: records increment (evidence: `run.py`)
- Dashboard statistics → Task records: queries task totals (evidence: `run.py`)
- Achievement lookup → Achievements: reads achievements (evidence: `run.py`)
- Completion history → Daily statistics: reads daily counts (evidence: `run.py`)
- Completion history → Activity log: falls back to logs (evidence: `run.py`)
- Category lookup → Task records: reads categories (evidence: `run.py`)
- Critical task lookup → Task records: finds critical tasks (evidence: `run.py`)
- Export and import → Task records: exports and imports tasks (evidence: `run.py`)
- Export and import → Activity log: exports logs (evidence: `run.py`)
- Export and import → Achievements: exports achievements (evidence: `run.py`)
