# sushmitadasari/containerized-project-management-api architecture

> Architecture diagram of the GitHub repository sushmitadasari/containerized-project-management-api, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sushmitadasari/containerized-project-management-api
- Repository: https://github.com/sushmitadasari/containerized-project-management-api

## Overview

This is a FastAPI project-management API. Clients register or log in to obtain a JWT, then use protected routes to manage their profile, projects, and project-scoped tasks; service logic enforces ownership before repository operations persist changes through SQLAlchemy. The graph preserves the documented layered workflow and authentication, validation, error handling, and startup setup. Edges are limited to relationships shown in excerpts, the source index, or the README; unsampled subsystem details are not inferred.

Main entry points: [`src/main.py`](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/main.py) (FastAPI App), [`src/database.py`](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/database.py) (Database Sessions), [`src/services/auth_service.py`](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/auth_service.py) (Authentication), [`src/services/task_service.py`](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/task_service.py) (Task Rules)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_http["HTTP API"]
  node_app["FastAPI App<br/>[main.py]"]
  node_auth_routes["Auth Routes<br/>[auth_controller.py]"]
  node_user_routes["User Routes<br/>[user_controller.py]"]
  node_project_routes["Project Routes"]
  node_task_routes["Task Routes<br/>[task_controller.py]"]
  node_schemas["Request Schemas"]
end

subgraph group_identity["Identity and Access"]
  node_auth_service["Authentication<br/>[auth_service.py]"]
  node_user_service["User Profile<br/>[user_service.py]"]
  node_token_guard["JWT Route Guard<br/>[dependencies.py]"]
  node_security["Token and Password Security<br/>[security.py]"]
end

