# hdbv95/task-management-system architecture

> Architecture diagram of the GitHub repository hdbv95/task-management-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hdbv95/task-management-system
- Repository: https://github.com/hdbv95/task-management-system

## Overview

##### Main Components
- Frontend Client: Represent the React application (frontend/tasks-app). Note that it handles display, JWT auto-refresh, and interacts with the backend API using REST calls (GET, POST, PATCH, DELETE).
- Backend API: Represent the Django project (backend/task_manager). Break it down into its main apps or modules (e.g., “tasks” and “users”). Show that it uses Django REST Framework for exposing the API endpoints and JWT for authentication. Include the swagger & ReDoc documentation endpoints.
- Database: Clearly indicate the SQLite database that the backend uses. Also, mention the initial fixture (db_fixture.json) that is used to set up the database.
- Containerization: Represent Docker and Docker Compose. Show that both the frontend and backend have their Dockerfiles and are orchestrated using docker-compose. This helps emphasize that the entire system is containerized.

##### Relationships and Interactions
- If desired, include a component for unit testing (mentions of pytest for backend) to note that testing is a core aspect of the development process, though this might not need to be highlighted in the high-level architecture.

##### Architectural Patterns and Design Principles
- That the backend follows an MVT (Model-View-Template) / RESTful architecture pattern – highlight that the “tasks” and “users” apps separate concerns (models, serializers, views, etc.).
- Separation of concerns between the frontend and backend. The frontend is built with modern technologies (React/Vite/TypeScript) and acts as the consumer of the API.

##### Technology Stack
- Specify Django, Django REST Framework, and JWT for the backend.
- Specify React, Vite, and TypeScript for the frontend.
- Docker is pivotal for containerization; include Docker Compose for orchestrating multi-container setup.
- SQLite as the database system.
- Additionally, mention pre-commit hooks and tools like black, flake8, and mypy used for ensuring code quality.

## Diagram (Mermaid)

```mermaid
flowchart TD
    DCompose["Docker Compose (Orchestration)"]:::orchestration

    subgraph "Frontend Container"
        FFE["React Frontend"]:::frontend
        FFD["Dockerfile (Frontend)"]:::container
    end

    subgraph "Backend Container"
        DBE["Django API Backend"]:::backend
        TM["Tasks Module (Django)"]:::backend
        UM["Users Module (Django)"]:::backend
        API_DOC["API Documentation (Swagger & ReDoc)"]:::doc
        BDF["Dockerfile (Backend)"]:::container
    end

    DB["SQLite Database"]:::db

    DCompose --> FFE
    DCompose --> DBE
    FFE -->|"RESTAPICalls&JWT"| DBE
    DBE -->|"CRUDOps"| DB
    DBE --> TM
    DBE --> UM
    DBE --> API_DOC
    FFE -->|"containerizedBy"| FFD
    DBE -->|"containerizedBy"| BDF

    click DCompose "https://github.com/hdbv95/task-management-system/blob/main/docker-compose.yml"
    click FFE "https://github.com/hdbv95/task-management-system/tree/main/frontend/tasks-app"
    click FFD "https://github.com/hdbv95/task-management-system/tree/main/frontend/dockerfile"
    click DBE "https://github.com/hdbv95/task-management-system/tree/main/backend/task_manager"
    click TM "https://github.com/hdbv95/task-management-system/tree/main/backend/task_manager/tasks"
    click UM "https://github.com/hdbv95/task-management-system/tree/main/backend/task_manager/users"
    click API_DOC "https://github.com/hdbv95/task-management-system/tree/main/backend/task_manager/swaggers"
    click DB "https://github.com/hdbv95/task-management-system/blob/main/backend/task_manager/fixtures/db_fixture.json"
    click BDF "https://github.com/hdbv95/task-management-system/tree/main/backend/dockerfile"

    classDef frontend fill:#ADD8E6,stroke:#000,stroke-width:2px;
    classDef backend fill:#90EE90,stroke:#000,stroke-width:2px;
    classDef db fill:#FFCCCB,stroke:#000,stroke-width:2px;
    classDef orchestration fill:#FFD700,stroke:#000,stroke-width:2px;
    classDef doc fill:#E6E6FA,stroke:#000,stroke-width:2px;
    classDef container fill:#F0E68C,stroke:#000,stroke-width:2px;
```
