# huyg17082006/todoapp-reactjs-express-mysql architecture

> Architecture diagram of the GitHub repository huyg17082006/todoapp-reactjs-express-mysql, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/huyg17082006/todoapp-reactjs-express-mysql
- Repository: https://github.com/huyg17082006/todoapp-reactjs-express-mysql

## Overview

This is a React and Express/MySQL todo app. Users load and sort/filter tasks, add tasks, and manage task status or titles; the client calls the task API, whose controller delegates persistence to the MySQL model. The UI also shows task counts and notifications. The README and source index establish the main client/server capabilities, but some interactions (notably route registration and individual card actions) are not excerpted, so those links are omitted rather than inferred.

Main entry points: [`app/client/src/pages/HomePage.jsx`](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/pages/HomePage.jsx) (Task dashboard), [`app/client/src/App.jsx`](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/App.jsx) (Page routing), [`app/client/src/components/FunctionBar/FunctionBar.jsx`](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/FunctionBar/FunctionBar.jsx) (Task controls), [`app/client/src/components/ManagerList/ManagerList.jsx`](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/ManagerList/ManagerList.jsx) (Task list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Todo client"]
  node_router["Page routing<br/>[App.jsx]"]
  node_home["Task dashboard<br/>[HomePage.jsx]"]
  node_task_ops["Task controls<br/>[FunctionBar.jsx]"]
  node_task_list["Task list<br/>[ManagerList.jsx]"]
  node_task_card["Task card<br/>[TaskCard.jsx]"]
  node_date_filter["Sort control<br/>[DateFilter.jsx]"]
  node_header["Header<br/>[HeaderBar.jsx]"]
  node_footer["Task summary<br/>[FooterBar.jsx]"]
  node_empty_card["Empty state<br/>[EmptyTaskCard.jsx]"]
  node_notifications["Notification display<br/>[Notification.jsx]"]
  node_notification_state["Notification state"]
  node_notify_hook["Notification helper<br/>[useNotify.jsx]"]
  node_not_found["Not-found page<br/>[NotFound.jsx]"]
  node_task_services["Task API client<br/>[taskServices.js]"]
  node_fetch["HTTP helper<br/>[Fetch.js]"]
end

subgraph group_api["Task API"]
  node_server["Express server<br/>[server.js]"]
  node_routes["Task routes<br/>[taskRouts.js]"]
  node_controller["Task controller<br/>[taskController.js]"]
end

subgraph group_persistence["MySQL persistence"]
  node_model["Task model<br/>[task.js]"]
  node_db_pool[("MySQL pool<br/>[db.js]")]
end

node_user(("User"))
node_mysql[("MySQL database")]

node_user -->|"opens app"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_not_found
node_home -->|"renders"| node_task_ops
node_home -->|"renders"| node_task_list
node_home -->|"renders"| node_date_filter
node_home -->|"renders"| node_header
node_home -->|"renders"| node_footer
node_home -->|"renders"| node_notifications
node_home -->|"provides state"| node_notification_state
node_task_list -->|"renders"| node_task_card
node_task_list -->|"renders"| node_empty_card
node_task_ops -->|"calls"| node_task_services
node_task_ops -->|"uses"| node_notify_hook
node_notify_hook -->|"reads and sets"| node_notification_state
node_notifications -->|"reads state"| node_notification_state
node_home -->|"fetches tasks"| node_task_services
node_task_services -->|"delegates HTTP"| node_fetch
node_server -->|"mounts API"| node_routes
node_routes -->|"registers handlers"| node_controller
node_controller -->|"calls task methods"| node_model
node_model -->|"executes SQL"| node_db_pool
node_db_pool -.->|"connects"| node_mysql
node_server -->|"checks connection"| node_db_pool

click node_router "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/App.jsx"
click node_home "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/pages/HomePage.jsx"
click node_task_ops "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/FunctionBar/FunctionBar.jsx"
click node_task_list "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/ManagerList/ManagerList.jsx"
click node_task_card "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/ui/TaskCard/TaskCard.jsx"
click node_date_filter "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/DateFilter/DateFilter.jsx"
click node_header "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/HeaderBar/HeaderBar.jsx"
click node_footer "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/FooterBar/FooterBar.jsx"
click node_empty_card "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/ui/EmptyTaskCard/EmptyTaskCard.jsx"
click node_notifications "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/Notification/Notification.jsx"
click node_notification_state "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/Notification/NotificationContext.js"
click node_notify_hook "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/hooks/useNotify.jsx"
click node_not_found "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/pages/NotFound.jsx"
click node_task_services "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/services/taskServices.js"
click node_fetch "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/helpers/Fetch.js"
click node_server "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/server.js"
click node_routes "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/routes/taskRouts.js"
click node_controller "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/controller/taskController.js"
click node_model "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/model/task.js"
click node_db_pool "https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/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_router,node_home,node_task_ops,node_task_list,node_task_card,node_date_filter,node_header,node_footer,node_empty_card,node_notifications,node_notification_state,node_notify_hook,node_not_found,node_task_services,node_fetch,node_user toneBlue
class node_server,node_routes,node_controller,node_mysql toneAmber
class node_model,node_db_pool toneMint
```

## Components

### Todo client

- [Page routing](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/App.jsx): `app/client/src/App.jsx`
- [Task dashboard](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/pages/HomePage.jsx): `app/client/src/pages/HomePage.jsx`
- [Task controls](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/FunctionBar/FunctionBar.jsx): `app/client/src/components/FunctionBar/FunctionBar.jsx`
- [Task list](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/ManagerList/ManagerList.jsx): `app/client/src/components/ManagerList/ManagerList.jsx`
- [Task card](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/ui/TaskCard/TaskCard.jsx): `app/client/src/components/ui/TaskCard/TaskCard.jsx`
- [Sort control](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/DateFilter/DateFilter.jsx): `app/client/src/components/DateFilter/DateFilter.jsx`
- [Header](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/HeaderBar/HeaderBar.jsx): `app/client/src/components/HeaderBar/HeaderBar.jsx`
- [Task summary](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/FooterBar/FooterBar.jsx): `app/client/src/components/FooterBar/FooterBar.jsx`
- [Empty state](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/ui/EmptyTaskCard/EmptyTaskCard.jsx): `app/client/src/components/ui/EmptyTaskCard/EmptyTaskCard.jsx`
- [Notification display](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/Notification/Notification.jsx): `app/client/src/components/Notification/Notification.jsx`
- [Notification state](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/components/Notification/NotificationContext.js): `app/client/src/components/Notification/NotificationContext.js`
- [Notification helper](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/hooks/useNotify.jsx): `app/client/src/hooks/useNotify.jsx`
- [Not-found page](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/pages/NotFound.jsx): `app/client/src/pages/NotFound.jsx`
- [Task API client](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/services/taskServices.js): `app/client/src/services/taskServices.js`
- [HTTP helper](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/client/src/helpers/Fetch.js): `app/client/src/helpers/Fetch.js`

### Task API

- [Express server](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/server.js): `app/server/server.js`
- [Task routes](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/routes/taskRouts.js): `app/server/routes/taskRouts.js`
- [Task controller](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/controller/taskController.js): `app/server/controller/taskController.js`

### MySQL persistence

- [Task model](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/model/task.js): `app/server/model/task.js`
- [MySQL pool](https://github.com/huyg17082006/todoapp-reactjs-express-mysql/blob/main/app/server/db.js): `app/server/db.js`

### Other components

- **User**
- **MySQL database**

## Connections

- User → Page routing: opens app (evidence: `app/client/src/App.jsx`)
- Page routing → Task dashboard: routes to (evidence: `app/client/src/App.jsx`)
- Page routing → Not-found page: routes to (evidence: `app/client/src/App.jsx`)
- Task dashboard → Task controls: renders (evidence: `app/client/src/pages/HomePage.jsx`)
- Task dashboard → Task list: renders (evidence: `app/client/src/pages/HomePage.jsx`)
- Task dashboard → Sort control: renders (evidence: `app/client/src/pages/HomePage.jsx`)
- Task dashboard → Header: renders (evidence: `app/client/src/pages/HomePage.jsx`)
- Task dashboard → Task summary: renders (evidence: `app/client/src/pages/HomePage.jsx`)
- Task dashboard → Notification display: renders (evidence: `app/client/src/pages/HomePage.jsx`)
- Task dashboard → Notification state: provides state (evidence: `app/client/src/pages/HomePage.jsx`)
- Task list → Task card: renders (evidence: `app/client/src/components/ManagerList/ManagerList.jsx`)
- Task list → Empty state: renders (evidence: `app/client/src/components/ManagerList/ManagerList.jsx`)
- Task controls → Task API client: calls (evidence: `app/client/src/components/FunctionBar/FunctionBar.jsx`)
- Task controls → Notification helper: uses (evidence: `app/client/src/components/FunctionBar/FunctionBar.jsx`)
- Notification helper → Notification state: reads and sets (evidence: `app/client/src/hooks/useNotify.jsx`)
- Notification display → Notification state: reads state (evidence: `app/client/src/components/Notification/Notification.jsx`)
- Task dashboard → Task API client: fetches tasks (evidence: `app/client/src/pages/HomePage.jsx`)
- Task API client → HTTP helper: delegates HTTP (evidence: `app/client/src/services/taskServices.js`)
- Express server → Task routes: mounts API (evidence: `app/server/server.js`)
- Task routes → Task controller: registers handlers (evidence: `app/server/routes/taskRouts.js`)
- Task controller → Task model: calls task methods (evidence: `app/server/controller/taskController.js`)
- Task model → MySQL pool: executes SQL (evidence: `app/server/model/task.js`)
- MySQL pool → MySQL database: connects
- Express server → MySQL pool: checks connection (evidence: `app/server/server.js`)
