# ceuw/studious-octo-pancake architecture

> Architecture diagram of the GitHub repository ceuw/studious-octo-pancake, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ceuw/studious-octo-pancake
- Repository: https://github.com/ceuw/studious-octo-pancake

## Overview

Rimpa’s Creations is a tailoring-studio website and private order-management application, not an online shop. Customers browse studio information and services, then track an offline-registered order by its order number; the owner signs in to register orders, manage customers, and update order progress. The graph separates public and admin experiences from API routing/authentication and domain persistence. Some page and route implementations were not sampled, so their documented capabilities are retained while uncertain connections are omitted.

Main entry points: [`server/src/routes/adminRoutes.js`](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/routes/adminRoutes.js) (Admin routes), [`server/src/services/orderService.js`](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/services/orderService.js) (Order logic), [`client/src/pages/admin`](https://github.com/ceuw/studious-octo-pancake/tree/main/client/src/pages/admin) (Admin pages), [`server/src/routes/index.js`](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/routes/index.js) (API routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_public["Public website"]
  node_public_pages["Public pages"]
  node_service_catalog["Service catalog<br/>[services.js]"]
  node_tracking["Order tracking<br/>[TrackOrderPage.jsx]"]
end

subgraph group_admin["Admin workspace"]
  node_admin_pages["Admin pages"]
  node_order_form["Order editor<br/>[OrderForm.jsx]"]
  node_admin_auth_ui["Admin session UI"]
  node_admin_service["Admin API client<br/>[adminService.js]"]
  node_order_api_client["Order API client<br/>[orderService.js]"]
end

subgraph group_api["API and security"]
  node_express_app["Express app<br/>[app.js]"]
  node_api_routes["API routes<br/>[index.js]"]
  node_admin_routes["Admin routes<br/>[adminRoutes.js]"]
  node_tracking_routes["Tracking routes"]
  node_auth_controller["Auth handlers<br/>[authController.js]"]
  node_auth_middleware["Session security<br/>[auth.js]"]
  node_order_controller["Order handlers<br/>[orderController.js]"]
  node_customer_controller["Customer handlers"]
  node_dashboard_controller["Dashboard handlers"]
  node_tracking_controller["Tracking handler"]
end

subgraph group_domain["Order domain"]
  node_auth_service["Authentication logic<br/>[authService.js]"]
  node_order_service["Order logic<br/>[orderService.js]"]
  node_customer_service["Customer logic<br/>[customerService.js]"]
  node_dashboard_service["Dashboard logic"]
  node_order_store[("Order records<br/>[Order.js]")]
  node_customer_store[("Customer records<br/>[Customer.js]")]
  node_payment_store[("Payment records<br/>[OrderPayment.js]")]
end

node_visitor(("Customer"))
node_owner(("Studio owner"))

node_visitor -->|"browses"| node_public_pages
node_public_pages -->|"shows services"| node_service_catalog
node_visitor -->|"enters order number"| node_tracking
node_owner -->|"manages studio"| node_admin_pages
node_admin_pages -->|"edits orders"| node_order_form
node_admin_pages -->|"uses session"| node_admin_auth_ui
node_admin_auth_ui -->|"calls auth API"| node_admin_service
node_admin_pages -->|"requests admin data"| node_admin_service
node_admin_service -->|"requests admin endpoints"| node_admin_routes
node_order_api_client -.->|"requests tracking endpoint"| node_tracking_routes
node_express_app -->|"mounts API"| node_api_routes
node_api_routes -.->|"registers admin routes"| node_admin_routes
node_api_routes -.->|"registers tracking routes"| node_tracking_routes
node_admin_routes -->|"guards requests"| node_auth_middleware
node_admin_routes -->|"dispatches orders"| node_order_controller
node_admin_routes -->|"dispatches customers"| node_customer_controller
node_admin_routes -->|"dispatches dashboard"| node_dashboard_controller
node_tracking_routes -->|"dispatches lookup"| node_tracking_controller
node_auth_controller -->|"issues tokens"| node_auth_service
node_order_controller -->|"handles orders"| node_order_service
node_customer_controller -->|"handles customers"| node_customer_service
node_dashboard_controller -->|"loads metrics"| node_dashboard_service
node_tracking_controller -->|"looks up order"| node_order_service
node_order_service -->|"reads and writes"| node_order_store
node_order_service -->|"reads and writes"| node_customer_store
node_order_service -->|"reads and writes"| node_payment_store
node_order_service -->|"finds customer"| node_customer_service
node_customer_service -->|"reads and writes"| node_customer_store
node_dashboard_service -->|"reads orders"| node_order_store
node_dashboard_service -->|"reads customers"| node_customer_store

click node_public_pages "https://github.com/ceuw/studious-octo-pancake/tree/main/client/src/pages/public"
click node_service_catalog "https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/data/services.js"
click node_tracking "https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/pages/public/TrackOrderPage.jsx"
click node_admin_pages "https://github.com/ceuw/studious-octo-pancake/tree/main/client/src/pages/admin"
click node_order_form "https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/components/admin/OrderForm.jsx"
click node_admin_auth_ui "https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/context/AdminAuthContext.jsx"
click node_admin_service "https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/services/adminService.js"
click node_order_api_client "https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/services/orderService.js"
click node_express_app "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/app.js"
click node_api_routes "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/routes/index.js"
click node_admin_routes "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/routes/adminRoutes.js"
click node_tracking_routes "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/routes/orderTrackingRoutes.js"
click node_auth_controller "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/authController.js"
click node_auth_middleware "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/middleware/auth.js"
click node_order_controller "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/orderController.js"
click node_customer_controller "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/customerController.js"
click node_dashboard_controller "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/dashboardController.js"
click node_tracking_controller "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/orderTrackingController.js"
click node_auth_service "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/services/authService.js"
click node_order_service "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/services/orderService.js"
click node_customer_service "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/services/customerService.js"
click node_dashboard_service "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/services/dashboardService.js"
click node_order_store "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/models/Order.js"
click node_customer_store "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/models/Customer.js"
click node_payment_store "https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/models/OrderPayment.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_public_pages,node_service_catalog,node_tracking toneBlue
class node_admin_pages,node_order_form,node_admin_auth_ui,node_admin_service,node_order_api_client toneAmber
class node_express_app,node_api_routes,node_admin_routes,node_tracking_routes,node_auth_controller,node_auth_middleware,node_order_controller,node_customer_controller,node_dashboard_controller,node_tracking_controller toneMint
class node_auth_service,node_order_service,node_customer_service,node_dashboard_service,node_order_store,node_customer_store,node_payment_store toneRose
class node_visitor,node_owner toneIndigo
```

## Components

### Public website

- [Public pages](https://github.com/ceuw/studious-octo-pancake/tree/main/client/src/pages/public): `client/src/pages/public`
- [Service catalog](https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/data/services.js): `client/src/data/services.js`
- [Order tracking](https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/pages/public/TrackOrderPage.jsx): `client/src/pages/public/TrackOrderPage.jsx`

### Admin workspace

- [Admin pages](https://github.com/ceuw/studious-octo-pancake/tree/main/client/src/pages/admin): `client/src/pages/admin`
- [Order editor](https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/components/admin/OrderForm.jsx): `client/src/components/admin/OrderForm.jsx`
- [Admin session UI](https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/context/AdminAuthContext.jsx): `client/src/context/AdminAuthContext.jsx`
- [Admin API client](https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/services/adminService.js): `client/src/services/adminService.js`
- [Order API client](https://github.com/ceuw/studious-octo-pancake/blob/main/client/src/services/orderService.js): `client/src/services/orderService.js`

### API and security

- [Express app](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/app.js): `server/src/app.js`
- [API routes](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/routes/index.js): `server/src/routes/index.js`
- [Admin routes](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/routes/adminRoutes.js): `server/src/routes/adminRoutes.js`
- [Tracking routes](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/routes/orderTrackingRoutes.js): `server/src/routes/orderTrackingRoutes.js`
- [Auth handlers](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/authController.js): `server/src/controllers/authController.js`
- [Session security](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/middleware/auth.js): `server/src/middleware/auth.js`
- [Order handlers](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/orderController.js): `server/src/controllers/orderController.js`
- [Customer handlers](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/customerController.js): `server/src/controllers/customerController.js`
- [Dashboard handlers](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/dashboardController.js): `server/src/controllers/dashboardController.js`
- [Tracking handler](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/controllers/orderTrackingController.js): `server/src/controllers/orderTrackingController.js`

### Order domain

- [Authentication logic](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/services/authService.js): `server/src/services/authService.js`
- [Order logic](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/services/orderService.js): `server/src/services/orderService.js`
- [Customer logic](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/services/customerService.js): `server/src/services/customerService.js`
- [Dashboard logic](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/services/dashboardService.js): `server/src/services/dashboardService.js`
- [Order records](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/models/Order.js): `server/src/models/Order.js`
- [Customer records](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/models/Customer.js): `server/src/models/Customer.js`
- [Payment records](https://github.com/ceuw/studious-octo-pancake/blob/main/server/src/models/OrderPayment.js): `server/src/models/OrderPayment.js`

### Other components

- **Customer**
- **Studio owner**

## Connections

- Customer → Public pages: browses (evidence: `README.md`)
- Public pages → Service catalog: shows services (evidence: `client/src/pages/public/ServicesPage.jsx`)
- Customer → Order tracking: enters order number (evidence: `README.md`)
- Studio owner → Admin pages: manages studio (evidence: `README.md`)
- Admin pages → Order editor: edits orders (evidence: `client/src/pages/admin/AdminOrderDetailPage.jsx`)
- Admin pages → Admin session UI: uses session (evidence: `client/src/App.jsx`)
- Admin session UI → Admin API client: calls auth API (evidence: `client/src/context/AdminAuthContext.jsx`)
- Admin pages → Admin API client: requests admin data (evidence: `client/src/pages/admin/AdminOrderDetailPage.jsx`)
- Admin API client → Admin routes: requests admin endpoints (evidence: `client/src/services/adminService.js`)
- Order API client → Tracking routes: requests tracking endpoint
- Express app → API routes: mounts API (evidence: `server/src/app.js`)
- API routes → Admin routes: registers admin routes
- API routes → Tracking routes: registers tracking routes
- Admin routes → Session security: guards requests (evidence: `server/src/routes/adminRoutes.js`)
- Admin routes → Order handlers: dispatches orders (evidence: `server/src/routes/adminRoutes.js`)
- Admin routes → Customer handlers: dispatches customers (evidence: `server/src/routes/adminRoutes.js`)
- Admin routes → Dashboard handlers: dispatches dashboard (evidence: `server/src/routes/adminRoutes.js`)
- Tracking routes → Tracking handler: dispatches lookup (evidence: `server/src/routes/orderTrackingRoutes.js`)
- Auth handlers → Authentication logic: issues tokens (evidence: `server/src/controllers/authController.js`)
- Order handlers → Order logic: handles orders (evidence: `server/src/controllers/orderController.js`)
- Customer handlers → Customer logic: handles customers (evidence: `server/src/controllers/customerController.js`)
- Dashboard handlers → Dashboard logic: loads metrics (evidence: `server/src/controllers/dashboardController.js`)
- Tracking handler → Order logic: looks up order (evidence: `server/src/controllers/orderTrackingController.js`)
- Order logic → Order records: reads and writes (evidence: `server/src/services/orderService.js`)
- Order logic → Customer records: reads and writes (evidence: `server/src/services/orderService.js`)
- Order logic → Payment records: reads and writes (evidence: `server/src/services/orderService.js`)
- Order logic → Customer logic: finds customer (evidence: `server/src/services/orderService.js`)
- Customer logic → Customer records: reads and writes (evidence: `server/src/services/customerService.js`)
- Dashboard logic → Order records: reads orders (evidence: `server/src/services/dashboardService.js`)
- Dashboard logic → Customer records: reads customers (evidence: `server/src/services/dashboardService.js`)
