# vinodpandey1/eazysupplies-admin architecture

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

- Interactive diagram: https://gitdiagram.com/vinodpandey1/eazysupplies-admin
- Repository: https://github.com/vinodpandey1/eazysupplies-admin

## Overview

This is a Next.js commerce administration application, with catalog, customer, checkout/order, payment, and storefront-theme management capabilities. The principal commerce flow represented here is product discovery and customer-specific pricing followed by authenticated order creation, persistence, and customer notifications; administrators can also approve orders and produce invoice data. The tree indicates broader CMS, media, and business-management areas. Source excerpts substantiate the order and product API relationships; links for unsampled routes and UI-to-API wiring are omitted or marked unverified.

Main entry points: [`src/app/api/orders/route.js`](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/orders/route.js) (Order API), [`src/components/inputFields/FileUploadField.js`](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/inputFields/FileUploadField.js) (Upload field), [`src/components/homePages/jewelleryTwo/jewelleryTwoTabs/ServicesTab.jsx`](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/homePages/jewelleryTwo/jewelleryTwoTabs/ServicesTab.jsx) (Theme service editor), [`src/app/api/products/route.js`](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/products/route.js) (Product API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commerce["Commerce workflow"]
  node_product_api["Product API<br/>[route.js]"]
  node_pricing["Offer pricing<br/>[offerPricing.js]"]
  node_checkout_ui["Checkout<br/>[page.js]"]
  node_orders_api["Order API<br/>[route.js]"]
  node_order_store[("Commerce database")]
  node_payments_api["Payments API<br/>[route.js]"]
  node_payment_gateway["BenePay integration<br/>[route.js]"]
end

subgraph group_admin["Store administration"]
  node_catalog_admin["Catalog management<br/>[page.js]"]
  node_people_admin["Users and roles<br/>[page.js]"]
  node_fulfillment["Shipping and refunds<br/>[page.js]"]
  node_dashboard["Sales dashboard<br/>[page.js]"]
end

subgraph group_content["Storefront content"]
  node_themes["Theme editor<br/>[page.js]"]
  node_theme_services["Theme service editor<br/>[ServicesTab.jsx]"]
  node_media["Media library<br/>[MediaLibrary.tsx]"]
  node_service_wrapper["Service editor wrapper<br/>[ServiceWrapper.js]"]
end

subgraph group_platform["Application services"]
  node_identity["Authentication<br/>[jwt.ts]"]
  node_email["Email and alerts<br/>[emailUtils.ts]"]
  node_pdf["Invoice rendering<br/>[pdfUtils.js]"]
  node_status["Order statuses<br/>[statusConstant.js]"]
  node_file_api["File API<br/>[route.js]"]
  node_api_client["API client<br/>[API.js]"]
  node_input_fields["Form input fields"]
  node_file_field["Upload field<br/>[FileUploadField.js]"]
  node_input_wrapper["Input wrapper<br/>[InputWrapper.js]"]
  node_media_types["Media type config<br/>[MediaConfig.js]"]
end

node_shopper(("Shopper"))

node_shopper -.->|"browses"| node_product_api
node_product_api -->|"loads pricing"| node_pricing
node_shopper -.->|"places order"| node_checkout_ui
node_checkout_ui -.->|"submits order"| node_orders_api
node_orders_api -->|"authenticates"| node_identity
node_orders_api -->|"loads offers"| node_pricing
node_orders_api -->|"reads and writes"| node_order_store
node_orders_api -->|"sends updates"| node_email
node_orders_api -->|"builds invoice data"| node_pdf
node_orders_api -.->|"uses statuses"| node_status
node_payments_api -->|"authenticates"| node_identity
node_payments_api -.->|"initiates payment"| node_payment_gateway
node_catalog_admin -.->|"manages products"| node_product_api
node_people_admin -.->|"manages accounts"| node_identity
node_dashboard -.->|"shows orders"| node_orders_api
node_themes -.->|"edits sections"| node_theme_services
node_theme_services -->|"renders fields"| node_input_fields
node_theme_services -->|"renders uploads"| node_file_field
node_theme_services -->|"sets accepted types"| node_media_types
node_file_field -->|"uses wrapper"| node_input_wrapper
node_file_field -->|"selects attachments"| node_media
node_file_field -.->|"uploads files"| node_file_api
node_service_wrapper -->|"renders fields"| node_input_fields
node_service_wrapper -->|"renders uploads"| node_file_field
node_api_client -.->|"serves UI requests"| node_shopper

click node_product_api "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/products/route.js"
click node_pricing "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/offerPricing.js"
click node_checkout_ui "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/checkout/page.js"
click node_orders_api "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/orders/route.js"
click node_payments_api "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/payments/route.js"
click node_payment_gateway "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/payments/benePay/getUrl/route.js"
click node_identity "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/jwt.ts"
click node_email "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/emailUtils.ts"
click node_pdf "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/pdfUtils.js"
click node_status "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/statusConstant.js"
click node_catalog_admin "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/product/page.js"
click node_people_admin "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/user/page.js"
click node_fulfillment "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/shipping/page.js"
click node_dashboard "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/dashboard/page.js"
click node_themes "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/theme/page.js"
click node_theme_services "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/homePages/jewelleryTwo/jewelleryTwoTabs/ServicesTab.jsx"
click node_media "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/MediaLibrary/MediaLibrary.tsx"
click node_file_api "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/file/route.js"
click node_api_client "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/utils/axiosUtils/API.js"
click node_input_fields "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/inputFields/SimpleInputField.js"
click node_file_field "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/inputFields/FileUploadField.js"
click node_input_wrapper "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/utils/hoc/InputWrapper.js"
click node_service_wrapper "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/themeOption/sellerDashboard/ServiceWrapper.js"
click node_media_types "https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/data/MediaConfig.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_product_api,node_pricing,node_checkout_ui,node_orders_api,node_order_store,node_payments_api,node_payment_gateway toneBlue
class node_catalog_admin,node_people_admin,node_fulfillment,node_dashboard toneAmber
class node_themes,node_theme_services,node_media,node_service_wrapper toneMint
class node_identity,node_email,node_pdf,node_status,node_file_api,node_api_client,node_input_fields,node_file_field,node_input_wrapper,node_media_types toneRose
class node_shopper toneIndigo
```

## Components

### Commerce workflow

- [Product API](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/products/route.js): `src/app/api/products/route.js`
- [Offer pricing](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/offerPricing.js): `src/app/api/utils/offerPricing.js`
- [Checkout](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/checkout/page.js): `src/app/(mainLayout)/checkout/page.js`
- [Order API](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/orders/route.js): `src/app/api/orders/route.js`
- **Commerce database**
- [Payments API](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/payments/route.js): `src/app/api/payments/route.js`
- [BenePay integration](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/payments/benePay/getUrl/route.js): `src/app/api/payments/benePay/getUrl/route.js`

### Store administration

- [Catalog management](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/product/page.js): `src/app/(mainLayout)/product/page.js`
- [Users and roles](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/user/page.js): `src/app/(mainLayout)/user/page.js`
- [Shipping and refunds](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/shipping/page.js): `src/app/(mainLayout)/shipping/page.js`
- [Sales dashboard](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/dashboard/page.js): `src/app/(mainLayout)/dashboard/page.js`

### Storefront content

- [Theme editor](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/(mainLayout)/theme/page.js): `src/app/(mainLayout)/theme/page.js`
- [Theme service editor](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/homePages/jewelleryTwo/jewelleryTwoTabs/ServicesTab.jsx): `src/components/homePages/jewelleryTwo/jewelleryTwoTabs/ServicesTab.jsx`
- [Media library](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/MediaLibrary/MediaLibrary.tsx): `src/components/MediaLibrary/MediaLibrary.tsx`
- [Service editor wrapper](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/themeOption/sellerDashboard/ServiceWrapper.js): `src/components/themeOption/sellerDashboard/ServiceWrapper.js`

### Application services

- [Authentication](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/jwt.ts): `src/app/api/utils/jwt.ts`
- [Email and alerts](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/emailUtils.ts): `src/app/api/utils/emailUtils.ts`
- [Invoice rendering](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/pdfUtils.js): `src/app/api/utils/pdfUtils.js`
- [Order statuses](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/utils/statusConstant.js): `src/app/api/utils/statusConstant.js`
- [File API](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/app/api/file/route.js): `src/app/api/file/route.js`
- [API client](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/utils/axiosUtils/API.js): `src/utils/axiosUtils/API.js`
- [Form input fields](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/inputFields/SimpleInputField.js): `src/components/inputFields/SimpleInputField.js`
- [Upload field](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/components/inputFields/FileUploadField.js): `src/components/inputFields/FileUploadField.js`
- [Input wrapper](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/utils/hoc/InputWrapper.js): `src/utils/hoc/InputWrapper.js`
- [Media type config](https://github.com/vinodpandey1/eazysupplies-admin/blob/main/src/data/MediaConfig.js): `src/data/MediaConfig.js`

### Other components

- **Shopper**

## Connections

- Shopper → Product API: browses
- Product API → Offer pricing: loads pricing (evidence: `src/app/api/products/route.js`)
- Shopper → Checkout: places order
- Checkout → Order API: submits order
- Order API → Authentication: authenticates (evidence: `src/app/api/orders/route.js`)
- Order API → Offer pricing: loads offers (evidence: `src/app/api/orders/route.js`)
- Order API → Commerce database: reads and writes (evidence: `src/app/api/orders/route.js`)
- Order API → Email and alerts: sends updates (evidence: `src/app/api/orders/route.js`)
- Order API → Invoice rendering: builds invoice data (evidence: `src/app/api/orders/route.js`)
- Order API → Order statuses: uses statuses (evidence: `src/app/api/orders/route.js`)
- Payments API → Authentication: authenticates (evidence: `src/app/api/payments/route.js`)
- Payments API → BenePay integration: initiates payment
- Catalog management → Product API: manages products
- Users and roles → Authentication: manages accounts
- Sales dashboard → Order API: shows orders
- Theme editor → Theme service editor: edits sections
- Theme service editor → Form input fields: renders fields (evidence: `src/components/homePages/jewelleryTwo/jewelleryTwoTabs/ServicesTab.jsx`)
- Theme service editor → Upload field: renders uploads (evidence: `src/components/homePages/jewelleryTwo/jewelleryTwoTabs/ServicesTab.jsx`)
- Theme service editor → Media type config: sets accepted types (evidence: `src/components/homePages/jewelleryTwo/jewelleryTwoTabs/ServicesTab.jsx`)
- Upload field → Input wrapper: uses wrapper (evidence: `src/components/inputFields/FileUploadField.js`)
- Upload field → Media library: selects attachments (evidence: `src/components/inputFields/FileUploadField.js`)
- Upload field → File API: uploads files
- Service editor wrapper → Form input fields: renders fields (evidence: `src/components/themeOption/sellerDashboard/ServiceWrapper.js`)
- Service editor wrapper → Upload field: renders uploads (evidence: `src/components/themeOption/sellerDashboard/ServiceWrapper.js`)
- API client → Shopper: serves UI requests
