# adarshamu/task_management_system architecture

> Architecture diagram of the GitHub repository adarshamu/task_management_system, 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/adarshamu/task_management_system
- Repository: https://github.com/adarshamu/task_management_system

## Overview

This Flask task-management system serves Heads of Department (HoDs) and lecturers through role-specific web pages. HoDs register users, assign and manage departmental tasks, and review leave requests; lecturers view assigned work, update progress, comment, request leave, and upload materials. The central runtime is app.py, which handles routes, session checks, business rules, SQLite access, and template rendering. The excerpts show the main task, dashboard, comment, progress, and leave workflows; other route details are not fully sampled.

Main entry points: [`app.py`](https://github.com/adarshamu/task_management_system/blob/main/app.py) (Flask routes), [`templates/dashboard_lecturer.html`](https://github.com/adarshamu/task_management_system/blob/main/templates/dashboard_lecturer.html) (Lecturer dashboard), [`templates/add_task.html`](https://github.com/adarshamu/task_management_system/blob/main/templates/add_task.html) (Task forms), [`templates/edit_task.html`](https://github.com/adarshamu/task_management_system/blob/main/templates/edit_task.html) (Edit task form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_flask["Flask routes<br/>[app.py]"]
  node_hod_view["HoD dashboard<br/>[dashboard_hod.html]"]
  node_lecturer_view["Lecturer dashboard"]
  node_auth_views["Account pages<br/>[login.html]"]
  node_register_view["Registration page<br/>[register.html]"]
  node_forgot_view["Password recovery"]
end

subgraph group_work["Task management"]
  node_task_forms["Task forms<br/>[add_task.html]"]
  node_edit_form["Edit task form<br/>[edit_task.html]"]
  node_task_ops["Task operations<br/>[app.py]"]
  node_comments["Task comments<br/>[app.py]"]
end

subgraph group_people["People and leave"]
  node_leave_ops["Leave requests<br/>[app.py]"]
  node_accounts["User accounts<br/>[app.py]"]
  node_upload_ops["Lecturer uploads<br/>[app.py]"]
end

subgraph group_data["Persistence"]
  node_task_state[("Task records<br/>[app.py]")]
  node_assignments[("Task assignments<br/>[app.py]")]
  node_leave_state[("Leave records<br/>[app.py]")]
end

node_hod(("HoD"))
node_lecturer(("Lecturer"))

node_hod -->|"submits requests"| node_flask
node_lecturer -->|"submits requests"| node_flask
node_flask -->|"renders dashboard"| node_hod_view
node_flask -->|"renders dashboard"| node_lecturer_view
node_flask -.->|"renders pages"| node_auth_views
node_flask -.->|"renders page"| node_register_view
node_flask -.->|"renders page"| node_forgot_view
node_hod -->|"enters assignments"| node_task_forms
node_hod -->|"edits tasks"| node_edit_form
node_task_forms -->|"posts form"| node_flask
node_edit_form -->|"posts changes"| node_flask
node_flask -->|"dispatches routes"| node_task_ops
node_task_ops -->|"reads and writes"| node_task_state
node_task_ops -->|"assigns lecturers"| node_assignments
node_flask -->|"handles comments"| node_comments
node_comments -->|"redirects after save"| node_lecturer_view
node_comments -->|"stores comments"| node_task_state
node_flask -->|"handles leave"| node_leave_ops
node_leave_ops -->|"creates and updates"| node_leave_state
node_flask -.->|"handles accounts"| node_accounts
node_flask -.->|"handles uploads"| node_upload_ops
node_lecturer -->|"views work"| node_lecturer_view
node_hod -->|"views department work"| node_hod_view
node_lecturer_view -->|"posts updates"| node_flask
node_flask -->|"updates progress"| node_task_state

click node_flask "https://github.com/adarshamu/task_management_system/blob/main/app.py"
click node_hod_view "https://github.com/adarshamu/task_management_system/blob/main/templates/dashboard_hod.html"
click node_lecturer_view "https://github.com/adarshamu/task_management_system/blob/main/templates/dashboard_lecturer.html"
click node_auth_views "https://github.com/adarshamu/task_management_system/blob/main/templates/login.html"
click node_task_forms "https://github.com/adarshamu/task_management_system/blob/main/templates/add_task.html"
click node_edit_form "https://github.com/adarshamu/task_management_system/blob/main/templates/edit_task.html"
click node_task_ops "https://github.com/adarshamu/task_management_system/blob/main/app.py"
click node_task_state "https://github.com/adarshamu/task_management_system/blob/main/app.py"
click node_assignments "https://github.com/adarshamu/task_management_system/blob/main/app.py"
click node_comments "https://github.com/adarshamu/task_management_system/blob/main/app.py"
click node_leave_ops "https://github.com/adarshamu/task_management_system/blob/main/app.py"
click node_leave_state "https://github.com/adarshamu/task_management_system/blob/main/app.py"
click node_accounts "https://github.com/adarshamu/task_management_system/blob/main/app.py"
click node_register_view "https://github.com/adarshamu/task_management_system/blob/main/templates/register.html"
click node_forgot_view "https://github.com/adarshamu/task_management_system/blob/main/templates/forgot_password.html"
click node_upload_ops "https://github.com/adarshamu/task_management_system/blob/main/app.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_flask,node_hod_view,node_lecturer_view,node_auth_views,node_register_view,node_forgot_view toneBlue
class node_task_forms,node_edit_form,node_task_ops,node_comments toneAmber
class node_leave_ops,node_accounts,node_upload_ops toneMint
class node_task_state,node_assignments,node_leave_state toneRose
class node_hod,node_lecturer toneIndigo
```

## Components

### Web application

- [Flask routes](https://github.com/adarshamu/task_management_system/blob/main/app.py): `app.py`
- [HoD dashboard](https://github.com/adarshamu/task_management_system/blob/main/templates/dashboard_hod.html): `templates/dashboard_hod.html`
- [Lecturer dashboard](https://github.com/adarshamu/task_management_system/blob/main/templates/dashboard_lecturer.html): `templates/dashboard_lecturer.html`
- [Account pages](https://github.com/adarshamu/task_management_system/blob/main/templates/login.html): `templates/login.html`
- [Registration page](https://github.com/adarshamu/task_management_system/blob/main/templates/register.html): `templates/register.html`
- [Password recovery](https://github.com/adarshamu/task_management_system/blob/main/templates/forgot_password.html): `templates/forgot_password.html`

### Task management

- [Task forms](https://github.com/adarshamu/task_management_system/blob/main/templates/add_task.html): `templates/add_task.html`
- [Edit task form](https://github.com/adarshamu/task_management_system/blob/main/templates/edit_task.html): `templates/edit_task.html`
- [Task operations](https://github.com/adarshamu/task_management_system/blob/main/app.py): `app.py`
- [Task comments](https://github.com/adarshamu/task_management_system/blob/main/app.py): `app.py`

### People and leave

- [Leave requests](https://github.com/adarshamu/task_management_system/blob/main/app.py): `app.py`
- [User accounts](https://github.com/adarshamu/task_management_system/blob/main/app.py): `app.py`
- [Lecturer uploads](https://github.com/adarshamu/task_management_system/blob/main/app.py): `app.py`

### Persistence

- [Task records](https://github.com/adarshamu/task_management_system/blob/main/app.py): `app.py`
- [Task assignments](https://github.com/adarshamu/task_management_system/blob/main/app.py): `app.py`
- [Leave records](https://github.com/adarshamu/task_management_system/blob/main/app.py): `app.py`

### Other components

- **HoD**
- **Lecturer**

## Connections

- HoD → Flask routes: submits requests (evidence: `app.py`)
- Lecturer → Flask routes: submits requests (evidence: `app.py`)
- Flask routes → HoD dashboard: renders dashboard (evidence: `app.py`)
- Flask routes → Lecturer dashboard: renders dashboard (evidence: `app.py`)
- Flask routes → Account pages: renders pages
- Flask routes → Registration page: renders page
- Flask routes → Password recovery: renders page
- HoD → Task forms: enters assignments
- HoD → Edit task form: edits tasks
- Task forms → Flask routes: posts form (evidence: `app.py`)
- Edit task form → Flask routes: posts changes (evidence: `app.py`)
- Flask routes → Task operations: dispatches routes (evidence: `app.py`)
- Task operations → Task records: reads and writes (evidence: `app.py`)
- Task operations → Task assignments: assigns lecturers (evidence: `app.py`)
- Flask routes → Task comments: handles comments (evidence: `app.py`)
- Task comments → Lecturer dashboard: redirects after save (evidence: `app.py`)
- Task comments → Task records: stores comments (evidence: `app.py`)
- Flask routes → Leave requests: handles leave (evidence: `app.py`)
- Leave requests → Leave records: creates and updates (evidence: `app.py`)
- Flask routes → User accounts: handles accounts (evidence: `app.py`)
- Flask routes → Lecturer uploads: handles uploads (evidence: `app.py`)
- Lecturer → Lecturer dashboard: views work
- HoD → HoD dashboard: views department work
- Lecturer dashboard → Flask routes: posts updates (evidence: `app.py`)
- Flask routes → Task records: updates progress (evidence: `app.py`)
