How m-a-nofal/projectmanagement works
This is an authenticated project-and-task management API. Users register or log in to obtain a JWT, then manage owned projects and the tasks nested within them; controllers translate HTTP requests into MediatR messages, and handlers perform use cases with persistence behind application contracts. The graph preserves the documented authentication, project, task, validation, exception, and persistence capabilities. Handler internals and several integrations were not sampled, so uncertain connections are dashed rather than asserted.
Main entry points: ValidationBehavior.cs Request Validation · IApplicationDbContext.cs Persistence Contract · ICurrentUserService.cs User Context Contract · Commands Project Commands
Components 22
HTTP API
- Authentication Routes
src/ProjectManagement.API/Controllers/AuthController.cs - Project Routes
src/ProjectManagement.API/Controllers/ProjectsController.cs - Task Routes
src/ProjectManagement.API/Controllers/ProjectTasksController.cs - Exception Mapping
src/ProjectManagement.API/Middleware/GlobalExceptionHandler.cs - Current User Adapter
src/ProjectManagement.API/Services/CurrentUserService.cs
Application Use Cases
- Register and Login
src/ProjectManagement.Application/Features/Authentication - Project Commands
src/ProjectManagement.Application/Features/Projects/Commands - Project Queries
src/ProjectManagement.Application/Features/Projects/Queries - Task Commands
src/ProjectManagement.Application/Features/Tasks/Commands - Task Queries
src/ProjectManagement.Application/Features/Tasks/Queries - Request Validation
src/ProjectManagement.Application/Common/Behaviors/ValidationBehavior.cs - Persistence Contract
src/ProjectManagement.Application/Common/Interfaces/IApplicationDbContext.cs - User Context Contract
src/ProjectManagement.Application/Common/Interfaces/ICurrentUserService.cs
Domain Model
- Project Entity
src/ProjectManagement.Domain/Entities/Project.cs - Task Entity
src/ProjectManagement.Domain/Entities/TaskItem.cs - User Entity
src/ProjectManagement.Domain/Entities/User.cs - Task Status
src/ProjectManagement.Domain/Enums/TaskItemStatus.cs - Task Priority
src/ProjectManagement.Domain/Enums/TaskPriority.cs
Infrastructure
- JWT Token Service
src/ProjectManagement.Infrastructure/Authentication/JwtTokenGenerator.cs - EF Core Context
src/ProjectManagement.Infrastructure/Persistence/ApplicationDbContext.cs
Other components
- API User
- SQL Server
Connections 29
- API User → Authentication Routes: registers or logs in
- API User → Project Routes: manages projects
- API User → Task Routes: manages tasks
- Authentication Routes → Register and Login: sends commands
src/ProjectManagement.API/Controllers/AuthController.cs - Project Routes → Project Commands: sends commands
src/ProjectManagement.API/Controllers/ProjectsController.cs - Project Routes → Project Queries: sends queries
src/ProjectManagement.API/Controllers/ProjectsController.cs - Task Routes → Task Commands: sends commands
src/ProjectManagement.API/Controllers/ProjectTasksController.cs - Task Routes → Task Queries: sends query
src/ProjectManagement.API/Controllers/ProjectTasksController.cs - Request Validation → Exception Mapping: validation errors map
- Project Commands → Request Validation: validated by pipeline
- Project Queries → Request Validation: validated by pipeline
- Task Commands → Request Validation: validated by pipeline
- Task Queries → Request Validation: validated by pipeline
- Project Commands → Persistence Contract: uses persistence
- Project Queries → Persistence Contract: uses persistence
src/ProjectManagement.Application/Features/Projects/Queries/GetProjects/GetProjectsQueryHandler.cs - Task Commands → Persistence Contract: uses persistence
src/ProjectManagement.Application/Features/Tasks/Commands/CreateTask/CreateTaskCommandHandler.cs - Task Queries → Persistence Contract: uses persistence
src/ProjectManagement.Application/Features/Tasks/Queries/GetTasksByProject/GetTasksByProjectQueryHandler.cs - Project Commands → User Context Contract: checks ownership
- Project Queries → User Context Contract: checks ownership
src/ProjectManagement.Application/Features/Projects/Queries/GetProjects/GetProjectsQueryHandler.cs - Task Commands → User Context Contract: checks ownership
src/ProjectManagement.Application/Features/Tasks/Commands/CreateTask/CreateTaskCommandHandler.cs - Task Queries → User Context Contract: checks ownership
src/ProjectManagement.Application/Features/Tasks/Queries/GetTasksByProject/GetTasksByProjectQueryHandler.cs - Current User Adapter → User Context Contract: implements contract
src/ProjectManagement.API/Services/CurrentUserService.cs - Register and Login → JWT Token Service: issues tokens
- Persistence Contract → EF Core Context: implemented by
src/ProjectManagement.Infrastructure/Persistence/ApplicationDbContext.cs - EF Core Context → SQL Server: reads and writes
- Project Entity → Task Entity: owns task collection
src/ProjectManagement.Domain/Entities/Project.cs - Task Entity → Task Status: has status
src/ProjectManagement.Domain/Entities/TaskItem.cs - Task Entity → Task Priority: has priority
src/ProjectManagement.Domain/Entities/TaskItem.cs - Exception Mapping → API User: returns API errors
src/ProjectManagement.API/Middleware/GlobalExceptionHandler.cs