# arbind0011/task-manager-pro architecture

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

- Interactive diagram: https://gitdiagram.com/arbind0011/task-manager-pro
- Repository: https://github.com/arbind0011/task-manager-pro

## Overview

This is a task-management web application with a React client and an Express/Mongoose server. Users register or log in, then manage tasks in a protected dashboard: tasks can be created, listed, searched, filtered, sorted, updated, and deleted, with status and overdue statistics. The graph captures the client’s dashboard components and the server’s authentication and task handlers. Some client-to-server wiring and database connection details are not shown in excerpts, so those links are omitted or marked unverified.

Main entry points: [`client/src/pages/Dashboard.jsx`](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/pages/Dashboard.jsx) (Dashboard), [`client/src/context/AuthContext.jsx`](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/context/AuthContext.jsx) (Auth state), [`client/src/App.jsx`](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/App.jsx) (App routing), [`client/src/services/taskService.js`](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/services/taskService.js) (Task API service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client application"]
  node_app["App routing<br/>[App.jsx]"]
  node_protected["Route guard<br/>[ProtectedRoute.jsx]"]
  node_api["HTTP client<br/>[api.js]"]
end

subgraph group_auth["Authentication"]
  node_login["Login page<br/>[Login.jsx]"]
  node_register["Registration page<br/>[Register.jsx]"]
  node_authcontext["Auth state<br/>[AuthContext.jsx]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_authcontroller["Auth handlers<br/>[authController.js]"]
  node_authmiddleware["Token protection<br/>[authMiddleware.js]"]
end

subgraph group_tasks["Task management"]
  node_dashboard["Dashboard<br/>[Dashboard.jsx]"]
  node_taskservice["Task API service<br/>[taskService.js]"]
  node_taskform["Task form<br/>[TaskForm.jsx]"]
  node_taskcontrols["Task controls<br/>[TaskControls.jsx]"]
  node_taskcard["Task card<br/>[TaskCard.jsx]"]
  node_taskstats["Task statistics<br/>[TaskStats.jsx]"]
  node_taskroutes["Task routes<br/>[taskRoutes.js]"]
  node_taskcontroller["Task handlers<br/>[taskController.js]"]
end

subgraph group_server["Server and persistence"]
  node_server["Express server<br/>[server.js]"]
  node_user_model["User model<br/>[User.js]"]
  node_task_model["Task model<br/>[Task.js]"]
  node_dbconfig["Database connector<br/>[db.js]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"provides auth"| node_authcontext
node_app -->|"guards dashboard"| node_protected
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_dashboard
node_protected -->|"checks auth"| node_authcontext
node_login -->|"uses"| node_authcontext
node_register -->|"uses"| node_authcontext
node_authcontext -->|"sends auth requests"| node_api
node_dashboard -->|"reads auth state"| node_authcontext
node_dashboard -->|"loads and changes tasks"| node_taskservice
node_dashboard -->|"renders"| node_taskform
node_dashboard -->|"renders"| node_taskcontrols
node_dashboard -->|"renders"| node_taskcard
node_dashboard -->|"renders"| node_taskstats
node_taskform -->|"creates tasks"| node_taskservice
node_taskservice -->|"sends task requests"| node_api
node_server -->|"connects database"| node_dbconfig
node_server -->|"mounts auth routes"| node_authroutes
node_server -->|"mounts task routes"| node_taskroutes
node_authroutes -->|"dispatches"| node_authcontroller
node_taskroutes -->|"protects routes"| node_authmiddleware
node_taskroutes -->|"dispatches"| node_taskcontroller
node_authcontroller -->|"reads and creates users"| node_user_model
node_authmiddleware -->|"loads user"| node_user_model
node_taskcontroller -->|"reads and writes tasks"| node_task_model
node_taskservice -.->|"calls task endpoints"| node_taskroutes
node_authcontext -.->|"calls auth endpoints"| node_authroutes

click node_app "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/App.jsx"
click node_protected "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/ProtectedRoute.jsx"
click node_dashboard "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/pages/Dashboard.jsx"
click node_login "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/pages/Login.jsx"
click node_register "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/pages/Register.jsx"
click node_authcontext "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/context/AuthContext.jsx"
click node_api "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/services/api.js"
click node_taskservice "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/services/taskService.js"
click node_taskform "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/TaskForm.jsx"
click node_taskcontrols "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/TaskControls.jsx"
click node_taskcard "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/TaskCard.jsx"
click node_taskstats "https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/TaskStats.jsx"
click node_server "https://github.com/arbind0011/task-manager-pro/blob/main/server/server.js"
click node_authroutes "https://github.com/arbind0011/task-manager-pro/blob/main/server/routes/authRoutes.js"
click node_authcontroller "https://github.com/arbind0011/task-manager-pro/blob/main/server/controllers/authController.js"
click node_authmiddleware "https://github.com/arbind0011/task-manager-pro/blob/main/server/middleware/authMiddleware.js"
click node_taskroutes "https://github.com/arbind0011/task-manager-pro/blob/main/server/routes/taskRoutes.js"
click node_taskcontroller "https://github.com/arbind0011/task-manager-pro/blob/main/server/controllers/taskController.js"
click node_user_model "https://github.com/arbind0011/task-manager-pro/blob/main/server/models/User.js"
click node_task_model "https://github.com/arbind0011/task-manager-pro/blob/main/server/models/Task.js"
click node_dbconfig "https://github.com/arbind0011/task-manager-pro/blob/main/server/config/db.js"

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_protected,node_api,node_user toneBlue
class node_login,node_register,node_authcontext,node_authroutes,node_authcontroller,node_authmiddleware toneAmber
class node_dashboard,node_taskservice,node_taskform,node_taskcontrols,node_taskcard,node_taskstats,node_taskroutes,node_taskcontroller toneMint
class node_server,node_user_model,node_task_model,node_dbconfig toneRose
```

## Components

### Client application

- [App routing](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Route guard](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/ProtectedRoute.jsx): `client/src/components/ProtectedRoute.jsx`
- [HTTP client](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/services/api.js): `client/src/services/api.js`

### Authentication

- [Login page](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/pages/Login.jsx): `client/src/pages/Login.jsx`
- [Registration page](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/pages/Register.jsx): `client/src/pages/Register.jsx`
- [Auth state](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/context/AuthContext.jsx): `client/src/context/AuthContext.jsx`
- [Auth routes](https://github.com/arbind0011/task-manager-pro/blob/main/server/routes/authRoutes.js): `server/routes/authRoutes.js`
- [Auth handlers](https://github.com/arbind0011/task-manager-pro/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Token protection](https://github.com/arbind0011/task-manager-pro/blob/main/server/middleware/authMiddleware.js): `server/middleware/authMiddleware.js`

### Task management

- [Dashboard](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`
- [Task API service](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/services/taskService.js): `client/src/services/taskService.js`
- [Task form](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/TaskForm.jsx): `client/src/components/TaskForm.jsx`
- [Task controls](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/TaskControls.jsx): `client/src/components/TaskControls.jsx`
- [Task card](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/TaskCard.jsx): `client/src/components/TaskCard.jsx`
- [Task statistics](https://github.com/arbind0011/task-manager-pro/blob/main/client/src/components/TaskStats.jsx): `client/src/components/TaskStats.jsx`
- [Task routes](https://github.com/arbind0011/task-manager-pro/blob/main/server/routes/taskRoutes.js): `server/routes/taskRoutes.js`
- [Task handlers](https://github.com/arbind0011/task-manager-pro/blob/main/server/controllers/taskController.js): `server/controllers/taskController.js`

### Server and persistence

- [Express server](https://github.com/arbind0011/task-manager-pro/blob/main/server/server.js): `server/server.js`
- [User model](https://github.com/arbind0011/task-manager-pro/blob/main/server/models/User.js): `server/models/User.js`
- [Task model](https://github.com/arbind0011/task-manager-pro/blob/main/server/models/Task.js): `server/models/Task.js`
- [Database connector](https://github.com/arbind0011/task-manager-pro/blob/main/server/config/db.js): `server/config/db.js`

### Other components

- **User**

## Connections

- User → App routing: uses (evidence: `client/src/App.jsx`)
- App routing → Auth state: provides auth (evidence: `client/src/App.jsx`)
- App routing → Route guard: guards dashboard (evidence: `client/src/App.jsx`)
- App routing → Login page: routes to (evidence: `client/src/App.jsx`)
- App routing → Registration page: routes to (evidence: `client/src/App.jsx`)
- App routing → Dashboard: routes to (evidence: `client/src/App.jsx`)
- Route guard → Auth state: checks auth (evidence: `client/src/components/ProtectedRoute.jsx`)
- Login page → Auth state: uses (evidence: `client/src/pages/Login.jsx`)
- Registration page → Auth state: uses (evidence: `client/src/pages/Register.jsx`)
- Auth state → HTTP client: sends auth requests (evidence: `client/src/context/AuthContext.jsx`)
- Dashboard → Auth state: reads auth state (evidence: `client/src/pages/Dashboard.jsx`)
- Dashboard → Task API service: loads and changes tasks (evidence: `client/src/pages/Dashboard.jsx`)
- Dashboard → Task form: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Dashboard → Task controls: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Dashboard → Task card: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Dashboard → Task statistics: renders (evidence: `client/src/pages/Dashboard.jsx`)
- Task form → Task API service: creates tasks (evidence: `client/src/components/TaskForm.jsx`)
- Task API service → HTTP client: sends task requests (evidence: `client/src/services/taskService.js`)
- Express server → Database connector: connects database (evidence: `server/server.js`)
- Express server → Auth routes: mounts auth routes (evidence: `server/server.js`)
- Express server → Task routes: mounts task routes (evidence: `server/server.js`)
- Auth routes → Auth handlers: dispatches (evidence: `server/routes/authRoutes.js`)
- Task routes → Token protection: protects routes (evidence: `server/routes/taskRoutes.js`)
- Task routes → Task handlers: dispatches (evidence: `server/routes/taskRoutes.js`)
- Auth handlers → User model: reads and creates users (evidence: `server/controllers/authController.js`)
- Token protection → User model: loads user (evidence: `server/middleware/authMiddleware.js`)
- Task handlers → Task model: reads and writes tasks (evidence: `server/controllers/taskController.js`)
- Task API service → Task routes: calls task endpoints
- Auth state → Auth routes: calls auth endpoints
