# tristantowijaya/task-management-app architecture

> Architecture diagram of the GitHub repository tristantowijaya/task-management-app, 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/tristantowijaya/task-management-app
- Repository: https://github.com/tristantowijaya/task-management-app

## Overview

Task Management App lets users authenticate, browse and filter a shared Kanban workspace, manage tasks and assignments, and optionally ask read-only questions about task data. The main workflow runs from the task page through the API client to FastAPI task routes, business services, and PostgreSQL; authentication, team-member lookup, and optional assistant queries are distinct branches. The README documents additional UI capabilities; unsampled implementation details are represented only where their enclosing paths are supported by the tree.

Main entry points: [`frontend/src/app/tasks/page.tsx`](https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/app/tasks/page.tsx) (Tasks workspace), [`backend/app/database.py`](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/database.py) (Database sessions), [`backend/app/main.py`](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/main.py) (FastAPI application), [`frontend/src/components/auth/LoginForm.tsx`](https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/components/auth/LoginForm.tsx) (Login form)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_tasks_page["Tasks workspace<br/>[page.tsx]"]
  node_task_ui["Task board and forms<br/>[KanbanBoard.tsx]"]
  node_chat_ui["Assistant panel<br/>[AssistantPanel.tsx]"]
  node_login_ui["Login form<br/>[LoginForm.tsx]"]
  node_login_page["Login route<br/>[page.tsx]"]
  node_api_client["API client<br/>[api.ts]"]
  node_session["Browser session<br/>[auth.ts]"]
end

subgraph group_api["API and domain"]
  node_api_app["FastAPI application<br/>[main.py]"]
  node_task_routes["Task endpoints<br/>[tasks.py]"]
  node_user_routes["User endpoints<br/>[users.py]"]
  node_auth_routes["Authentication endpoint<br/>[auth.py]"]
  node_chat_routes["Chat endpoint<br/>[chat.py]"]
  node_task_service["Task operations<br/>[task_service.py]"]
  node_user_service["User operations<br/>[user_service.py]"]
  node_auth_service["Login verification<br/>[auth_service.py]"]
  node_security["Password and JWT<br/>[security.py]"]
end

