# thabithx/luzzio-omnicore architecture

> Architecture diagram of the GitHub repository thabithx/luzzio-omnicore, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/thabithx/luzzio-omnicore
- Repository: https://github.com/thabithx/luzzio-omnicore

## Overview

Luzzio is an e-commerce platform with a customer storefront and an operations-heavy admin system. The main customer journey is product discovery, cart and checkout, order creation/payment, then fulfillment and tracking. The server also supports catalog administration, inventory and purchasing, returns, finance, staff, analytics, customer communication, and product feeds. The sampled source confirms key order, product, upload, routing, and staff behaviors; links for other listed subsystems are limited to the repository tree and server route mounting.

Main entry points: [`client/src/pages/admin`](https://github.com/thabithx/luzzio-omnicore/tree/main/client/src/pages/admin) (Admin console), [`server/controllers/orderController.js`](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/orderController.js) (Order controller), [`client/src/App.jsx`](https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/App.jsx) (Web application), [`server/server.js`](https://github.com/thabithx/luzzio-omnicore/blob/main/server/server.js) (API server)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_app["Web application<br/>[App.jsx]"]
  node_catalog_pages["Catalog pages<br/>[ProductList.jsx]"]
  node_cart_checkout["Cart and checkout<br/>[Checkout.jsx]"]
  node_account_pages["Account and help<br/>[Profile.jsx]"]
  node_admin_pages["Admin console"]
  node_api_client["API client<br/>[api.js]"]
end

subgraph group_commerce["Commerce API"]
  node_api_server["API server<br/>[server.js]"]
  node_product_routes["Catalog routes<br/>[productRoutes.js]"]
  node_product_controller["Catalog controller"]
  node_order_routes["Order routes<br/>[orderRoutes.js]"]
  node_order_controller["Order controller<br/>[orderController.js]"]
  node_order_model[("Order records<br/>[Order.js]")]
  node_cart_model[("Cart records<br/>[Cart.js]")]
  node_product_model[("Product records<br/>[Product.js]")]
  node_payment_routes["Payment routes<br/>[paymentRoutes.js]"]
  node_payment_controller["Payment processing"]
end

subgraph group_operations["Operations"]
  node_inventory["Inventory management"]
  node_admin_ops["Operations services<br/>[posController.js]"]
  node_purchasing["Suppliers and purchasing"]
  node_returns_finance["Returns and finance"]
  node_staff["Staff and shifts<br/>[staffController.js]"]
  node_analytics["Analytics"]
end

subgraph group_platform["Shared Platform"]
  node_communications["Customer communications"]
  node_uploads["Image uploads<br/>[uploadRoutes.js]"]
end

node_shopper(("Shopper"))
node_admin(("Admin staff"))
node_cloudinary["Cloudinary"]
node_courier["Fadar courier"]
node_payments_external["Payment providers"]
node_database[("MongoDB")]

node_shopper -->|"uses"| node_app
node_admin -->|"manages"| node_admin_pages
node_app -->|"routes to"| node_catalog_pages
node_app -->|"routes to"| node_cart_checkout
node_app -->|"routes to"| node_account_pages
node_app -->|"routes to"| node_admin_pages
node_catalog_pages -->|"requests catalog"| node_api_client
node_cart_checkout -->|"submits commerce actions"| node_api_client
node_account_pages -->|"requests account data"| node_api_client
node_admin_pages -->|"requests operations"| node_api_client
node_api_client -->|"sends API requests"| node_api_server
node_api_server -->|"mounts"| node_product_routes
node_api_server -->|"mounts"| node_order_routes
node_api_server -->|"mounts"| node_payment_routes
node_product_routes -->|"dispatches"| node_product_controller
node_product_controller -->|"reads and writes"| node_product_model
node_order_routes -->|"dispatches"| node_order_controller
node_order_controller -->|"reads and writes"| node_order_model
node_order_controller -->|"reads"| node_cart_model
node_order_controller -->|"reads"| node_product_model
node_order_controller -->|"updates stock"| node_inventory
node_order_controller -.->|"initiates payment"| node_payments_external
node_payment_routes -->|"dispatches"| node_payment_controller
node_payment_controller -.->|"communicates with"| node_payments_external
node_order_controller -.->|"books parcels"| node_courier
node_order_controller -->|"creates notifications"| node_communications
node_uploads -.->|"stores images"| node_cloudinary
node_admin_pages -->|"manages point of sale"| node_admin_ops
node_admin_pages -->|"manages stock"| node_inventory
node_admin_pages -->|"manages purchasing"| node_purchasing
node_admin_pages -->|"manages returns and finance"| node_returns_finance
node_admin_pages -->|"manages staff"| node_staff
node_admin_pages -->|"views analytics"| node_analytics
node_api_server -->|"connects through data layer"| node_database

click node_app "https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/App.jsx"
click node_catalog_pages "https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/pages/ProductList.jsx"
click node_cart_checkout "https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/pages/Checkout.jsx"
click node_account_pages "https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/pages/Profile.jsx"
click node_admin_pages "https://github.com/thabithx/luzzio-omnicore/tree/main/client/src/pages/admin"
click node_api_client "https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/services/api.js"
click node_api_server "https://github.com/thabithx/luzzio-omnicore/blob/main/server/server.js"
click node_product_routes "https://github.com/thabithx/luzzio-omnicore/blob/main/server/routes/productRoutes.js"
click node_product_controller "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/productController.js"
click node_order_routes "https://github.com/thabithx/luzzio-omnicore/blob/main/server/routes/orderRoutes.js"
click node_order_controller "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/orderController.js"
click node_order_model "https://github.com/thabithx/luzzio-omnicore/blob/main/server/models/Order.js"
click node_cart_model "https://github.com/thabithx/luzzio-omnicore/blob/main/server/models/Cart.js"
click node_product_model "https://github.com/thabithx/luzzio-omnicore/blob/main/server/models/Product.js"
click node_payment_routes "https://github.com/thabithx/luzzio-omnicore/blob/main/server/routes/paymentRoutes.js"
click node_payment_controller "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/paymentController.js"
click node_inventory "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/inventoryController.js"
click node_admin_ops "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/posController.js"
click node_purchasing "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/purchaseOrderController.js"
click node_returns_finance "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/returnController.js"
click node_staff "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/staffController.js"
click node_analytics "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/analyticsController.js"
click node_communications "https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/notificationController.js"
click node_uploads "https://github.com/thabithx/luzzio-omnicore/blob/main/server/routes/uploadRoutes.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_catalog_pages,node_cart_checkout,node_account_pages,node_admin_pages,node_api_client toneBlue
class node_api_server,node_product_routes,node_product_controller,node_order_routes,node_order_controller,node_order_model,node_cart_model,node_product_model,node_payment_routes,node_payment_controller,node_database toneAmber
class node_inventory,node_admin_ops,node_purchasing,node_returns_finance,node_staff,node_analytics toneMint
class node_communications,node_uploads toneRose
class node_shopper,node_admin,node_cloudinary,node_courier,node_payments_external toneIndigo
```

## Components

### Storefront

- [Web application](https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Catalog pages](https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/pages/ProductList.jsx): `client/src/pages/ProductList.jsx`
- [Cart and checkout](https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/pages/Checkout.jsx): `client/src/pages/Checkout.jsx`
- [Account and help](https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/pages/Profile.jsx): `client/src/pages/Profile.jsx`
- [Admin console](https://github.com/thabithx/luzzio-omnicore/tree/main/client/src/pages/admin): `client/src/pages/admin`
- [API client](https://github.com/thabithx/luzzio-omnicore/blob/main/client/src/services/api.js): `client/src/services/api.js`

### Commerce API

- [API server](https://github.com/thabithx/luzzio-omnicore/blob/main/server/server.js): `server/server.js`
- [Catalog routes](https://github.com/thabithx/luzzio-omnicore/blob/main/server/routes/productRoutes.js): `server/routes/productRoutes.js`
- [Catalog controller](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/productController.js): `server/controllers/productController.js`
- [Order routes](https://github.com/thabithx/luzzio-omnicore/blob/main/server/routes/orderRoutes.js): `server/routes/orderRoutes.js`
- [Order controller](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/orderController.js): `server/controllers/orderController.js`
- [Order records](https://github.com/thabithx/luzzio-omnicore/blob/main/server/models/Order.js): `server/models/Order.js`
- [Cart records](https://github.com/thabithx/luzzio-omnicore/blob/main/server/models/Cart.js): `server/models/Cart.js`
- [Product records](https://github.com/thabithx/luzzio-omnicore/blob/main/server/models/Product.js): `server/models/Product.js`
- [Payment routes](https://github.com/thabithx/luzzio-omnicore/blob/main/server/routes/paymentRoutes.js): `server/routes/paymentRoutes.js`
- [Payment processing](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/paymentController.js): `server/controllers/paymentController.js`

### Operations

- [Inventory management](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/inventoryController.js): `server/controllers/inventoryController.js`
- [Operations services](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/posController.js): `server/controllers/posController.js`
- [Suppliers and purchasing](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/purchaseOrderController.js): `server/controllers/purchaseOrderController.js`
- [Returns and finance](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/returnController.js): `server/controllers/returnController.js`
- [Staff and shifts](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/staffController.js): `server/controllers/staffController.js`
- [Analytics](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/analyticsController.js): `server/controllers/analyticsController.js`

### Shared Platform

- [Customer communications](https://github.com/thabithx/luzzio-omnicore/blob/main/server/controllers/notificationController.js): `server/controllers/notificationController.js`
- [Image uploads](https://github.com/thabithx/luzzio-omnicore/blob/main/server/routes/uploadRoutes.js): `server/routes/uploadRoutes.js`

### Other components

- **Shopper**
- **Admin staff**
- **Cloudinary**
- **Fadar courier**
- **Payment providers**
- **MongoDB**

## Connections

- Shopper → Web application: uses
- Admin staff → Admin console: manages
- Web application → Catalog pages: routes to
- Web application → Cart and checkout: routes to
- Web application → Account and help: routes to
- Web application → Admin console: routes to
- Catalog pages → API client: requests catalog
- Cart and checkout → API client: submits commerce actions
- Account and help → API client: requests account data
- Admin console → API client: requests operations
- API client → API server: sends API requests
- API server → Catalog routes: mounts
- API server → Order routes: mounts
- API server → Payment routes: mounts
- Catalog routes → Catalog controller: dispatches
- Catalog controller → Product records: reads and writes
- Order routes → Order controller: dispatches
- Order controller → Order records: reads and writes
- Order controller → Cart records: reads
- Order controller → Product records: reads
- Order controller → Inventory management: updates stock
- Order controller → Payment providers: initiates payment
- Payment routes → Payment processing: dispatches
- Payment processing → Payment providers: communicates with
- Order controller → Fadar courier: books parcels
- Order controller → Customer communications: creates notifications
- Image uploads → Cloudinary: stores images
- Admin console → Operations services: manages point of sale
- Admin console → Inventory management: manages stock
- Admin console → Suppliers and purchasing: manages purchasing
- Admin console → Returns and finance: manages returns and finance
- Admin console → Staff and shifts: manages staff
- Admin console → Analytics: views analytics
- API server → MongoDB: connects through data layer