subgraph group_domain["Project and Task Domain"]
  node_project_service["Project Rules<br/>[project_service.py]"]
  node_task_service["Task Rules<br/>[task_service.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_orm_models["ORM Models"]
  node_db_session["Database Sessions<br/>[database.py]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_runtime["Application Runtime"]
  node_config["Runtime Settings<br/>[config.py]"]
  node_errors["Error Handling<br/>[exceptions.py]"]
end

node_client(("API Client"))

node_client -->|"sends requests"| node_app
node_app -->|"registers routes"| node_auth_routes
node_app -->|"registers routes"| node_user_routes
node_app -->|"registers routes"| node_project_routes
node_app -->|"registers routes"| node_task_routes
node_auth_routes -->|"uses payloads"| node_schemas
node_project_routes -->|"uses payloads"| node_schemas
node_task_routes -->|"uses payloads"| node_schemas
node_auth_routes -->|"calls"| node_auth_service
node_user_routes -->|"calls"| node_user_service
node_project_routes -->|"calls"| node_project_service
node_task_routes -->|"calls"| node_task_service
node_auth_service -->|"reads and creates"| node_user_repo
node_auth_service -->|"hashes and issues tokens"| node_security
node_user_service -->|"accesses users"| node_user_repo
node_project_service -->|"accesses projects"| node_project_repo
node_task_service -->|"accesses tasks"| node_task_repo
node_task_service -->|"checks project ownership"| node_project_repo
node_user_repo -->|"queries users"| node_orm_models
node_project_repo -->|"queries projects"| node_orm_models
node_task_repo -->|"queries tasks"| node_orm_models
node_token_guard -->|"decodes tokens"| node_security
node_token_guard -->|"provides session dependency"| node_db_session
node_db_session -->|"loads connection settings"| node_config
node_db_session -->|"connects to"| node_postgres
node_orm_models -->|"uses declarative base"| node_db_session
node_security -->|"uses security settings"| node_config
node_app -->|"creates tables at startup"| node_db_session
node_app -->|"maps application errors"| node_errors
node_auth_service -->|"raises domain errors"| node_errors
node_task_service -->|"raises domain errors"| node_errors

click node_app "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/main.py"
click node_auth_routes "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/controllers/auth_controller.py"
click node_user_routes "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/controllers/user_controller.py"
click node_project_routes "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/controllers/project_controller.py"
click node_task_routes "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/controllers/task_controller.py"
click node_schemas "https://github.com/sushmitadasari/containerized-project-management-api/tree/main/src/schemas"
click node_auth_service "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/auth_service.py"
click node_user_service "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/user_service.py"
click node_token_guard "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/dependencies.py"
click node_security "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/security.py"
click node_project_service "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/project_service.py"
click node_task_service "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/task_service.py"
click node_user_repo "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/repositories/user_repository.py"
click node_project_repo "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/repositories/project_repository.py"
click node_task_repo "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/repositories/task_repository.py"
click node_orm_models "https://github.com/sushmitadasari/containerized-project-management-api/tree/main/src/models"
click node_db_session "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/database.py"
click node_config "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/config.py"
click node_errors "https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/exceptions.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_routes,node_user_routes,node_project_routes,node_task_routes,node_schemas,node_client toneBlue
class node_auth_service,node_user_service,node_token_guard,node_security toneAmber
class node_project_service,node_task_service toneMint
class node_user_repo,node_project_repo,node_task_repo,node_orm_models,node_db_session,node_postgres toneRose
class node_config,node_errors toneIndigo
```

## Components

### HTTP API

- [FastAPI App](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/main.py): `src/main.py`
- [Auth Routes](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/controllers/auth_controller.py): `src/controllers/auth_controller.py`
- [User Routes](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/controllers/user_controller.py): `src/controllers/user_controller.py`
- [Project Routes](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/controllers/project_controller.py): `src/controllers/project_controller.py`
- [Task Routes](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/controllers/task_controller.py): `src/controllers/task_controller.py`
- [Request Schemas](https://github.com/sushmitadasari/containerized-project-management-api/tree/main/src/schemas): `src/schemas`

### Identity and Access

- [Authentication](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/auth_service.py): `src/services/auth_service.py`
- [User Profile](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/user_service.py): `src/services/user_service.py`
- [JWT Route Guard](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/dependencies.py): `src/dependencies.py`
- [Token and Password Security](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/security.py): `src/security.py`

### Project and Task Domain

- [Project Rules](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/project_service.py): `src/services/project_service.py`
- [Task Rules](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/services/task_service.py): `src/services/task_service.py`

### Persistence

- [User Repository](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/repositories/user_repository.py): `src/repositories/user_repository.py`
- [Project Repository](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/repositories/project_repository.py): `src/repositories/project_repository.py`
- [Task Repository](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/repositories/task_repository.py): `src/repositories/task_repository.py`
- [ORM Models](https://github.com/sushmitadasari/containerized-project-management-api/tree/main/src/models): `src/models`
- [Database Sessions](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/database.py): `src/database.py`
- **PostgreSQL**

### Application Runtime

- [Runtime Settings](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/config.py): `src/config.py`
- [Error Handling](https://github.com/sushmitadasari/containerized-project-management-api/blob/main/src/exceptions.py): `src/exceptions.py`

### Other components

- **API Client**

## Connections

- API Client → FastAPI App: sends requests (evidence: `README.md`)
- FastAPI App → Auth Routes: registers routes (evidence: `src/main.py`)
- FastAPI App → User Routes: registers routes (evidence: `src/main.py`)
- FastAPI App → Project Routes: registers routes (evidence: `src/main.py`)
- FastAPI App → Task Routes: registers routes (evidence: `src/main.py`)
- Auth Routes → Request Schemas: uses payloads (evidence: `src/controllers/auth_controller.py`)
- Project Routes → Request Schemas: uses payloads (evidence: `src/controllers/project_controller.py`)
- Task Routes → Request Schemas: uses payloads (evidence: `src/controllers/task_controller.py`)
- Auth Routes → Authentication: calls (evidence: `src/controllers/auth_controller.py`)
- User Routes → User Profile: calls (evidence: `src/controllers/user_controller.py`)
- Project Routes → Project Rules: calls (evidence: `src/controllers/project_controller.py`)
- Task Routes → Task Rules: calls (evidence: `src/controllers/task_controller.py`)
- Authentication → User Repository: reads and creates (evidence: `src/services/auth_service.py`)
- Authentication → Token and Password Security: hashes and issues tokens (evidence: `src/services/auth_service.py`)
- User Profile → User Repository: accesses users (evidence: `src/services/user_service.py`)
- Project Rules → Project Repository: accesses projects (evidence: `src/services/project_service.py`)
- Task Rules → Task Repository: accesses tasks (evidence: `src/services/task_service.py`)
- Task Rules → Project Repository: checks project ownership (evidence: `src/services/task_service.py`)
- User Repository → ORM Models: queries users (evidence: `src/repositories/user_repository.py`)
- Project Repository → ORM Models: queries projects (evidence: `src/repositories/project_repository.py`)
- Task Repository → ORM Models: queries tasks (evidence: `src/repositories/task_repository.py`)
- JWT Route Guard → Token and Password Security: decodes tokens (evidence: `src/dependencies.py`)
- JWT Route Guard → Database Sessions: provides session dependency (evidence: `src/dependencies.py`)
- Database Sessions → Runtime Settings: loads connection settings (evidence: `src/database.py`)
- Database Sessions → PostgreSQL: connects to (evidence: `README.md`)
- ORM Models → Database Sessions: uses declarative base (evidence: `src/models/user.py`)
- Token and Password Security → Runtime Settings: uses security settings (evidence: `src/security.py`)
- FastAPI App → Database Sessions: creates tables at startup (evidence: `src/main.py`)
- FastAPI App → Error Handling: maps application errors (evidence: `src/main.py`)
- Authentication → Error Handling: raises domain errors (evidence: `src/services/auth_service.py`)
- Task Rules → Error Handling: raises domain errors (evidence: `src/services/task_service.py`)
