# lakshay0708/taskflow-pro architecture

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

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

## Overview

TaskFlow Pro is a single-user dependency-aware Kanban application. Users create and move tasks, link prerequisites, and adjust durations; the API validates changes, persists them, and recalculates schedules, blocking, and critical-path slack for the board. A separate suggestion flow offers AI or keyword-based prerequisites for user approval. The graph reflects documented capabilities as well as sampled source; unsampled API and frontend details limit some wiring claims.

Main entry points: [`main.py`](https://github.com/lakshay0708/taskflow-pro/blob/main/main.py) (HTTP API), [`static/app.js`](https://github.com/lakshay0708/taskflow-pro/blob/main/static/app.js) (Board UI), [`engine.py`](https://github.com/lakshay0708/taskflow-pro/blob/main/engine.py) (Schedule engine), [`ai_suggest.py`](https://github.com/lakshay0708/taskflow-pro/blob/main/ai_suggest.py) (Suggestion logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Board interface"]
  node_frontend["Board UI<br/>[app.js]"]
  node_page["Board page<br/>[index.html]"]
end

subgraph group_api["Application API"]
  node_api_service["HTTP API<br/>[main.py]"]
  node_storage[("SQLite database<br/>[database.py]")]
end

subgraph group_scheduling["Dependency scheduling"]
  node_scheduler["Schedule engine<br/>[engine.py]"]
  node_graph_logic["Graph logic<br/>[graph.py]"]
end

subgraph group_suggestions["Prerequisite suggestions"]
  node_suggestion_logic["Suggestion logic<br/>[ai_suggest.py]"]
end

node_user(("User"))
node_llm["Anthropic API"]

node_user -->|"uses"| node_frontend
node_page -->|"loads"| node_frontend
node_frontend -->|"requests board changes"| node_api_service
node_api_service -->|"returns board data"| node_frontend
node_api_service -->|"reads and writes"| node_storage
node_api_service -->|"recalculates schedules"| node_scheduler
node_scheduler -->|"reads and updates"| node_storage
node_scheduler -->|"orders tasks"| node_graph_logic
node_api_service -->|"checks cycles"| node_graph_logic
node_api_service -->|"requests suggestions"| node_suggestion_logic
node_suggestion_logic -.->|"requests suggestions"| node_llm
node_suggestion_logic -->|"returns candidates"| node_api_service

click node_frontend "https://github.com/lakshay0708/taskflow-pro/blob/main/static/app.js"
click node_page "https://github.com/lakshay0708/taskflow-pro/blob/main/static/index.html"
click node_api_service "https://github.com/lakshay0708/taskflow-pro/blob/main/main.py"
click node_storage "https://github.com/lakshay0708/taskflow-pro/blob/main/database.py"
click node_scheduler "https://github.com/lakshay0708/taskflow-pro/blob/main/engine.py"
click node_graph_logic "https://github.com/lakshay0708/taskflow-pro/blob/main/graph.py"
click node_suggestion_logic "https://github.com/lakshay0708/taskflow-pro/blob/main/ai_suggest.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_frontend,node_page,node_user toneBlue
class node_api_service,node_storage toneAmber
class node_scheduler,node_graph_logic,node_llm toneMint
class node_suggestion_logic toneRose
```

## Components

### Board interface

- [Board UI](https://github.com/lakshay0708/taskflow-pro/blob/main/static/app.js): `static/app.js`
- [Board page](https://github.com/lakshay0708/taskflow-pro/blob/main/static/index.html): `static/index.html`

### Application API

- [HTTP API](https://github.com/lakshay0708/taskflow-pro/blob/main/main.py): `main.py`
- [SQLite database](https://github.com/lakshay0708/taskflow-pro/blob/main/database.py): `database.py`

### Dependency scheduling

- [Schedule engine](https://github.com/lakshay0708/taskflow-pro/blob/main/engine.py): `engine.py`
- [Graph logic](https://github.com/lakshay0708/taskflow-pro/blob/main/graph.py): `graph.py`

### Prerequisite suggestions

- [Suggestion logic](https://github.com/lakshay0708/taskflow-pro/blob/main/ai_suggest.py): `ai_suggest.py`

### Other components

- **User**
- **Anthropic API**

## Connections

- User → Board UI: uses
- Board page → Board UI: loads
- Board UI → HTTP API: requests board changes
- HTTP API → Board UI: returns board data
- HTTP API → SQLite database: reads and writes
- HTTP API → Schedule engine: recalculates schedules
- Schedule engine → SQLite database: reads and updates
- Schedule engine → Graph logic: orders tasks
- HTTP API → Graph logic: checks cycles
- HTTP API → Suggestion logic: requests suggestions
- Suggestion logic → Anthropic API: requests suggestions
- Suggestion logic → HTTP API: returns candidates
