# faridntf/fastapi-todo-app-finally architecture

> Architecture diagram of the GitHub repository faridntf/fastapi-todo-app-finally, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/faridntf/fastapi-todo-app-finally
- Repository: https://github.com/faridntf/fastapi-todo-app-finally

## Overview

This repository is a FastAPI todo application. Its main workflow is an HTTP client reaching the mounted API, authenticating where required, then creating, finding, updating, completing, or deleting user tasks; task creation and category filtering also check categories. Separate API areas manage users and profiles. The graph follows the sampled routes and the source index; the README is only a title, so it documents no additional capabilities. Some profile and user implementation details are therefore represented only at the subsystem level.

Main entry points: [`backend/core/database.py`](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/core/database.py) (DB Session), [`backend/tasks/routs.py`](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/tasks/routs.py) (Task Routes), [`backend/main.py`](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/main.py) (FastAPI App), [`backend/users/services.py`](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/users/services.py) (User Services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["API Application"]
  node_api["FastAPI App<br/>[main.py]"]
end

subgraph group_identity["Identity and Profiles"]
  node_user_routes["User Routes<br/>[routs.py]"]
  node_user_logic["User Services<br/>[services.py]"]
  node_user_schema["User Schemas<br/>[schema.py]"]
  node_user_model["User Model<br/>[models.py]"]
  node_jwt["JWT Auth<br/>[jwt_auth.py]"]
  node_profile_routes["Profile Routes<br/>[routs.py]"]
  node_profile_logic["Profile Services<br/>[services.py]"]
  node_profile_schema["Profile Schemas<br/>[schema.py]"]
  node_profile_model["Profile Model<br/>[models.py]"]
end

subgraph group_tasks["Task Management"]
  node_task_routes["Task Routes<br/>[routs.py]"]
  node_task_logic["Task Services<br/>[services.py]"]
  node_task_schema["Task Schemas<br/>[schema.py]"]
  node_task_model["Task Model<br/>[models.py]"]
end

subgraph group_categories["Categories"]
  node_category_routes["Category Routes<br/>[routs.py]"]
  node_category_logic["Category Services<br/>[services.py]"]
  node_category_schema["Category Schemas<br/>[schema.py]"]
  node_category_model["Category Model<br/>[models.py]"]
end

subgraph group_infra["Persistence and Configuration"]
  node_db_session["DB Session<br/>[database.py]"]
  node_settings["Settings<br/>[setting.py]"]
  node_sql_db[("SQL Database")]
end

node_client(("HTTP Client"))

node_client -->|"sends requests"| node_api
node_api -->|"mounts router"| node_user_routes
node_api -->|"mounts router"| node_task_routes
node_api -->|"mounts router"| node_category_routes
node_api -->|"mounts router"| node_profile_routes
node_user_routes -->|"calls"| node_user_logic
node_user_routes -->|"validates with"| node_user_schema
node_user_routes -->|"queries"| node_user_model
node_user_logic -->|"decodes tokens"| node_jwt
node_user_logic -->|"queries"| node_user_model
node_user_logic -->|"gets session"| node_db_session
node_profile_routes -->|"calls"| node_profile_logic
node_profile_routes -->|"uses schemas"| node_profile_schema
node_profile_logic -->|"queries"| node_profile_model
node_profile_model -->|"relates to"| node_user_model
node_task_routes -->|"authenticates with"| node_user_logic
node_task_routes -->|"calls"| node_task_logic
node_task_routes -->|"validates with"| node_task_schema
node_task_routes -->|"creates and updates"| node_task_model
node_task_logic -->|"queries"| node_task_model
node_task_routes -->|"checks categories"| node_category_logic
node_category_routes -->|"calls"| node_category_logic
node_category_routes -->|"uses schemas"| node_category_schema
node_category_logic -->|"queries"| node_category_model
node_category_model -->|"uses base"| node_db_session
node_task_model -->|"uses base"| node_db_session
node_user_model -->|"uses base"| node_db_session
node_profile_model -->|"uses base"| node_db_session
node_db_session -->|"loads config"| node_settings
node_db_session -->|"connects to"| node_sql_db
node_jwt -->|"loads secrets"| node_settings

click node_api "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/main.py"
click node_user_routes "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/users/routs.py"
click node_user_logic "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/users/services.py"
click node_user_schema "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/users/schema.py"
click node_user_model "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/users/models.py"
click node_jwt "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/auth/jwt_auth.py"
click node_profile_routes "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/profiles/routs.py"
click node_profile_logic "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/profiles/services.py"
click node_profile_schema "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/profiles/schema.py"
click node_profile_model "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/profiles/models.py"
click node_task_routes "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/tasks/routs.py"
click node_task_logic "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/tasks/services.py"
click node_task_schema "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/tasks/schema.py"
click node_task_model "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/tasks/models.py"
click node_category_routes "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/categories/routs.py"
click node_category_logic "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/categories/services.py"
click node_category_schema "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/categories/schema.py"
click node_category_model "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/categories/models.py"
click node_db_session "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/core/database.py"
click node_settings "https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/core/setting.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_api,node_client toneBlue
class node_user_routes,node_user_logic,node_user_schema,node_user_model,node_jwt,node_profile_routes,node_profile_logic,node_profile_schema,node_profile_model toneAmber
class node_task_routes,node_task_logic,node_task_schema,node_task_model toneMint
class node_category_routes,node_category_logic,node_category_schema,node_category_model toneRose
class node_db_session,node_settings,node_sql_db toneIndigo
```

## Components

### API Application

- [FastAPI App](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/main.py): `backend/main.py`

### Identity and Profiles

- [User Routes](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/users/routs.py): `backend/users/routs.py`
- [User Services](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/users/services.py): `backend/users/services.py`
- [User Schemas](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/users/schema.py): `backend/users/schema.py`
- [User Model](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/users/models.py): `backend/users/models.py`
- [JWT Auth](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/auth/jwt_auth.py): `backend/auth/jwt_auth.py`
- [Profile Routes](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/profiles/routs.py): `backend/profiles/routs.py`
- [Profile Services](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/profiles/services.py): `backend/profiles/services.py`
- [Profile Schemas](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/profiles/schema.py): `backend/profiles/schema.py`
- [Profile Model](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/profiles/models.py): `backend/profiles/models.py`

### Task Management

- [Task Routes](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/tasks/routs.py): `backend/tasks/routs.py`
- [Task Services](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/tasks/services.py): `backend/tasks/services.py`
- [Task Schemas](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/tasks/schema.py): `backend/tasks/schema.py`
- [Task Model](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/tasks/models.py): `backend/tasks/models.py`

### Categories

- [Category Routes](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/categories/routs.py): `backend/categories/routs.py`
- [Category Services](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/categories/services.py): `backend/categories/services.py`
- [Category Schemas](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/categories/schema.py): `backend/categories/schema.py`
- [Category Model](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/categories/models.py): `backend/categories/models.py`

### Persistence and Configuration

- [DB Session](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/core/database.py): `backend/core/database.py`
- [Settings](https://github.com/faridntf/fastapi-todo-app-finally/blob/main/backend/core/setting.py): `backend/core/setting.py`
- **SQL Database**

### Other components

- **HTTP Client**

## Connections

- HTTP Client → FastAPI App: sends requests
- FastAPI App → User Routes: mounts router (evidence: `backend/main.py`)
- FastAPI App → Task Routes: mounts router (evidence: `backend/main.py`)
- FastAPI App → Category Routes: mounts router (evidence: `backend/main.py`)
- FastAPI App → Profile Routes: mounts router (evidence: `backend/main.py`)
- User Routes → User Services: calls (evidence: `backend/users/routs.py`)
- User Routes → User Schemas: validates with (evidence: `backend/users/routs.py`)
- User Routes → User Model: queries (evidence: `backend/users/routs.py`)
- User Services → JWT Auth: decodes tokens (evidence: `backend/users/services.py`)
- User Services → User Model: queries (evidence: `backend/users/services.py`)
- User Services → DB Session: gets session (evidence: `backend/users/services.py`)
- Profile Routes → Profile Services: calls (evidence: `backend/profiles/routs.py`)
- Profile Routes → Profile Schemas: uses schemas (evidence: `backend/profiles/routs.py`)
- Profile Services → Profile Model: queries (evidence: `backend/profiles/services.py`)
- Profile Model → User Model: relates to (evidence: `backend/profiles/models.py`)
- Task Routes → User Services: authenticates with (evidence: `backend/tasks/routs.py`)
- Task Routes → Task Services: calls (evidence: `backend/tasks/routs.py`)
- Task Routes → Task Schemas: validates with (evidence: `backend/tasks/routs.py`)
- Task Routes → Task Model: creates and updates (evidence: `backend/tasks/routs.py`)
- Task Services → Task Model: queries (evidence: `backend/tasks/services.py`)
- Task Routes → Category Services: checks categories (evidence: `backend/tasks/routs.py`)
- Category Routes → Category Services: calls (evidence: `backend/categories/routs.py`)
- Category Routes → Category Schemas: uses schemas (evidence: `backend/categories/routs.py`)
- Category Services → Category Model: queries (evidence: `backend/categories/services.py`)
- Category Model → DB Session: uses base (evidence: `backend/categories/models.py`)
- Task Model → DB Session: uses base (evidence: `backend/tasks/models.py`)
- User Model → DB Session: uses base (evidence: `backend/users/models.py`)
- Profile Model → DB Session: uses base (evidence: `backend/profiles/models.py`)
- DB Session → Settings: loads config (evidence: `backend/core/database.py`)
- DB Session → SQL Database: connects to (evidence: `backend/core/database.py`)
- JWT Auth → Settings: loads secrets (evidence: `backend/auth/jwt_auth.py`)
