# xenotrix-technologies/zeba architecture

> Architecture diagram of the GitHub repository xenotrix-technologies/zeba, 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/xenotrix-technologies/zeba
- Repository: https://github.com/xenotrix-technologies/zeba

## Overview

ZEBA is an online period-care storefront with customer accounts, checkout and order tracking, plus an administrative console for store operations. The main workflow runs from browsing products through checkout and payment to order confirmation and notifications; customers and admins can then view or manage orders. The graph includes the client route entry point, major API domains, and database and notification layers. The README only names the product; relationships for unsampled modules are limited to imports and route wiring recorded in the SOURCE INDEX.

Main entry points: [`server/src/index.js`](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/index.js) (API entry), [`client/src/App.jsx`](https://github.com/xenotrix-technologies/zeba/blob/main/client/src/App.jsx) (Store routes), [`server/src/controllers/paymentController.js`](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/paymentController.js) (Payment API), [`server/src/services/notificationService.js`](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/services/notificationService.js) (Order notifications)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Customer storefront"]
  node_app["Store routes<br/>[App.jsx]"]
  node_home["Home and catalog<br/>[Home.jsx]"]
  node_product["Product detail<br/>[ProductDetail.jsx]"]
  node_cart["Cart state<br/>[CartContext.jsx]"]
  node_checkout["Checkout<br/>[Checkout.jsx]"]
  node_tracking["Order tracking<br/>[OrderTracking.jsx]"]
  node_store_settings["Store settings"]
  node_admin_ui["Admin console<br/>[AdminLayout.jsx]"]
end

subgraph group_api["API domains"]
  node_api_entry["API entry<br/>[index.js]"]
  node_auth["Authentication<br/>[authController.js]"]
  node_products["Product API"]
  node_orders["Order API<br/>[orderController.js]"]
  node_payments["Payment API"]
  node_customers["Customer accounts"]
  node_content["Content and reviews"]
  node_contact["Contact messages"]
end

subgraph group_operations["Store operations"]
  node_admin_api["Admin operations<br/>[adminController.js]"]
  node_settings_api["Settings API"]
end

subgraph group_data["Persistence and messaging"]
  node_db[("PostgreSQL store<br/>[db.js]")]
  node_notifications["Order notifications"]
  node_email["Email delivery<br/>[emailService.js]"]
end

node_shopper(("Shopper"))
node_admin(("Store admin"))
node_razorpay["Razorpay"]

node_shopper -->|"opens storefront"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_product
node_app -->|"routes to"| node_checkout
node_app -->|"routes to"| node_tracking
node_cart -->|"reads settings"| node_store_settings
node_admin -.->|"uses console"| node_admin_ui
node_app -->|"routes to"| node_admin_ui
node_app -.->|"requests API"| node_api_entry
node_api_entry -->|"routes auth"| node_auth
node_api_entry -->|"routes products"| node_products
node_api_entry -->|"routes orders"| node_orders
node_api_entry -->|"routes payments"| node_payments
node_api_entry -->|"routes customers"| node_customers
node_api_entry -->|"routes content"| node_content
node_api_entry -->|"routes contact"| node_contact
node_api_entry -->|"routes admin"| node_admin_api
node_api_entry -->|"routes settings"| node_settings_api
node_payments -->|"reads and writes"| node_db
node_orders -->|"queries orders"| node_db
node_admin_api -->|"queries store data"| node_db
node_payments -.->|"dispatches notices"| node_notifications
node_orders -->|"dispatches notices"| node_notifications
node_admin_api -->|"uses notifications"| node_notifications
node_payments -.->|"uses payment gateway"| node_razorpay
node_notifications -->|"delegates email"| node_email
node_email -->|"records email events"| node_db

click node_app "https://github.com/xenotrix-technologies/zeba/blob/main/client/src/App.jsx"
click node_home "https://github.com/xenotrix-technologies/zeba/blob/main/client/src/pages/Home.jsx"
click node_product "https://github.com/xenotrix-technologies/zeba/blob/main/client/src/pages/ProductDetail.jsx"
click node_cart "https://github.com/xenotrix-technologies/zeba/blob/main/client/src/context/CartContext.jsx"
click node_checkout "https://github.com/xenotrix-technologies/zeba/blob/main/client/src/pages/Checkout.jsx"
click node_tracking "https://github.com/xenotrix-technologies/zeba/blob/main/client/src/pages/OrderTracking.jsx"
click node_store_settings "https://github.com/xenotrix-technologies/zeba/blob/main/client/src/context/StoreSettingsContext.jsx"
click node_admin_ui "https://github.com/xenotrix-technologies/zeba/blob/main/client/src/layouts/AdminLayout.jsx"
click node_api_entry "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/index.js"
click node_auth "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/authController.js"
click node_products "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/productController.js"
click node_orders "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/orderController.js"
click node_payments "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/paymentController.js"
click node_customers "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/customerController.js"
click node_content "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/contentController.js"
click node_contact "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/contactController.js"
click node_admin_api "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/adminController.js"
click node_settings_api "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/settingsController.js"
click node_db "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/config/db.js"
click node_notifications "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/services/notificationService.js"
click node_email "https://github.com/xenotrix-technologies/zeba/blob/main/server/src/services/emailService.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_home,node_product,node_cart,node_checkout,node_tracking,node_store_settings,node_admin_ui toneBlue
class node_api_entry,node_auth,node_products,node_orders,node_payments,node_customers,node_content,node_contact toneAmber
class node_admin_api,node_settings_api toneMint
class node_db,node_notifications,node_email toneRose
class node_shopper,node_admin,node_razorpay toneIndigo
```

## Components

### Customer storefront

- [Store routes](https://github.com/xenotrix-technologies/zeba/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Home and catalog](https://github.com/xenotrix-technologies/zeba/blob/main/client/src/pages/Home.jsx): `client/src/pages/Home.jsx`
- [Product detail](https://github.com/xenotrix-technologies/zeba/blob/main/client/src/pages/ProductDetail.jsx): `client/src/pages/ProductDetail.jsx`
- [Cart state](https://github.com/xenotrix-technologies/zeba/blob/main/client/src/context/CartContext.jsx): `client/src/context/CartContext.jsx`
- [Checkout](https://github.com/xenotrix-technologies/zeba/blob/main/client/src/pages/Checkout.jsx): `client/src/pages/Checkout.jsx`
- [Order tracking](https://github.com/xenotrix-technologies/zeba/blob/main/client/src/pages/OrderTracking.jsx): `client/src/pages/OrderTracking.jsx`
- [Store settings](https://github.com/xenotrix-technologies/zeba/blob/main/client/src/context/StoreSettingsContext.jsx): `client/src/context/StoreSettingsContext.jsx`
- [Admin console](https://github.com/xenotrix-technologies/zeba/blob/main/client/src/layouts/AdminLayout.jsx): `client/src/layouts/AdminLayout.jsx`

### API domains

- [API entry](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/index.js): `server/src/index.js`
- [Authentication](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/authController.js): `server/src/controllers/authController.js`
- [Product API](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/productController.js): `server/src/controllers/productController.js`
- [Order API](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/orderController.js): `server/src/controllers/orderController.js`
- [Payment API](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/paymentController.js): `server/src/controllers/paymentController.js`
- [Customer accounts](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/customerController.js): `server/src/controllers/customerController.js`
- [Content and reviews](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/contentController.js): `server/src/controllers/contentController.js`
- [Contact messages](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/contactController.js): `server/src/controllers/contactController.js`

### Store operations

- [Admin operations](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/adminController.js): `server/src/controllers/adminController.js`
- [Settings API](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/controllers/settingsController.js): `server/src/controllers/settingsController.js`

### Persistence and messaging

- [PostgreSQL store](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/config/db.js): `server/src/config/db.js`
- [Order notifications](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/services/notificationService.js): `server/src/services/notificationService.js`
- [Email delivery](https://github.com/xenotrix-technologies/zeba/blob/main/server/src/services/emailService.js): `server/src/services/emailService.js`

### Other components

- **Shopper**
- **Store admin**
- **Razorpay**

## Connections

- Shopper → Store routes: opens storefront (evidence: `client/src/App.jsx`)
- Store routes → Home and catalog: routes to (evidence: `client/src/App.jsx`)
- Store routes → Product detail: routes to (evidence: `client/src/App.jsx`)
- Store routes → Checkout: routes to (evidence: `client/src/App.jsx`)
- Store routes → Order tracking: routes to (evidence: `client/src/App.jsx`)
- Cart state → Store settings: reads settings (evidence: `client/src/context/CartContext.jsx`)
- Store admin → Admin console: uses console
- Store routes → Admin console: routes to (evidence: `client/src/App.jsx`)
- Store routes → API entry: requests API
- API entry → Authentication: routes auth (evidence: `server/src/index.js`)
- API entry → Product API: routes products (evidence: `server/src/index.js`)
- API entry → Order API: routes orders (evidence: `server/src/index.js`)
- API entry → Payment API: routes payments (evidence: `server/src/index.js`)
- API entry → Customer accounts: routes customers (evidence: `server/src/index.js`)
- API entry → Content and reviews: routes content (evidence: `server/src/index.js`)
- API entry → Contact messages: routes contact (evidence: `server/src/index.js`)
- API entry → Admin operations: routes admin (evidence: `server/src/index.js`)
- API entry → Settings API: routes settings (evidence: `server/src/index.js`)
- Payment API → PostgreSQL store: reads and writes (evidence: `server/src/controllers/paymentController.js`)
- Order API → PostgreSQL store: queries orders (evidence: `server/src/controllers/orderController.js`)
- Admin operations → PostgreSQL store: queries store data (evidence: `server/src/controllers/adminController.js`)
- Payment API → Order notifications: dispatches notices
- Order API → Order notifications: dispatches notices (evidence: `server/src/controllers/orderController.js`)
- Admin operations → Order notifications: uses notifications (evidence: `server/src/controllers/adminController.js`)
- Payment API → Razorpay: uses payment gateway
- Order notifications → Email delivery: delegates email (evidence: `server/src/services/notificationService.js`)
- Email delivery → PostgreSQL store: records email events (evidence: `server/src/services/emailService.js`)
