# dexalium/task-manager architecture

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

- Interactive diagram: https://gitdiagram.com/dexalium/task-manager
- Repository: https://github.com/dexalium/task-manager

## Overview

This is a task-management web app: users sign in, then view tasks and users, create or edit tasks, change status, assign users, and delete tasks. The Next.js task page coordinates those actions through its task API helpers; FastAPI routes enforce JWT-protected access and use SQLAlchemy models backed by PostgreSQL. README-described features are included where their source was not sampled, using only paths present in the tree. Some frontend API wiring and the user-route implementation were not sampled, so their internal links are limited to documented behavior.

Main entry points: [`next-js-test/internship-test/app/tasks/page.tsx`](https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/app/tasks/page.tsx) (Task workspace), [`backend/main.py`](https://github.com/dexalium/task-manager/blob/main/backend/main.py) (API app and routing), [`backend/routers/tasks.py`](https://github.com/dexalium/task-manager/blob/main/backend/routers/tasks.py) (Task endpoints), [`backend/auth.py`](https://github.com/dexalium/task-manager/blob/main/backend/auth.py) (JWT and identity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Next.js interface"]
  node_login_page["Login page<br/>[page.tsx]"]
  node_tasks_page["Task workspace<br/>[page.tsx]"]
  node_task_form["Task form<br/>[TaskForm.tsx]"]
  node_status_pill["Status display<br/>[StatusPill.tsx]"]
  node_auth_guard["Auth guard<br/>[useAuthGuard.ts]"]
  node_task_client["Task API helpers<br/>[tasks.ts]"]
  node_api_client["HTTP client<br/>[api.ts]"]
  node_types["Client data types<br/>[index.ts]"]
end

subgraph group_api["FastAPI services"]
  node_api_app["API app and routing<br/>[main.py]"]
  node_auth_routes["Login endpoint<br/>[auth_routes.py]"]
  node_task_routes["Task endpoints<br/>[tasks.py]"]
  node_user_routes["User endpoints<br/>[users.py]"]
  node_auth_service["JWT and identity<br/>[auth.py]"]
end

subgraph group_domain["Domain and persistence"]
  node_schemas["API schemas<br/>[schemas.py]"]
  node_models["User and task models<br/>[models.py]"]
  node_database["Database sessions<br/>[database.py]"]
end

node_user(("App user"))
node_postgres[("PostgreSQL")]

node_user -->|"signs in"| node_login_page
node_user -->|"manages tasks"| node_tasks_page
node_tasks_page -->|"checks session"| node_auth_guard
node_auth_guard -->|"checks token"| node_api_client
node_tasks_page -->|"renders form"| node_task_form
node_tasks_page -->|"renders status"| node_status_pill
node_tasks_page -->|"requests task actions"| node_task_client
node_login_page -->|"submits login"| node_api_client
node_task_client -->|"sends requests"| node_api_client
node_api_client -->|"calls API"| node_api_app
node_api_app -->|"registers routes"| node_auth_routes
node_api_app -->|"registers routes"| node_task_routes
node_api_app -->|"registers routes"| node_user_routes
node_auth_routes -->|"authenticates and issues token"| node_auth_service
node_task_routes -->|"validates JWT"| node_auth_service
node_user_routes -->|"requires JWT"| node_auth_service
node_auth_service -->|"queries users"| node_database
node_task_routes -->|"uses session"| node_database
node_user_routes -->|"uses session"| node_database
node_database -->|"reads and writes"| node_postgres
node_task_routes -->|"queries task models"| node_models
node_auth_service -->|"queries user model"| node_models
node_task_routes -->|"validates task data"| node_schemas
node_api_app -->|"creates schema tables"| node_database

click node_login_page "https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/app/login/page.tsx"
click node_tasks_page "https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/app/tasks/page.tsx"
click node_task_form "https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/components/TaskForm.tsx"
click node_status_pill "https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/components/StatusPill.tsx"
click node_auth_guard "https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/lib/useAuthGuard.ts"
click node_task_client "https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/lib/tasks.ts"
click node_api_client "https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/lib/api.ts"
click node_types "https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/types/index.ts"
click node_api_app "https://github.com/dexalium/task-manager/blob/main/backend/main.py"
click node_auth_routes "https://github.com/dexalium/task-manager/blob/main/backend/routers/auth_routes.py"
click node_task_routes "https://github.com/dexalium/task-manager/blob/main/backend/routers/tasks.py"
click node_user_routes "https://github.com/dexalium/task-manager/blob/main/backend/routers/users.py"
click node_auth_service "https://github.com/dexalium/task-manager/blob/main/backend/auth.py"
click node_schemas "https://github.com/dexalium/task-manager/blob/main/backend/schemas.py"
click node_models "https://github.com/dexalium/task-manager/blob/main/backend/models.py"
click node_database "https://github.com/dexalium/task-manager/blob/main/backend/database.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_login_page,node_tasks_page,node_task_form,node_status_pill,node_auth_guard,node_task_client,node_api_client,node_types,node_user toneBlue
class node_api_app,node_auth_routes,node_task_routes,node_user_routes,node_auth_service,node_postgres toneAmber
class node_schemas,node_models,node_database toneMint
```

## Components

### Next.js interface

- [Login page](https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/app/login/page.tsx): `next-js-test/internship-test/app/login/page.tsx`
- [Task workspace](https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/app/tasks/page.tsx): `next-js-test/internship-test/app/tasks/page.tsx`
- [Task form](https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/components/TaskForm.tsx): `next-js-test/internship-test/components/TaskForm.tsx`
- [Status display](https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/components/StatusPill.tsx): `next-js-test/internship-test/components/StatusPill.tsx`
- [Auth guard](https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/lib/useAuthGuard.ts): `next-js-test/internship-test/lib/useAuthGuard.ts`
- [Task API helpers](https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/lib/tasks.ts): `next-js-test/internship-test/lib/tasks.ts`
- [HTTP client](https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/lib/api.ts): `next-js-test/internship-test/lib/api.ts`
- [Client data types](https://github.com/dexalium/task-manager/blob/main/next-js-test/internship-test/types/index.ts): `next-js-test/internship-test/types/index.ts`

### FastAPI services

- [API app and routing](https://github.com/dexalium/task-manager/blob/main/backend/main.py): `backend/main.py`
- [Login endpoint](https://github.com/dexalium/task-manager/blob/main/backend/routers/auth_routes.py): `backend/routers/auth_routes.py`
- [Task endpoints](https://github.com/dexalium/task-manager/blob/main/backend/routers/tasks.py): `backend/routers/tasks.py`
- [User endpoints](https://github.com/dexalium/task-manager/blob/main/backend/routers/users.py): `backend/routers/users.py`
- [JWT and identity](https://github.com/dexalium/task-manager/blob/main/backend/auth.py): `backend/auth.py`

### Domain and persistence

- [API schemas](https://github.com/dexalium/task-manager/blob/main/backend/schemas.py): `backend/schemas.py`
- [User and task models](https://github.com/dexalium/task-manager/blob/main/backend/models.py): `backend/models.py`
- [Database sessions](https://github.com/dexalium/task-manager/blob/main/backend/database.py): `backend/database.py`

### Other components

- **App user**
- **PostgreSQL**

## Connections

- App user → Login page: signs in
- App user → Task workspace: manages tasks
- Task workspace → Auth guard: checks session
- Auth guard → HTTP client: checks token
- Task workspace → Task form: renders form
- Task workspace → Status display: renders status
- Task workspace → Task API helpers: requests task actions
- Login page → HTTP client: submits login
- Task API helpers → HTTP client: sends requests
- HTTP client → API app and routing: calls API
- API app and routing → Login endpoint: registers routes
- API app and routing → Task endpoints: registers routes
- API app and routing → User endpoints: registers routes
- Login endpoint → JWT and identity: authenticates and issues token
- Task endpoints → JWT and identity: validates JWT
- User endpoints → JWT and identity: requires JWT
- JWT and identity → Database sessions: queries users
- Task endpoints → Database sessions: uses session
- User endpoints → Database sessions: uses session
- Database sessions → PostgreSQL: reads and writes
- Task endpoints → User and task models: queries task models
- JWT and identity → User and task models: queries user model
- Task endpoints → API schemas: validates task data
- API app and routing → Database sessions: creates schema tables
