# sayulramirez/task_manager_python architecture

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

- Interactive diagram: https://gitdiagram.com/sayulramirez/task_manager_python
- Repository: https://github.com/sayulramirez/task_manager_python

## Overview

This is a FastAPI task-management backend: users register or log in, receive a JWT, then use role-protected endpoints to manage projects and assigned tasks; administrators can manage user profiles. The sampled controllers and services show the request flow through business services to repositories, while the README documents PostgreSQL persistence, JWT/RBAC, and project/task capabilities. Dependency-provider wiring and several modules were not sampled, so uncertain internal links are omitted.

Main entry points: [`backend/src/repository/user_repository.py`](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/repository/user_repository.py) (User repository), [`backend/src/main.py`](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/main.py) (FastAPI app), [`backend/src/service/task_service.py`](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/service/task_service.py) (Task service), [`backend/src/repository/projec_repository.py`](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/repository/projec_repository.py) (Project repository)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["API"]
  node_app["FastAPI app<br/>[main.py]"]
  node_auth_api["Auth routes<br/>[auth_controller.py]"]
  node_user_api["User routes<br/>[user_controller.py]"]
  node_project_api["Project routes"]
  node_task_api["Task routes<br/>[task_controller.py]"]
end

subgraph group_business["Business"]
  node_auth_service["Auth service<br/>[auth_service.py]"]
  node_user_service["User service<br/>[user_service.py]"]
  node_project_service["Project service<br/>[project_service.py]"]
  node_task_service["Task service<br/>[task_service.py]"]
end

subgraph group_security["Security"]
  node_access_filter["Access checks<br/>[filter.py]"]
  node_jwt["JWT manager<br/>[jwt.py]"]
  node_hasher["Password hasher<br/>[hashing.py]"]
end

subgraph group_persistence["Persistence"]
  node_user_repo["User repository<br/>[user_repository.py]"]
  node_project_repo["Project repository"]
  node_task_repo["Task repository<br/>[task_repository.py]"]
  node_user_model["User model<br/>[user.py]"]
  node_project_model["Project model<br/>[project.py]"]
  node_task_model["Task model<br/>[task.py]"]
  node_db_session["DB sessions<br/>[database.py]"]
end

node_client(("API client"))
node_postgres[("PostgreSQL")]

node_client -->|"sends requests"| node_app
node_app -->|"mounts routes"| node_auth_api
node_app -->|"mounts routes"| node_user_api
node_app -->|"mounts routes"| node_project_api
node_app -->|"mounts routes"| node_task_api
node_auth_api -->|"calls"| node_auth_service
node_user_api -->|"calls"| node_user_service
node_project_api -->|"calls"| node_project_service
node_task_api -->|"calls"| node_task_service
node_auth_api -->|"checks access"| node_access_filter
node_user_api -->|"checks access"| node_access_filter
node_project_api -->|"checks access"| node_access_filter
node_task_api -->|"checks access"| node_access_filter
node_auth_service -->|"looks up users"| node_user_repo
node_auth_service -->|"issues token"| node_jwt
node_user_service -->|"uses"| node_user_repo
node_project_service -->|"uses"| node_project_repo
node_task_service -->|"looks up assignee"| node_user_repo
node_task_service -->|"checks project"| node_project_repo
node_task_service -->|"manages tasks"| node_task_repo
node_user_repo -->|"hashes passwords"| node_hasher
node_user_repo -->|"queries and maps"| node_user_model
node_project_repo -->|"queries and maps"| node_project_model
node_task_repo -->|"queries and maps"| node_task_model
node_user_repo -->|"uses session"| node_db_session
node_project_repo -->|"uses session"| node_db_session
node_task_repo -->|"uses session"| node_db_session
node_db_session -->|"connects"| node_postgres

