# mustafa-azeem/cohort-9-dotnet-14466-mustafa architecture

> Architecture diagram of the GitHub repository mustafa-azeem/cohort-9-dotnet-14466-mustafa, 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/mustafa-azeem/cohort-9-dotnet-14466-mustafa
- Repository: https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa

## Overview

Task Management Tool is a React client backed by an ASP.NET Core API for authentication, role-aware task management, and dashboard counts. Users register or log in to receive JWT credentials, then use protected task and dashboard screens; API controllers apply the authenticated identity and delegate task operations to services backed by SQL Server. Admins also manage task visibility and assignment and can list users. The README documents rate limiting, JWT authorization, and global exception handling; detailed wiring beyond the sampled controllers and services is summarized at the documented layer boundaries.

Main entry points: [`frontend/src/App.jsx`](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/App.jsx) (React app), [`backend/TaskManagementTool.API/Program.cs`](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Program.cs) (Request middleware), [`backend/TaskManagementTool.Infrastructure/Data/AppDbContext.cs`](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.Infrastructure/Data/AppDbContext.cs) (Task database context), [`frontend/src/services/taskService.js`](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/services/taskService.js) (Task client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["React client"]
  node_app["React app<br/>[App.jsx]"]
  node_authpages["Login and register<br/>[Login.jsx]"]
  node_taskpages["Task screens<br/>[TaskList.jsx]"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_profile["Profile<br/>[Profile.jsx]"]
  node_authcontext["Auth state<br/>[AuthContext.jsx]"]
  node_authui["Auth client<br/>[authService.js]"]
  node_taskui["Task client<br/>[taskService.js]"]
  node_http["HTTP client<br/>[api.js]"]
end

subgraph group_api["API and security"]
  node_authcontroller["Auth controller<br/>[AuthController.cs]"]
  node_taskscontroller["Tasks controller<br/>[TasksController.cs]"]
  node_userscontroller["Users controller<br/>[UsersController.cs]"]
  node_middleware["Request middleware<br/>[Program.cs]"]
  node_exception["Exception handler"]
end

subgraph group_services["Application services"]
  node_authservice["Authentication service<br/>[AuthService.cs]"]
  node_taskservice["Task service<br/>[TaskService.cs]"]
end

subgraph group_data["Domain and storage"]
  node_identity[("Identity store<br/>[Program.cs]")]
  node_taskdata[("Task database context<br/>[AppDbContext.cs]")]
  node_entities["Users and tasks<br/>[TaskItem.cs]"]
end

node_user(("User"))
node_sql[("SQL Server")]

node_user -->|"uses"| node_app
node_app -->|"routes"| node_authpages
node_app -->|"routes"| node_taskpages
node_app -->|"routes"| node_dashboard
node_app -->|"routes"| node_profile
node_app -->|"provides auth"| node_authcontext
node_authpages -->|"requests auth"| node_authui
node_authui -->|"sends requests"| node_http
node_taskpages -->|"requests tasks"| node_taskui
node_dashboard -->|"requests counts"| node_taskui
node_taskui -->|"sends requests"| node_http
node_http -->|"HTTP requests"| node_middleware
node_middleware -->|"dispatches auth"| node_authcontroller
node_middleware -->|"dispatches tasks"| node_taskscontroller
node_middleware -->|"dispatches users"| node_userscontroller
node_middleware -->|"handles errors"| node_exception
node_authcontroller -->|"calls"| node_authservice
node_taskscontroller -->|"calls"| node_taskservice
node_authservice -->|"manages accounts"| node_identity
node_userscontroller -->|"lists users"| node_identity
node_taskservice -->|"queries and saves"| node_taskdata
node_taskdata -->|"persists"| node_sql
node_taskdata -->|"stores"| node_entities

click node_app "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/App.jsx"
click node_authpages "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/pages/Login.jsx"
click node_taskpages "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/pages/TaskList.jsx"
click node_dashboard "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/pages/Dashboard.jsx"
click node_profile "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/pages/Profile.jsx"
click node_authcontext "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/context/AuthContext.jsx"
click node_authui "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/services/authService.js"
click node_taskui "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/services/taskService.js"
click node_http "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/services/api.js"
click node_authcontroller "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Controller/AuthController.cs"
click node_taskscontroller "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Controller/TasksController.cs"
click node_userscontroller "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Controller/UsersController.cs"
click node_middleware "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Program.cs"
click node_authservice "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.Infrastructure/Services/AuthService.cs"
click node_taskservice "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.Infrastructure/TaskService.cs"
click node_identity "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Program.cs"
click node_taskdata "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.Infrastructure/Data/AppDbContext.cs"
click node_entities "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.Domain/Entities/TaskItem.cs"
click node_exception "https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Middleware/ExceptionMiddleware.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_app,node_authpages,node_taskpages,node_dashboard,node_profile,node_authcontext,node_authui,node_taskui,node_http,node_user toneBlue
class node_authcontroller,node_taskscontroller,node_userscontroller,node_middleware,node_exception,node_sql toneAmber
class node_authservice,node_taskservice toneMint
class node_identity,node_taskdata,node_entities toneRose
```

## Components

### React client

- [React app](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login and register](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Task screens](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/pages/TaskList.jsx): `frontend/src/pages/TaskList.jsx`
- [Dashboard](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Profile](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/pages/Profile.jsx): `frontend/src/pages/Profile.jsx`
- [Auth state](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Auth client](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/services/authService.js): `frontend/src/services/authService.js`
- [Task client](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/services/taskService.js): `frontend/src/services/taskService.js`
- [HTTP client](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### API and security

- [Auth controller](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Controller/AuthController.cs): `backend/TaskManagementTool.API/Controller/AuthController.cs`
- [Tasks controller](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Controller/TasksController.cs): `backend/TaskManagementTool.API/Controller/TasksController.cs`
- [Users controller](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Controller/UsersController.cs): `backend/TaskManagementTool.API/Controller/UsersController.cs`
- [Request middleware](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Program.cs): `backend/TaskManagementTool.API/Program.cs`
- [Exception handler](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Middleware/ExceptionMiddleware.cs): `backend/TaskManagementTool.API/Middleware/ExceptionMiddleware.cs`

### Application services

- [Authentication service](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.Infrastructure/Services/AuthService.cs): `backend/TaskManagementTool.Infrastructure/Services/AuthService.cs`
- [Task service](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.Infrastructure/TaskService.cs): `backend/TaskManagementTool.Infrastructure/TaskService.cs`

### Domain and storage

- [Identity store](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.API/Program.cs): `backend/TaskManagementTool.API/Program.cs`
- [Task database context](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.Infrastructure/Data/AppDbContext.cs): `backend/TaskManagementTool.Infrastructure/Data/AppDbContext.cs`
- [Users and tasks](https://github.com/mustafa-azeem/cohort-9-dotnet-14466-mustafa/blob/main/backend/TaskManagementTool.Domain/Entities/TaskItem.cs): `backend/TaskManagementTool.Domain/Entities/TaskItem.cs`

### Other components

- **User**
- **SQL Server**

## Connections

- User → React app: uses
- React app → Login and register: routes
- React app → Task screens: routes
- React app → Dashboard: routes
- React app → Profile: routes
- React app → Auth state: provides auth
- Login and register → Auth client: requests auth
- Auth client → HTTP client: sends requests
- Task screens → Task client: requests tasks
- Dashboard → Task client: requests counts
- Task client → HTTP client: sends requests
- HTTP client → Request middleware: HTTP requests
- Request middleware → Auth controller: dispatches auth
- Request middleware → Tasks controller: dispatches tasks
- Request middleware → Users controller: dispatches users
- Request middleware → Exception handler: handles errors
- Auth controller → Authentication service: calls
- Tasks controller → Task service: calls
- Authentication service → Identity store: manages accounts
- Users controller → Identity store: lists users
- Task service → Task database context: queries and saves
- Task database context → SQL Server: persists
- Task database context → Users and tasks: stores