subgraph group_data["Persistence"]
  node_database["Database sessions<br/>[database.py]"]
  node_models["User and task models<br/>[models.py]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_assistant["Task assistant"]
  node_chat_service["Intent and answers<br/>[chatbot_service.py]"]
  node_gemini["Gemini API"]
end

node_user(("Workspace user"))

node_user -->|"opens login"| node_login_page
node_user -->|"uses workspace"| node_tasks_page
node_login_page -->|"renders"| node_login_ui
node_login_ui -->|"submits credentials"| node_api_client
node_api_client -->|"sends API requests"| node_api_app
node_api_app -->|"dispatches login"| node_auth_routes
node_auth_routes -->|"verifies login"| node_auth_service
node_auth_service -->|"queries user"| node_database
node_auth_service -->|"checks password and signs"| node_security
node_auth_routes -->|"returns token"| node_login_ui
node_login_ui -->|"stores session"| node_session
node_tasks_page -->|"checks session"| node_session
node_tasks_page -->|"loads and changes tasks"| node_api_client
node_tasks_page -->|"renders task views"| node_task_ui
node_task_ui -->|"reports task actions"| node_tasks_page
node_api_app -->|"dispatches tasks"| node_task_routes
node_api_app -->|"dispatches users"| node_user_routes
node_task_routes -->|"delegates operations"| node_task_service
node_user_routes -->|"delegates lookup"| node_user_service
node_task_service -->|"queries and changes"| node_database
node_user_service -->|"queries users"| node_database
node_database -->|"maps entities"| node_models
node_database -->|"opens sessions"| node_postgres
node_tasks_page -->|"renders assistant"| node_chat_ui
node_chat_ui -->|"submits question"| node_api_client
node_api_app -->|"dispatches chat"| node_chat_routes
node_chat_routes -->|"delegates question"| node_chat_service
node_chat_service -.->|"classifies intent"| node_gemini
node_chat_service -->|"queries task data"| node_database
node_chat_routes -->|"returns answer"| node_chat_ui

click node_tasks_page "https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/app/tasks/page.tsx"
click node_task_ui "https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/components/tasks/KanbanBoard.tsx"
click node_chat_ui "https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/components/chat/AssistantPanel.tsx"
click node_login_ui "https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/components/auth/LoginForm.tsx"
click node_login_page "https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/app/login/page.tsx"
click node_api_client "https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/lib/api.ts"
click node_session "https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/lib/auth.ts"
click node_api_app "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/main.py"
click node_task_routes "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/routers/tasks.py"
click node_user_routes "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/routers/users.py"
click node_auth_routes "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/routers/auth.py"
click node_chat_routes "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/routers/chat.py"
click node_task_service "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/services/task_service.py"
click node_user_service "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/services/user_service.py"
click node_auth_service "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/services/auth_service.py"
click node_security "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/security.py"
click node_chat_service "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/services/chatbot_service.py"
click node_database "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/database.py"
click node_models "https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/models.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_tasks_page,node_task_ui,node_chat_ui,node_login_ui,node_login_page,node_api_client,node_session,node_user toneBlue
class node_api_app,node_task_routes,node_user_routes,node_auth_routes,node_chat_routes,node_task_service,node_user_service,node_auth_service,node_security toneAmber
class node_database,node_models,node_postgres toneMint
class node_chat_service,node_gemini toneRose
```

## Components

### Web application

- [Tasks workspace](https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/app/tasks/page.tsx): `frontend/src/app/tasks/page.tsx`
- [Task board and forms](https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/components/tasks/KanbanBoard.tsx): `frontend/src/components/tasks/KanbanBoard.tsx`
- [Assistant panel](https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/components/chat/AssistantPanel.tsx): `frontend/src/components/chat/AssistantPanel.tsx`
- [Login form](https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/components/auth/LoginForm.tsx): `frontend/src/components/auth/LoginForm.tsx`
- [Login route](https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/app/login/page.tsx): `frontend/src/app/login/page.tsx`
- [API client](https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/lib/api.ts): `frontend/src/lib/api.ts`
- [Browser session](https://github.com/tristantowijaya/task-management-app/blob/main/frontend/src/lib/auth.ts): `frontend/src/lib/auth.ts`

### API and domain

- [FastAPI application](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/main.py): `backend/app/main.py`
- [Task endpoints](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/routers/tasks.py): `backend/app/routers/tasks.py`
- [User endpoints](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/routers/users.py): `backend/app/routers/users.py`
- [Authentication endpoint](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/routers/auth.py): `backend/app/routers/auth.py`
- [Chat endpoint](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/routers/chat.py): `backend/app/routers/chat.py`
- [Task operations](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/services/task_service.py): `backend/app/services/task_service.py`
- [User operations](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/services/user_service.py): `backend/app/services/user_service.py`
- [Login verification](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [Password and JWT](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/security.py): `backend/app/security.py`

### Persistence

- [Database sessions](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/database.py): `backend/app/database.py`
- [User and task models](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/models.py): `backend/app/models.py`
- **PostgreSQL**

### Task assistant

- [Intent and answers](https://github.com/tristantowijaya/task-management-app/blob/main/backend/app/services/chatbot_service.py): `backend/app/services/chatbot_service.py`
- **Gemini API**

### Other components

- **Workspace user**

## Connections

- Workspace user → Login route: opens login
- Workspace user → Tasks workspace: uses workspace
- Login route → Login form: renders
- Login form → API client: submits credentials
- API client → FastAPI application: sends API requests
- FastAPI application → Authentication endpoint: dispatches login
- Authentication endpoint → Login verification: verifies login
- Login verification → Database sessions: queries user
- Login verification → Password and JWT: checks password and signs
- Authentication endpoint → Login form: returns token
- Login form → Browser session: stores session
- Tasks workspace → Browser session: checks session
- Tasks workspace → API client: loads and changes tasks
- Tasks workspace → Task board and forms: renders task views
- Task board and forms → Tasks workspace: reports task actions
- FastAPI application → Task endpoints: dispatches tasks
- FastAPI application → User endpoints: dispatches users
- Task endpoints → Task operations: delegates operations
- User endpoints → User operations: delegates lookup
- Task operations → Database sessions: queries and changes
- User operations → Database sessions: queries users
- Database sessions → User and task models: maps entities
- Database sessions → PostgreSQL: opens sessions
- Tasks workspace → Assistant panel: renders assistant
- Assistant panel → API client: submits question
- FastAPI application → Chat endpoint: dispatches chat
- Chat endpoint → Intent and answers: delegates question
- Intent and answers → Gemini API: classifies intent
- Intent and answers → Database sessions: queries task data
- Chat endpoint → Assistant panel: returns answer
