# admira1b/taskflow architecture

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

- Interactive diagram: https://gitdiagram.com/admira1b/taskflow
- Repository: https://github.com/admira1b/taskflow

## Overview

TaskFlow is a microservices task and project management system with a gateway and separate identity and task services. The intended user workflow enters through the gateway, then uses identity capabilities for accounts and authentication and task capabilities for projects, members, groups, tasks, and comments. Services persist domain data and include messaging integration; shared libraries provide service discovery, API-client resilience, and common runtime abstractions. Source excerpts confirm several task-query repository calls and gateway discovery configuration; other service wiring is not shown, so those links are omitted or marked unverified.

Main entry points: [`Src/Services/Tasks/TaskFlow.Tasks.API/Controllers`](https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.API/Controllers) (Tasks API), [`Src/Services/Tasks/TaskFlow.Tasks.Infrastructure.SqlServer/TasksServiceDbContext.cs`](https://github.com/admira1b/taskflow/blob/main/Src/Services/Tasks/TaskFlow.Tasks.Infrastructure.SqlServer/TasksServiceDbContext.cs) (Tasks SQL store), [`Src/ApiGateway/TaskFlow.Gateway/Program.cs`](https://github.com/admira1b/taskflow/blob/main/Src/ApiGateway/TaskFlow.Gateway/Program.cs) (API gateway), [`Src/Services/Identity/TaskFlow.Identity.API/Controllers`](https://github.com/admira1b/taskflow/tree/main/Src/Services/Identity/TaskFlow.Identity.API/Controllers) (Identity API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Request entry"]
  node_gateway["API gateway<br/>[Program.cs]"]
  node_routing["Service routing"]
end

subgraph group_identity["Identity service"]
  node_identity_api["Identity API<br/>[Controllers]"]
  node_identity_auth["Authentication<br/>[AuthController.cs]"]
  node_identity_commands["Account and role changes<br/>[Commands]"]
  node_identity_queries["Account and role queries<br/>[Queries]"]
  node_jwt["JWT service"]
  node_identity_domain["Identity domain<br/>[Entities]"]
  node_identity_db[("Identity SQL store")]
  node_identity_events["Identity event publisher"]
end

subgraph group_tasks["Task service"]
  node_tasks_api["Tasks API<br/>[Controllers]"]
  node_project_work["Projects and members<br/>[Project]"]
  node_group_work["Task groups<br/>[TaskGroup]"]
  node_task_work["Tasks and comments<br/>[TaskItem]"]
  node_task_queries["Task queries<br/>[Queries]"]
  node_task_domain["Task domain<br/>[Entities]"]
  node_task_db[("Tasks SQL store")]
  node_task_events["Task event consumer"]
  node_deleted_handler["User deletion handler"]
end

subgraph group_shared["Shared runtime"]
  node_consul["Consul discovery"]
  node_service_client["HTTP service client"]
  node_identity_client["Identity client"]
  node_rabbit["RabbitMQ transport<br/>[Services]"]
  node_common["Shared core<br/>[RequestResult.cs]"]
end

node_user(("User"))

node_user -.->|"sends requests"| node_gateway
node_gateway -.->|"configures routes"| node_routing
node_routing -->|"uses discovery"| node_consul
node_gateway -.->|"routes requests"| node_identity_api
node_gateway -.->|"routes requests"| node_tasks_api
node_identity_api -.->|"hosts authentication"| node_identity_auth
node_identity_auth -.->|"dispatches commands"| node_identity_commands
node_identity_api -.->|"dispatches changes"| node_identity_commands
node_identity_api -.->|"dispatches queries"| node_identity_queries
node_identity_commands -.->|"persists changes"| node_identity_db
node_identity_queries -.->|"reads data"| node_identity_db
node_identity_auth -.->|"uses tokens"| node_jwt
node_identity_commands -.->|"publishes events"| node_identity_events
node_identity_db -.->|"stores entities"| node_identity_domain
node_tasks_api -.->|"dispatches changes"| node_project_work
node_tasks_api -.->|"dispatches changes"| node_group_work
node_tasks_api -.->|"dispatches changes"| node_task_work
node_tasks_api -.->|"dispatches queries"| node_task_queries
node_project_work -.->|"persists changes"| node_task_db
node_group_work -.->|"persists changes"| node_task_db
node_task_work -.->|"persists changes"| node_task_db
node_task_queries -.->|"reads data"| node_task_db
node_task_queries -->|"maps entities"| node_task_domain
node_task_queries -->|"returns results"| node_common
node_task_db -.->|"stores entities"| node_task_domain
node_task_events -.->|"dispatches events"| node_deleted_handler
node_identity_events -.->|"publishes messages"| node_rabbit
node_task_events -.->|"consumes messages"| node_rabbit
node_identity_client -.->|"inherits client"| node_service_client

click node_gateway "https://github.com/admira1b/taskflow/blob/main/Src/ApiGateway/TaskFlow.Gateway/Program.cs"
click node_routing "https://github.com/admira1b/taskflow/blob/main/Src/ApiGateway/TaskFlow.Gateway/Extensions/ServicesRoutingExtensions.cs"
click node_identity_api "https://github.com/admira1b/taskflow/tree/main/Src/Services/Identity/TaskFlow.Identity.API/Controllers"
click node_identity_auth "https://github.com/admira1b/taskflow/blob/main/Src/Services/Identity/TaskFlow.Identity.API/Controllers/AuthController.cs"
click node_identity_commands "https://github.com/admira1b/taskflow/tree/main/Src/Services/Identity/TaskFlow.Identity.Application/Commands"
click node_identity_queries "https://github.com/admira1b/taskflow/tree/main/Src/Services/Identity/TaskFlow.Identity.Application/Queries"
click node_jwt "https://github.com/admira1b/taskflow/blob/main/Src/Services/Identity/TaskFlow.Identity.Application/Services/JsonWebTokenService.cs"
click node_identity_domain "https://github.com/admira1b/taskflow/tree/main/Src/Services/Identity/TaskFlow.Identity.Domain/Entities"
click node_identity_db "https://github.com/admira1b/taskflow/blob/main/Src/Services/Identity/TaskFlow.Identity.Infrastructure.SqlServer/IdentityServiceDbContext.cs"
click node_identity_events "https://github.com/admira1b/taskflow/blob/main/Src/Services/Identity/TaskFlow.Identity.Infrastructure.Messaging/IdentityServiceEventPublisher.cs"
click node_tasks_api "https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.API/Controllers"
click node_project_work "https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Application/Commands/Project"
click node_group_work "https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Application/Commands/TaskGroup"
click node_task_work "https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Application/Commands/TaskItem"
click node_task_queries "https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Application/Queries"
click node_task_domain "https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Domain/Entities"
click node_task_db "https://github.com/admira1b/taskflow/blob/main/Src/Services/Tasks/TaskFlow.Tasks.Infrastructure.SqlServer/TasksServiceDbContext.cs"
click node_task_events "https://github.com/admira1b/taskflow/blob/main/Src/Services/Tasks/TaskFlow.Tasks.Infrastructure.Messaging/TasksServiceEventConsumer.cs"
click node_deleted_handler "https://github.com/admira1b/taskflow/blob/main/Src/Services/Tasks/TaskFlow.Tasks.Application/ExternalEvents/UserDeletedEventHandler.cs"
click node_consul "https://github.com/admira1b/taskflow/blob/main/Src/Shared/TaskFlow.Shared.Consul/ConsulHostedService.cs"
click node_service_client "https://github.com/admira1b/taskflow/blob/main/Src/Shared/TaskFlow.Shared.ApiClients/ServiceClientBase.cs"
click node_identity_client "https://github.com/admira1b/taskflow/blob/main/Src/Shared/TaskFlow.Shared.ApiClients/IdentityService/IdentityServiceClient.cs"
click node_rabbit "https://github.com/admira1b/taskflow/tree/main/Src/Shared/TaskFlow.Shared.Messaging/RabbitMQ/Services"
click node_common "https://github.com/admira1b/taskflow/blob/main/Src/Shared/TaskFlow.Shared.Core/Results/RequestResult.cs"

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_gateway,node_routing,node_user toneBlue
class node_identity_api,node_identity_auth,node_identity_commands,node_identity_queries,node_jwt,node_identity_domain,node_identity_db,node_identity_events toneAmber
class node_tasks_api,node_project_work,node_group_work,node_task_work,node_task_queries,node_task_domain,node_task_db,node_task_events,node_deleted_handler toneMint
class node_consul,node_service_client,node_identity_client,node_rabbit,node_common toneRose
```

## Components

### Request entry

- [API gateway](https://github.com/admira1b/taskflow/blob/main/Src/ApiGateway/TaskFlow.Gateway/Program.cs): `Src/ApiGateway/TaskFlow.Gateway/Program.cs`
- [Service routing](https://github.com/admira1b/taskflow/blob/main/Src/ApiGateway/TaskFlow.Gateway/Extensions/ServicesRoutingExtensions.cs): `Src/ApiGateway/TaskFlow.Gateway/Extensions/ServicesRoutingExtensions.cs`

### Identity service

- [Identity API](https://github.com/admira1b/taskflow/tree/main/Src/Services/Identity/TaskFlow.Identity.API/Controllers): `Src/Services/Identity/TaskFlow.Identity.API/Controllers`
- [Authentication](https://github.com/admira1b/taskflow/blob/main/Src/Services/Identity/TaskFlow.Identity.API/Controllers/AuthController.cs): `Src/Services/Identity/TaskFlow.Identity.API/Controllers/AuthController.cs`
- [Account and role changes](https://github.com/admira1b/taskflow/tree/main/Src/Services/Identity/TaskFlow.Identity.Application/Commands): `Src/Services/Identity/TaskFlow.Identity.Application/Commands`
- [Account and role queries](https://github.com/admira1b/taskflow/tree/main/Src/Services/Identity/TaskFlow.Identity.Application/Queries): `Src/Services/Identity/TaskFlow.Identity.Application/Queries`
- [JWT service](https://github.com/admira1b/taskflow/blob/main/Src/Services/Identity/TaskFlow.Identity.Application/Services/JsonWebTokenService.cs): `Src/Services/Identity/TaskFlow.Identity.Application/Services/JsonWebTokenService.cs`
- [Identity domain](https://github.com/admira1b/taskflow/tree/main/Src/Services/Identity/TaskFlow.Identity.Domain/Entities): `Src/Services/Identity/TaskFlow.Identity.Domain/Entities`
- [Identity SQL store](https://github.com/admira1b/taskflow/blob/main/Src/Services/Identity/TaskFlow.Identity.Infrastructure.SqlServer/IdentityServiceDbContext.cs): `Src/Services/Identity/TaskFlow.Identity.Infrastructure.SqlServer/IdentityServiceDbContext.cs`
- [Identity event publisher](https://github.com/admira1b/taskflow/blob/main/Src/Services/Identity/TaskFlow.Identity.Infrastructure.Messaging/IdentityServiceEventPublisher.cs): `Src/Services/Identity/TaskFlow.Identity.Infrastructure.Messaging/IdentityServiceEventPublisher.cs`

### Task service

- [Tasks API](https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.API/Controllers): `Src/Services/Tasks/TaskFlow.Tasks.API/Controllers`
- [Projects and members](https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Application/Commands/Project): `Src/Services/Tasks/TaskFlow.Tasks.Application/Commands/Project`
- [Task groups](https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Application/Commands/TaskGroup): `Src/Services/Tasks/TaskFlow.Tasks.Application/Commands/TaskGroup`
- [Tasks and comments](https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Application/Commands/TaskItem): `Src/Services/Tasks/TaskFlow.Tasks.Application/Commands/TaskItem`
- [Task queries](https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Application/Queries): `Src/Services/Tasks/TaskFlow.Tasks.Application/Queries`
- [Task domain](https://github.com/admira1b/taskflow/tree/main/Src/Services/Tasks/TaskFlow.Tasks.Domain/Entities): `Src/Services/Tasks/TaskFlow.Tasks.Domain/Entities`
- [Tasks SQL store](https://github.com/admira1b/taskflow/blob/main/Src/Services/Tasks/TaskFlow.Tasks.Infrastructure.SqlServer/TasksServiceDbContext.cs): `Src/Services/Tasks/TaskFlow.Tasks.Infrastructure.SqlServer/TasksServiceDbContext.cs`
- [Task event consumer](https://github.com/admira1b/taskflow/blob/main/Src/Services/Tasks/TaskFlow.Tasks.Infrastructure.Messaging/TasksServiceEventConsumer.cs): `Src/Services/Tasks/TaskFlow.Tasks.Infrastructure.Messaging/TasksServiceEventConsumer.cs`
- [User deletion handler](https://github.com/admira1b/taskflow/blob/main/Src/Services/Tasks/TaskFlow.Tasks.Application/ExternalEvents/UserDeletedEventHandler.cs): `Src/Services/Tasks/TaskFlow.Tasks.Application/ExternalEvents/UserDeletedEventHandler.cs`

### Shared runtime

- [Consul discovery](https://github.com/admira1b/taskflow/blob/main/Src/Shared/TaskFlow.Shared.Consul/ConsulHostedService.cs): `Src/Shared/TaskFlow.Shared.Consul/ConsulHostedService.cs`
- [HTTP service client](https://github.com/admira1b/taskflow/blob/main/Src/Shared/TaskFlow.Shared.ApiClients/ServiceClientBase.cs): `Src/Shared/TaskFlow.Shared.ApiClients/ServiceClientBase.cs`
- [Identity client](https://github.com/admira1b/taskflow/blob/main/Src/Shared/TaskFlow.Shared.ApiClients/IdentityService/IdentityServiceClient.cs): `Src/Shared/TaskFlow.Shared.ApiClients/IdentityService/IdentityServiceClient.cs`
- [RabbitMQ transport](https://github.com/admira1b/taskflow/tree/main/Src/Shared/TaskFlow.Shared.Messaging/RabbitMQ/Services): `Src/Shared/TaskFlow.Shared.Messaging/RabbitMQ/Services`
- [Shared core](https://github.com/admira1b/taskflow/blob/main/Src/Shared/TaskFlow.Shared.Core/Results/RequestResult.cs): `Src/Shared/TaskFlow.Shared.Core/Results/RequestResult.cs`

### Other components

- **User**

## Connections

- User → API gateway: sends requests
- API gateway → Service routing: configures routes
- Service routing → Consul discovery: uses discovery (evidence: `Src/ApiGateway/TaskFlow.Gateway/Extensions/ServicesRoutingExtensions.cs`)
- API gateway → Identity API: routes requests
- API gateway → Tasks API: routes requests
- Identity API → Authentication: hosts authentication
- Authentication → Account and role changes: dispatches commands
- Identity API → Account and role changes: dispatches changes
- Identity API → Account and role queries: dispatches queries
- Account and role changes → Identity SQL store: persists changes
- Account and role queries → Identity SQL store: reads data
- Authentication → JWT service: uses tokens
- Account and role changes → Identity event publisher: publishes events
- Identity SQL store → Identity domain: stores entities
- Tasks API → Projects and members: dispatches changes
- Tasks API → Task groups: dispatches changes
- Tasks API → Tasks and comments: dispatches changes
- Tasks API → Task queries: dispatches queries
- Projects and members → Tasks SQL store: persists changes
- Task groups → Tasks SQL store: persists changes
- Tasks and comments → Tasks SQL store: persists changes
- Task queries → Tasks SQL store: reads data
- Task queries → Task domain: maps entities (evidence: `Src/Services/Tasks/TaskFlow.Tasks.Application/Queries/TaskItem/GetByProject/GetTaskItemsByProjectQueryHandler.cs`)
- Task queries → Shared core: returns results (evidence: `Src/Services/Tasks/TaskFlow.Tasks.Application/Queries/TaskItem/GetByProject/GetTaskItemsByProjectQueryHandler.cs`)
- Tasks SQL store → Task domain: stores entities
- Task event consumer → User deletion handler: dispatches events
- Identity event publisher → RabbitMQ transport: publishes messages
- Task event consumer → RabbitMQ transport: consumes messages
- Identity client → HTTP service client: inherits client (evidence: `Src/Shared/TaskFlow.Shared.ApiClients/IdentityService/IdentityServiceClient.cs`)
