# thanh08032004/sba301_badmintonshop_se1986-jv architecture

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

- Interactive diagram: https://gitdiagram.com/thanh08032004/sba301_badmintonshop_se1986-jv
- Repository: https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv

## Overview

This is a Badminton Shop storefront and operations frontend. The customer journey runs from browsing products through cart and order placement to payment, order tracking, and support; staff have separate order, catalog, delivery, ticket, and reporting workflows. The graph includes the app’s routing, authentication, and shared shop state as internal layers. Several screens and data flows are unsampled, so only documented routing and visible calls are connected; the README gives no additional product detail.

Main entry points: [`frontend/src/app/router/public.routes.jsx`](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/router/public.routes.jsx) (Public routes), [`frontend/src/app/router/management.routes.jsx`](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/router/management.routes.jsx) (Management routes), [`frontend/src/modules/shop/ShopProvider.jsx`](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/shop/ShopProvider.jsx) (Shared shop state), [`frontend/src/app/App.jsx`](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/App.jsx) (Application shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App and access"]
  node_app["Application shell<br/>[App.jsx]"]
  node_auth["Authentication state<br/>[AuthsProvider.jsx]"]
  node_access["Route access control"]
  node_publicroutes["Public routes<br/>[public.routes.jsx]"]
  node_manageroutes["Management routes"]
end

subgraph group_store["Storefront and orders"]
  node_home["Storefront and catalog<br/>[HomePage.jsx]"]
  node_cart["Cart and checkout order<br/>[CartPage.jsx]"]
  node_orders["Customer orders<br/>[OrdersPage.jsx]"]
  node_tracking["Order tracking"]
  node_tickets["Customer support tickets"]
end

subgraph group_payment["Payments"]
  node_checkout["Checkout<br/>[CheckoutPage.jsx]"]
  node_paymentflow["Payment flow<br/>[usePayment.js]"]
  node_paymentpages["QR and result pages<br/>[QrPaymentPage.jsx]"]
end

subgraph group_operations["Store operations"]
  node_dashboard["Operations dashboard<br/>[DashboardPage.jsx]"]
  node_catalogadmin["Catalog management<br/>[CatalogPage.jsx]"]
  node_orderadmin["Order management"]
  node_deliveryadmin["Delivery management"]
  node_supportadmin["Ticket management"]
end

subgraph group_service["Shared services"]
  node_shopstate["Shared shop state<br/>[ShopProvider.jsx]"]
  node_api{{"Shop API"}}
end

node_customer(("Shopper"))
node_staff(("Manager or staff"))

node_app -->|"provides auth"| node_auth
node_app -->|"loads routes"| node_publicroutes
node_app -->|"loads routes"| node_manageroutes
node_publicroutes -->|"guards private pages"| node_access
node_manageroutes -->|"guards staff pages"| node_access
node_publicroutes -->|"routes to"| node_home
node_publicroutes -->|"routes to"| node_cart
node_publicroutes -->|"routes to"| node_orders
node_publicroutes -->|"routes to"| node_tracking
node_publicroutes -->|"routes to"| node_tickets
node_publicroutes -->|"routes to"| node_checkout
node_publicroutes -->|"routes to"| node_paymentpages
node_manageroutes -->|"routes to"| node_dashboard
node_manageroutes -->|"routes to"| node_catalogadmin
node_manageroutes -->|"routes to"| node_orderadmin
node_manageroutes -->|"routes to"| node_deliveryadmin
node_manageroutes -->|"routes to"| node_supportadmin
node_customer -->|"browses"| node_home
node_customer -.->|"shops"| node_cart
node_customer -.->|"checks out"| node_checkout
node_staff -.->|"manages store"| node_dashboard
node_checkout -->|"uses payment hook"| node_paymentflow
node_paymentflow -->|"requests shop data"| node_api
node_paymentflow -->|"navigates to QR"| node_paymentpages
node_shopstate -.->|"fetches shop data"| node_api
node_home -->|"reads shop state"| node_shopstate
node_dashboard -->|"reads shop state"| node_shopstate
node_orderadmin -->|"reads and updates"| node_shopstate
node_supportadmin -->|"uses shop state"| node_shopstate
node_deliveryadmin -->|"uses shop state"| node_shopstate

click node_app "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/App.jsx"
click node_auth "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/provider/AuthsProvider.jsx"
click node_access "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/router/ProtectedRouter.jsx"
click node_publicroutes "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/router/public.routes.jsx"
click node_manageroutes "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/router/management.routes.jsx"
click node_home "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/home/pages/HomePage.jsx"
click node_cart "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/shop/CartPage.jsx"
click node_orders "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/shop/OrdersPage.jsx"
click node_tracking "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/delivery/pages/OrderTrackingPage.jsx"
click node_tickets "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/support/pages/CreateSupportTicketPage.jsx"
click node_checkout "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/payment/pages/CheckoutPage.jsx"
click node_paymentflow "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/payment/hooks/usePayment.js"
click node_paymentpages "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/payment/pages/QrPaymentPage.jsx"
click node_dashboard "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/management/DashboardPage.jsx"
click node_catalogadmin "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/management/CatalogPage.jsx"
click node_orderadmin "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/management/ManagerOrdersPage.jsx"
click node_deliveryadmin "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/delivery/pages/DeliveryManagementPage.jsx"
click node_supportadmin "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/support/pages/SupportTicketManagementPage.jsx"
click node_shopstate "https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/shop/ShopProvider.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_app,node_auth,node_access,node_publicroutes,node_manageroutes toneBlue
class node_home,node_cart,node_orders,node_tracking,node_tickets toneAmber
class node_checkout,node_paymentflow,node_paymentpages toneMint
class node_dashboard,node_catalogadmin,node_orderadmin,node_deliveryadmin,node_supportadmin toneRose
class node_shopstate,node_api,node_customer,node_staff toneIndigo
```

## Components

### App and access

- [Application shell](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/App.jsx): `frontend/src/app/App.jsx`
- [Authentication state](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/provider/AuthsProvider.jsx): `frontend/src/app/provider/AuthsProvider.jsx`
- [Route access control](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/router/ProtectedRouter.jsx): `frontend/src/app/router/ProtectedRouter.jsx`
- [Public routes](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/router/public.routes.jsx): `frontend/src/app/router/public.routes.jsx`
- [Management routes](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/app/router/management.routes.jsx): `frontend/src/app/router/management.routes.jsx`

### Storefront and orders

- [Storefront and catalog](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/home/pages/HomePage.jsx): `frontend/src/modules/home/pages/HomePage.jsx`
- [Cart and checkout order](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/shop/CartPage.jsx): `frontend/src/modules/shop/CartPage.jsx`
- [Customer orders](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/shop/OrdersPage.jsx): `frontend/src/modules/shop/OrdersPage.jsx`
- [Order tracking](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/delivery/pages/OrderTrackingPage.jsx): `frontend/src/modules/delivery/pages/OrderTrackingPage.jsx`
- [Customer support tickets](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/support/pages/CreateSupportTicketPage.jsx): `frontend/src/modules/support/pages/CreateSupportTicketPage.jsx`

### Payments

- [Checkout](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/payment/pages/CheckoutPage.jsx): `frontend/src/modules/payment/pages/CheckoutPage.jsx`
- [Payment flow](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/payment/hooks/usePayment.js): `frontend/src/modules/payment/hooks/usePayment.js`
- [QR and result pages](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/payment/pages/QrPaymentPage.jsx): `frontend/src/modules/payment/pages/QrPaymentPage.jsx`

### Store operations

- [Operations dashboard](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/management/DashboardPage.jsx): `frontend/src/modules/management/DashboardPage.jsx`
- [Catalog management](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/management/CatalogPage.jsx): `frontend/src/modules/management/CatalogPage.jsx`
- [Order management](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/management/ManagerOrdersPage.jsx): `frontend/src/modules/management/ManagerOrdersPage.jsx`
- [Delivery management](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/delivery/pages/DeliveryManagementPage.jsx): `frontend/src/modules/delivery/pages/DeliveryManagementPage.jsx`
- [Ticket management](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/support/pages/SupportTicketManagementPage.jsx): `frontend/src/modules/support/pages/SupportTicketManagementPage.jsx`

### Shared services

- [Shared shop state](https://github.com/thanh08032004/sba301_badmintonshop_se1986-jv/blob/main/frontend/src/modules/shop/ShopProvider.jsx): `frontend/src/modules/shop/ShopProvider.jsx`
- **Shop API**

### Other components

- **Shopper**
- **Manager or staff**

## Connections

- Application shell → Authentication state: provides auth (evidence: `frontend/src/app/App.jsx`)
- Application shell → Public routes: loads routes (evidence: `frontend/src/app/App.jsx`)
- Application shell → Management routes: loads routes
- Public routes → Route access control: guards private pages (evidence: `frontend/src/app/router/public.routes.jsx`)
- Management routes → Route access control: guards staff pages (evidence: `frontend/src/app/router/management.routes.jsx`)
- Public routes → Storefront and catalog: routes to (evidence: `frontend/src/app/router/public.routes.jsx`)
- Public routes → Cart and checkout order: routes to (evidence: `frontend/src/app/router/public.routes.jsx`)
- Public routes → Customer orders: routes to (evidence: `frontend/src/app/router/public.routes.jsx`)
- Public routes → Order tracking: routes to (evidence: `frontend/src/app/router/public.routes.jsx`)
- Public routes → Customer support tickets: routes to (evidence: `frontend/src/app/router/public.routes.jsx`)
- Public routes → Checkout: routes to (evidence: `frontend/src/app/router/public.routes.jsx`)
- Public routes → QR and result pages: routes to (evidence: `frontend/src/app/router/public.routes.jsx`)
- Management routes → Operations dashboard: routes to (evidence: `frontend/src/app/router/management.routes.jsx`)
- Management routes → Catalog management: routes to (evidence: `frontend/src/app/router/management.routes.jsx`)
- Management routes → Order management: routes to (evidence: `frontend/src/app/router/management.routes.jsx`)
- Management routes → Delivery management: routes to (evidence: `frontend/src/app/router/management.routes.jsx`)
- Management routes → Ticket management: routes to (evidence: `frontend/src/app/router/management.routes.jsx`)
- Shopper → Storefront and catalog: browses
- Shopper → Cart and checkout order: shops
- Shopper → Checkout: checks out
- Manager or staff → Operations dashboard: manages store
- Checkout → Payment flow: uses payment hook (evidence: `frontend/src/modules/payment/pages/CheckoutPage.jsx`)
- Payment flow → Shop API: requests shop data (evidence: `frontend/src/modules/payment/hooks/usePayment.js`)
- Payment flow → QR and result pages: navigates to QR (evidence: `frontend/src/modules/payment/hooks/usePayment.js`)
- Shared shop state → Shop API: fetches shop data
- Storefront and catalog → Shared shop state: reads shop state (evidence: `frontend/src/modules/home/pages/HomePage.jsx`)
- Operations dashboard → Shared shop state: reads shop state (evidence: `frontend/src/modules/management/DashboardPage.jsx`)
- Order management → Shared shop state: reads and updates (evidence: `frontend/src/modules/management/ManagerOrdersPage.jsx`)
- Ticket management → Shared shop state: uses shop state (evidence: `frontend/src/modules/support/pages/SupportTicketManagementPage.jsx`)
- Delivery management → Shared shop state: uses shop state (evidence: `frontend/src/modules/delivery/pages/DeliveryManagementPage.jsx`)
