# thursanches/task-manager-csharp architecture

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

- Interactive diagram: https://gitdiagram.com/thursanches/task-manager-csharp
- Repository: https://github.com/thursanches/task-manager-csharp

## Overview

##### Project type and purpose
- This is a .NET 8 RESTful API (“Task Manager CSharp”) using a layered architecture and SOLID principles.
- It exposes CRUD endpoints for tasks: POST/GET/PUT/DELETE under `/api/tasks`.

##### File structure
- Top‐level solution (`TaskManager.sln`) contains three projects:
- TaskManager.API – the ASP.NET Core Web API entry point (Controllers, Program.cs, appsettings)
- TaskManager.Application – business logic organized into “UseCases” (Register, GetAll, GetById, Update, Delete)
- TaskManager.Communication – DTOs for requests and responses (JSON models, enums)

##### README
- Confirms purpose (create/list/edit/delete tasks) and endpoints.
- Notes .NET 8 requirement, HTTP status codes, and sample cURL usage.

##### Detail
- Request and Response DTO classes under Communication Layer.

## Diagram (Mermaid)

```mermaid
flowchart TB
    Client["Client (Browser/Postman)"]:::external

    subgraph "API Layer"
        Controller["TaskManagerController"]:::api
        Program["Program.cs"]:::api
        Appsettings["appsettings.json"]:::api
        AppsettingsDev["appsettings.Development.json"]:::api
    end

    subgraph "Application Layer"
        subgraph "UseCases"
            Reg["RegisterTaskUseCase"]:::app
            GetAll["GetAllTaskUseCase"]:::app
            GetById["GetTaskByIdUseCase"]:::app
            Update["UpdateTaskUseCase"]:::app
            Delete["DeleteTaskByUdUseCase"]:::app
        end
    end

    subgraph "Communication Layer"
        Enums["PriorityType\\nStatusType"]:::comm
        Req["RequestRegisterTaskJson"]:::comm
        ResAll["ResponseAllTaskJson"]:::comm
        ResShort["ResponseShortTaskJson"]:::comm
        Res["ResponseTaskJson"]:::comm
        ResReg["ResponseRegisterTaskJson"]:::comm
        ResErr["ResponseErrorsJson"]:::comm
    end

    DataStore["Data Store (SQL/NoSQL)"]:::db

    Client -->|"HTTP/JSON"| Controller
    Controller -->|"deserializes to RequestRegisterTaskJson"| Req
    Controller --> Reg
    Controller --> GetAll
    Controller --> GetById
    Controller --> Update
    Controller --> Delete
    Reg -->|"CRUD"| DataStore
    GetAll -->|"CRUD"| DataStore
    GetById -->|"CRUD"| DataStore
    Update -->|"CRUD"| DataStore
    Delete -->|"CRUD"| DataStore
    DataStore -->|"result data"| Reg
    DataStore -->|"result data"| GetAll
    DataStore -->|"result data"| GetById
    DataStore -->|"result data"| Update
    DataStore -->|"result data"| Delete
    Reg -->|"returns Domain/DTO"| Controller
    GetAll -->|"returns Domain/DTO"| Controller
    GetById -->|"returns Domain/DTO"| Controller
    Update -->|"returns Domain/DTO"| Controller
    Delete -->|"returns Domain/DTO"| Controller
    Controller --> ResAll
    Controller --> ResShort
    Controller --> Res
    Controller --> ResReg
    Controller --> ResErr
    Controller -->|"HTTP/JSON"| Client

    click Controller "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.API/Controllers/TaskManagerController.cs"
    click Program "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.API/Program.cs"
    click Appsettings "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.API/appsettings.json"
    click AppsettingsDev "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.API/appsettings.Development.json"
    click Reg "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Application/UseCases/Tasks/Register/RegisterTaskUseCase.cs"
    click GetAll "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Application/UseCases/Tasks/GetAll/GetAllTaskUseCase.cs"
    click GetById "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Application/UseCases/Tasks/GetById/GetTaskByIdUseCase.cs"
    click Update "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Application/UseCases/Tasks/Update/UpdateTaskUseCase.cs"
    click Delete "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Application/UseCases/Tasks/Delete/DeleteTaskByUdUseCase.cs"
    click Enums "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Communication/Communication/Enums/PriorityType.cs"
    click Enums "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Communication/Communication/Enums/StatusType.cs"
    click Req "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Communication/Communication/Requests/RequestRegisterTaskJson.cs"
    click ResAll "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Communication/Communication/Responses/ResponseAllTaskJson.cs"
    click ResShort "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Communication/Communication/Responses/ResponseShortTaskJson.cs"
    click Res "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Communication/Communication/Responses/ResponseTaskJson.cs"
    click ResReg "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Communication/Communication/Responses/ResponseRegisterTaskJson.cs"
    click ResErr "https://github.com/thursanches/task-manager-csharp/blob/main/TaskManager.Communication/Communication/Responses/ResponseErrorsJson.cs"

    classDef external fill:#f9f,stroke:#333,stroke-width:1px
    classDef api fill:#bbf,stroke:#333,stroke-width:1px
    classDef app fill:#bfb,stroke:#333,stroke-width:1px
    classDef comm fill:#ffb,stroke:#333,stroke-width:1px
    classDef db fill:#fbb,stroke:#333,stroke-width:1px
```
