# farukshihab/taskflowbackend architecture

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

- Interactive diagram: https://gitdiagram.com/farukshihab/taskflowbackend
- Repository: https://github.com/farukshihab/taskflowbackend

## Overview

This is a Django REST API for account access, task management, and medical-study image annotation. The main authenticated workflow is to create a study, upload images, and create or edit polygon annotations; task endpoints provide a separate create, update, move, and history workflow. The graph follows the sampled views and root routing. App URL details and several implementations were not sampled, so their internal links are limited to documented routing and visible calls.

Main entry points: [`apps/tasks/views.py`](https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/views.py) (Task endpoints), [`apps/annotations/views.py`](https://github.com/farukshihab/taskflowbackend/blob/main/apps/annotations/views.py) (Study endpoints), [`config/urls.py`](https://github.com/farukshihab/taskflowbackend/blob/main/config/urls.py) (Root API routes), [`db.sqlite3`](https://github.com/farukshihab/taskflowbackend/blob/main/db.sqlite3) (SQLite database)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Accounts"]
  node_auth_routes["Account routes<br/>[urls.py]"]
  node_auth_views["Account endpoints<br/>[views.py]"]
  node_auth_serializers["Account validation<br/>[serializers.py]"]
  node_user_model["User model<br/>[models.py]"]
end

subgraph group_tasks["Task management"]
  node_task_routes["Task routes<br/>[urls.py]"]
  node_task_views["Task endpoints<br/>[views.py]"]
  node_task_serializers["Task serialization<br/>[serializers.py]"]
  node_task_model["Tasks and history<br/>[models.py]"]
  node_task_utils["History helper<br/>[utils.py]"]
end

subgraph group_studies["Study annotation"]
  node_study_routes["Study routes<br/>[urls.py]"]
  node_study_views["Study endpoints<br/>[views.py]"]
  node_study_serializers["Study serialization<br/>[serializers.py]"]
  node_study_models["Studies and polygons<br/>[models.py]"]
end

subgraph group_runtime["API runtime and storage"]
  node_root_routes["Root API routes<br/>[urls.py]"]
  node_settings["Runtime settings<br/>[settings.py]"]
  node_database[("SQLite database<br/>[db.sqlite3]")]
  node_media["Uploaded images"]
end

node_client(("API client"))

node_client -->|"sends requests"| node_root_routes
node_root_routes -->|"routes accounts"| node_auth_routes
node_root_routes -->|"routes tasks"| node_task_routes
node_root_routes -->|"routes studies"| node_study_routes
node_auth_routes -->|"dispatches"| node_auth_views
node_task_routes -->|"dispatches"| node_task_views
node_study_routes -->|"dispatches"| node_study_views
node_auth_views -->|"validates"| node_auth_serializers
node_auth_serializers -->|"creates or authenticates"| node_user_model
node_task_views -->|"serializes"| node_task_serializers
node_task_views -->|"queries and saves"| node_task_model
node_task_views -->|"records history"| node_task_utils
node_task_utils -->|"writes history"| node_task_model
node_study_views -->|"serializes"| node_study_serializers
node_study_views -->|"queries and saves"| node_study_models
node_study_views -->|"stores uploaded images"| node_media
node_user_model -->|"persists"| node_database
node_task_model -->|"persists"| node_database
node_study_models -->|"persists"| node_database
node_settings -->|"configures"| node_database
node_settings -->|"configures storage"| node_media
node_settings -->|"enables JWT authentication"| node_auth_views

click node_root_routes "https://github.com/farukshihab/taskflowbackend/blob/main/config/urls.py"
click node_auth_routes "https://github.com/farukshihab/taskflowbackend/blob/main/apps/authentication/urls.py"
click node_auth_views "https://github.com/farukshihab/taskflowbackend/blob/main/apps/authentication/views.py"
click node_auth_serializers "https://github.com/farukshihab/taskflowbackend/blob/main/apps/authentication/serializers.py"
click node_user_model "https://github.com/farukshihab/taskflowbackend/blob/main/apps/authentication/models.py"
click node_task_routes "https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/urls.py"
click node_task_views "https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/views.py"
click node_task_serializers "https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/serializers.py"
click node_task_model "https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/models.py"
click node_task_utils "https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/utils.py"
click node_study_routes "https://github.com/farukshihab/taskflowbackend/blob/main/apps/annotations/urls.py"
click node_study_views "https://github.com/farukshihab/taskflowbackend/blob/main/apps/annotations/views.py"
click node_study_serializers "https://github.com/farukshihab/taskflowbackend/blob/main/apps/annotations/serializers.py"
click node_study_models "https://github.com/farukshihab/taskflowbackend/blob/main/apps/annotations/models.py"
click node_settings "https://github.com/farukshihab/taskflowbackend/blob/main/config/settings.py"
click node_database "https://github.com/farukshihab/taskflowbackend/blob/main/db.sqlite3"
click node_media "https://github.com/farukshihab/taskflowbackend/tree/main/media"

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_auth_routes,node_auth_views,node_auth_serializers,node_user_model,node_client toneBlue
class node_task_routes,node_task_views,node_task_serializers,node_task_model,node_task_utils toneAmber
class node_study_routes,node_study_views,node_study_serializers,node_study_models toneMint
class node_root_routes,node_settings,node_database,node_media toneRose
```

## Components

### Accounts

- [Account routes](https://github.com/farukshihab/taskflowbackend/blob/main/apps/authentication/urls.py): `apps/authentication/urls.py`
- [Account endpoints](https://github.com/farukshihab/taskflowbackend/blob/main/apps/authentication/views.py): `apps/authentication/views.py`
- [Account validation](https://github.com/farukshihab/taskflowbackend/blob/main/apps/authentication/serializers.py): `apps/authentication/serializers.py`
- [User model](https://github.com/farukshihab/taskflowbackend/blob/main/apps/authentication/models.py): `apps/authentication/models.py`

### Task management

- [Task routes](https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/urls.py): `apps/tasks/urls.py`
- [Task endpoints](https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/views.py): `apps/tasks/views.py`
- [Task serialization](https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/serializers.py): `apps/tasks/serializers.py`
- [Tasks and history](https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/models.py): `apps/tasks/models.py`
- [History helper](https://github.com/farukshihab/taskflowbackend/blob/main/apps/tasks/utils.py): `apps/tasks/utils.py`

### Study annotation

- [Study routes](https://github.com/farukshihab/taskflowbackend/blob/main/apps/annotations/urls.py): `apps/annotations/urls.py`
- [Study endpoints](https://github.com/farukshihab/taskflowbackend/blob/main/apps/annotations/views.py): `apps/annotations/views.py`
- [Study serialization](https://github.com/farukshihab/taskflowbackend/blob/main/apps/annotations/serializers.py): `apps/annotations/serializers.py`
- [Studies and polygons](https://github.com/farukshihab/taskflowbackend/blob/main/apps/annotations/models.py): `apps/annotations/models.py`

### API runtime and storage

- [Root API routes](https://github.com/farukshihab/taskflowbackend/blob/main/config/urls.py): `config/urls.py`
- [Runtime settings](https://github.com/farukshihab/taskflowbackend/blob/main/config/settings.py): `config/settings.py`
- [SQLite database](https://github.com/farukshihab/taskflowbackend/blob/main/db.sqlite3): `db.sqlite3`
- [Uploaded images](https://github.com/farukshihab/taskflowbackend/tree/main/media): `media`

### Other components

- **API client**

## Connections

- API client → Root API routes: sends requests
- Root API routes → Account routes: routes accounts
- Root API routes → Task routes: routes tasks
- Root API routes → Study routes: routes studies
- Account routes → Account endpoints: dispatches
- Task routes → Task endpoints: dispatches
- Study routes → Study endpoints: dispatches
- Account endpoints → Account validation: validates
- Account validation → User model: creates or authenticates
- Task endpoints → Task serialization: serializes
- Task endpoints → Tasks and history: queries and saves
- Task endpoints → History helper: records history
- History helper → Tasks and history: writes history
- Study endpoints → Study serialization: serializes
- Study endpoints → Studies and polygons: queries and saves
- Study endpoints → Uploaded images: stores uploaded images
- User model → SQLite database: persists
- Tasks and history → SQLite database: persists
- Studies and polygons → SQLite database: persists
- Runtime settings → SQLite database: configures
- Runtime settings → Uploaded images: configures storage
- Runtime settings → Account endpoints: enables JWT authentication
