# baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_ architecture

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

- Interactive diagram: https://gitdiagram.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_
- Repository: https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_

## Overview

This is a React storefront and operations dashboard: shoppers browse products, manage a cart, check out, and review orders, while employees and administrators manage shop operations. `src/App.jsx` routes the customer, employee, and admin experiences. The sampled checkout and employee-management code shows direct requests to an external `/api` service; no backend implementation or persistent database is present in the tree. Other major admin and employee capabilities are represented from the file tree and App’s indexed references; their internal behavior was not sampled.

Main entry points: [`src/App.jsx`](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/App.jsx) (Route dispatcher), [`src/pages/customer/Checkout.jsx`](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Checkout.jsx) (Checkout), [`src/main.jsx`](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/main.jsx) (React entry), [`src/pages/customer/Home.jsx`](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Home.jsx) (Store home)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["App runtime"]
  node_entry["React entry<br/>[main.jsx]"]
  node_router["Route dispatcher<br/>[App.jsx]"]
end

subgraph group_shopper["Customer storefront"]
  node_home["Store home<br/>[Home.jsx]"]
  node_catalog["Product catalog<br/>[Products.jsx]"]
  node_detail["Product detail<br/>[ProductDetail.jsx]"]
  node_cart["Shopping cart<br/>[Cart.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_orders["Customer orders<br/>[Orders.jsx]"]
  node_invoice["Order invoice<br/>[Invoice.jsx]"]
  node_account["Customer account<br/>[Profile.jsx]"]
  node_customer_auth["Customer access<br/>[Login.jsx]"]
  node_customer_register["Registration<br/>[Register.jsx]"]
  node_seed_products["Sample products<br/>[products.js]"]
end

subgraph group_staff["Employee operations"]
  node_employee_auth["Employee access<br/>[Login.jsx]"]
  node_employee_dash["Employee dashboard<br/>[Dashboard.jsx]"]
  node_employee_products["Product operations<br/>[Products.jsx]"]
  node_employee_inventory["Inventory operations<br/>[Inventory.jsx]"]
  node_employee_orders["Order operations<br/>[Orders.jsx]"]
  node_employee_customers["Customer operations<br/>[Customers.jsx]"]
  node_employee_profile["Employee profile<br/>[Profile.jsx]"]
  node_employee_stats["Employee statistics<br/>[Statistics.jsx]"]
  node_employee_support["Support desk<br/>[Support.jsx]"]
end

subgraph group_admin["Admin management"]
  node_admin_dash["Admin dashboard<br/>[Dashboard.jsx]"]
  node_admin_products["Product management<br/>[Products.jsx]"]
  node_admin_customers["Customer management<br/>[Customers.jsx]"]
  node_admin_employees["Employee management<br/>[Employees.jsx]"]
  node_admin_inventory["Inventory management<br/>[Inventory.jsx]"]
  node_admin_orders["Order management<br/>[Orders.jsx]"]
  node_admin_payments["Payment management<br/>[Payments.jsx]"]
  node_admin_promos["Promotions<br/>[Promotions.jsx]"]
  node_admin_categories["Categories<br/>[Categories.jsx]"]
  node_admin_reviews["Reviews<br/>[Reviews.jsx]"]
end

node_browser(("Shopper or staff"))
node_api{{"Shop API"}}

node_browser -->|"opens app"| node_entry
node_entry -->|"renders"| node_router
node_router -->|"routes to"| node_home
node_router -->|"routes to"| node_customer_auth
node_router -->|"routes to"| node_customer_register
node_router -->|"routes to"| node_catalog
node_router -->|"routes to"| node_detail
node_router -->|"routes to"| node_cart
node_router -->|"routes to"| node_checkout
node_router -->|"routes to"| node_orders
node_router -->|"routes to"| node_invoice
node_router -->|"routes to"| node_account
node_router -->|"routes to"| node_employee_auth
node_router -->|"routes to"| node_employee_dash
node_router -->|"routes to"| node_employee_products
node_router -->|"routes to"| node_employee_orders
node_router -->|"routes to"| node_employee_customers
node_router -->|"routes to"| node_employee_support
node_router -->|"routes to"| node_admin_dash
node_router -->|"routes to"| node_admin_products
node_router -->|"routes to"| node_admin_employees
node_router -->|"routes to"| node_admin_inventory
node_router -->|"routes to"| node_admin_payments
node_router -->|"routes to"| node_employee_inventory
node_router -->|"routes to"| node_employee_profile
node_router -->|"routes to"| node_employee_stats
node_router -->|"routes to"| node_admin_customers
node_router -->|"routes to"| node_admin_orders
node_router -->|"routes to"| node_admin_promos
node_router -->|"routes to"| node_admin_categories
node_router -->|"routes to"| node_admin_reviews
node_home -->|"reads sample data"| node_seed_products
node_checkout -->|"submits order"| node_api
node_checkout -->|"checks promotion"| node_api
node_employee_products -->|"creates product"| node_api
node_admin_employees -->|"manages employees"| node_api
node_admin_products -->|"updates product"| node_api

click node_entry "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/main.jsx"
click node_router "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/App.jsx"
click node_home "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Home.jsx"
click node_catalog "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Products.jsx"
click node_detail "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/ProductDetail.jsx"
click node_cart "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Cart.jsx"
click node_checkout "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Checkout.jsx"
click node_orders "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Orders.jsx"
click node_invoice "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Invoice.jsx"
click node_account "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Profile.jsx"
click node_customer_auth "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Login.jsx"
click node_customer_register "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Register.jsx"
click node_seed_products "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/data/products.js"
click node_employee_auth "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Login.jsx"
click node_employee_dash "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Dashboard.jsx"
click node_employee_products "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Products.jsx"
click node_employee_inventory "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Inventory.jsx"
click node_employee_orders "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Orders.jsx"
click node_employee_customers "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Customers.jsx"
click node_employee_profile "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Profile.jsx"
click node_employee_stats "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Statistics.jsx"
click node_employee_support "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Support.jsx"
click node_admin_dash "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Dashboard.jsx"
click node_admin_products "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Products.jsx"
click node_admin_customers "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Customers.jsx"
click node_admin_employees "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Employees.jsx"
click node_admin_inventory "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Inventory.jsx"
click node_admin_orders "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Orders.jsx"
click node_admin_payments "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Payments.jsx"
click node_admin_promos "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Promotions.jsx"
click node_admin_categories "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Categories.jsx"
click node_admin_reviews "https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Reviews.jsx"

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_entry,node_router toneBlue
class node_home,node_catalog,node_detail,node_cart,node_checkout,node_orders,node_invoice,node_account,node_customer_auth,node_customer_register,node_seed_products toneAmber
class node_employee_auth,node_employee_dash,node_employee_products,node_employee_inventory,node_employee_orders,node_employee_customers,node_employee_profile,node_employee_stats,node_employee_support,node_api toneMint
class node_admin_dash,node_admin_products,node_admin_customers,node_admin_employees,node_admin_inventory,node_admin_orders,node_admin_payments,node_admin_promos,node_admin_categories,node_admin_reviews toneRose
class node_browser toneIndigo
```

## Components

### App runtime

- [React entry](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/main.jsx): `src/main.jsx`
- [Route dispatcher](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/App.jsx): `src/App.jsx`

### Customer storefront

- [Store home](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Home.jsx): `src/pages/customer/Home.jsx`
- [Product catalog](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Products.jsx): `src/pages/customer/Products.jsx`
- [Product detail](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/ProductDetail.jsx): `src/pages/customer/ProductDetail.jsx`
- [Shopping cart](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Cart.jsx): `src/pages/customer/Cart.jsx`
- [Checkout](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Checkout.jsx): `src/pages/customer/Checkout.jsx`
- [Customer orders](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Orders.jsx): `src/pages/customer/Orders.jsx`
- [Order invoice](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Invoice.jsx): `src/pages/customer/Invoice.jsx`
- [Customer account](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Profile.jsx): `src/pages/customer/Profile.jsx`
- [Customer access](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Login.jsx): `src/pages/customer/Login.jsx`
- [Registration](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/customer/Register.jsx): `src/pages/customer/Register.jsx`
- [Sample products](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/data/products.js): `src/data/products.js`

### Employee operations

- [Employee access](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Login.jsx): `src/pages/employee/Login.jsx`
- [Employee dashboard](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Dashboard.jsx): `src/pages/employee/Dashboard.jsx`
- [Product operations](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Products.jsx): `src/pages/employee/Products.jsx`
- [Inventory operations](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Inventory.jsx): `src/pages/employee/Inventory.jsx`
- [Order operations](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Orders.jsx): `src/pages/employee/Orders.jsx`
- [Customer operations](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Customers.jsx): `src/pages/employee/Customers.jsx`
- [Employee profile](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Profile.jsx): `src/pages/employee/Profile.jsx`
- [Employee statistics](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Statistics.jsx): `src/pages/employee/Statistics.jsx`
- [Support desk](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/employee/Support.jsx): `src/pages/employee/Support.jsx`

### Admin management

- [Admin dashboard](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Dashboard.jsx): `src/pages/admin/Dashboard.jsx`
- [Product management](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Products.jsx): `src/pages/admin/Products.jsx`
- [Customer management](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Customers.jsx): `src/pages/admin/Customers.jsx`
- [Employee management](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Employees.jsx): `src/pages/admin/Employees.jsx`
- [Inventory management](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Inventory.jsx): `src/pages/admin/Inventory.jsx`
- [Order management](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Orders.jsx): `src/pages/admin/Orders.jsx`
- [Payment management](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Payments.jsx): `src/pages/admin/Payments.jsx`
- [Promotions](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Promotions.jsx): `src/pages/admin/Promotions.jsx`
- [Categories](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Categories.jsx): `src/pages/admin/Categories.jsx`
- [Reviews](https://github.com/baobestyasuo263-glitch/24ct2_nguyenquocbao_cnpm_/blob/main/src/pages/admin/Reviews.jsx): `src/pages/admin/Reviews.jsx`

### Other components

- **Shopper or staff**
- **Shop API**

## Connections

- Shopper or staff → React entry: opens app (evidence: `src/main.jsx`)
- React entry → Route dispatcher: renders (evidence: `src/main.jsx`)
- Route dispatcher → Store home: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Customer access: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Registration: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Product catalog: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Product detail: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Shopping cart: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Checkout: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Customer orders: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Order invoice: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Customer account: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Employee access: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Employee dashboard: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Product operations: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Order operations: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Customer operations: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Support desk: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Admin dashboard: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Product management: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Employee management: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Inventory management: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Payment management: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Inventory operations: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Employee profile: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Employee statistics: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Customer management: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Order management: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Promotions: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Categories: routes to (evidence: `src/App.jsx`)
- Route dispatcher → Reviews: routes to (evidence: `src/App.jsx`)
- Store home → Sample products: reads sample data (evidence: `src/pages/customer/Home.jsx`)
- Checkout → Shop API: submits order (evidence: `src/pages/customer/Checkout.jsx`)
- Checkout → Shop API: checks promotion (evidence: `src/pages/customer/Checkout.jsx`)
- Product operations → Shop API: creates product (evidence: `src/pages/employee/Products.jsx`)
- Employee management → Shop API: manages employees (evidence: `src/pages/admin/Employees.jsx`)
- Product management → Shop API: updates product (evidence: `src/pages/admin/Products.jsx`)