click node_app "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/main.py"
click node_auth_api "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/controller/auth_controller.py"
click node_user_api "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/controller/user_controller.py"
click node_project_api "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/controller/project_controller.py"
click node_task_api "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/controller/task_controller.py"
click node_auth_service "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/service/auth_service.py"
click node_user_service "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/service/user_service.py"
click node_project_service "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/service/project_service.py"
click node_task_service "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/service/task_service.py"
click node_access_filter "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/config/filter.py"
click node_jwt "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/config/jwt.py"
click node_hasher "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/config/hashing.py"
click node_user_repo "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/repository/user_repository.py"
click node_project_repo "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/repository/projec_repository.py"
click node_task_repo "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/repository/task_repository.py"
click node_user_model "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/models/user.py"
click node_project_model "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/models/project.py"
click node_task_model "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/models/task.py"
click node_db_session "https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/config/db/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_app,node_auth_api,node_user_api,node_project_api,node_task_api,node_client toneBlue
class node_auth_service,node_user_service,node_project_service,node_task_service,node_postgres toneAmber
class node_access_filter,node_jwt,node_hasher toneMint
class node_user_repo,node_project_repo,node_task_repo,node_user_model,node_project_model,node_task_model,node_db_session toneRose
```

## Components

### API

- [FastAPI app](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/main.py): `backend/src/main.py`
- [Auth routes](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/controller/auth_controller.py): `backend/src/controller/auth_controller.py`
- [User routes](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/controller/user_controller.py): `backend/src/controller/user_controller.py`
- [Project routes](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/controller/project_controller.py): `backend/src/controller/project_controller.py`
- [Task routes](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/controller/task_controller.py): `backend/src/controller/task_controller.py`

### Business

- [Auth service](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/service/auth_service.py): `backend/src/service/auth_service.py`
- [User service](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/service/user_service.py): `backend/src/service/user_service.py`
- [Project service](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/service/project_service.py): `backend/src/service/project_service.py`
- [Task service](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/service/task_service.py): `backend/src/service/task_service.py`

### Security

- [Access checks](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/config/filter.py): `backend/src/config/filter.py`
- [JWT manager](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/config/jwt.py): `backend/src/config/jwt.py`
- [Password hasher](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/config/hashing.py): `backend/src/config/hashing.py`

### Persistence

- [User repository](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/repository/user_repository.py): `backend/src/repository/user_repository.py`
- [Project repository](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/repository/projec_repository.py): `backend/src/repository/projec_repository.py`
- [Task repository](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/repository/task_repository.py): `backend/src/repository/task_repository.py`
- [User model](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/models/user.py): `backend/src/models/user.py`
- [Project model](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/models/project.py): `backend/src/models/project.py`
- [Task model](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/models/task.py): `backend/src/models/task.py`
- [DB sessions](https://github.com/sayulramirez/task_manager_python/blob/main/backend/src/config/db/database.py): `backend/src/config/db/database.py`

### Other components

- **API client**
- **PostgreSQL**

## Connections

- API client → FastAPI app: sends requests
- FastAPI app → Auth routes: mounts routes
- FastAPI app → User routes: mounts routes
- FastAPI app → Project routes: mounts routes
- FastAPI app → Task routes: mounts routes
- Auth routes → Auth service: calls
- User routes → User service: calls
- Project routes → Project service: calls
- Task routes → Task service: calls
- Auth routes → Access checks: checks access
- User routes → Access checks: checks access
- Project routes → Access checks: checks access
- Task routes → Access checks: checks access
- Auth service → User repository: looks up users
- Auth service → JWT manager: issues token
- User service → User repository: uses
- Project service → Project repository: uses
- Task service → User repository: looks up assignee
- Task service → Project repository: checks project
- Task service → Task repository: manages tasks
- User repository → Password hasher: hashes passwords
- User repository → User model: queries and maps
- Project repository → Project model: queries and maps
- Task repository → Task model: queries and maps
- User repository → DB sessions: uses session
- Project repository → DB sessions: uses session
- Task repository → DB sessions: uses session
- DB sessions → PostgreSQL: connects
