# hexagondigitalservices/freshmart_app architecture

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

- Interactive diagram: https://gitdiagram.com/hexagondigitalservices/freshmart_app
- Repository: https://github.com/hexagondigitalservices/freshmart_app

## Overview

This repository appears to be a FreshMart grocery and hookah storefront paired with a separate administration interface and backend controllers. The customer workflow represented in sampled code covers cart review, address selection, checkout, payment return, and order tracking/cancellation; the admin interface includes catalog maintenance and order oversight. The sampled App components are placeholders, so there is no evidence connecting the page components to application routing. API implementation files are absent from the tree, and backend-controller relationships to the frontends cannot be verified.

Main entry points: [`frontend/src/main.jsx`](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/main.jsx) (Frontend entry), [`admin/src/main.jsx`](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/main.jsx) (Admin entry), [`admin/src/components/DashboardPage/AdminOrdersView.jsx`](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/AdminOrdersView.jsx) (Order dashboard), [`admin/src/components/DashboardPage/components/StatusDropdown.jsx`](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/components/StatusDropdown.jsx) (Status selector)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_customer["Customer storefront"]
  node_frontend_entry["Frontend entry<br/>[main.jsx]"]
  node_frontend_app["Frontend app<br/>[App.jsx]"]
  node_catalog["Product browsing"]
  node_hookah["Hookah browsing<br/>[HookahPage.jsx]"]
  node_search["Search results<br/>[SearchResults.jsx]"]
  node_cart["Cart and checkout<br/>[CartPage.jsx]"]
  node_addresses["Delivery addresses<br/>[AddressPage.jsx]"]
  node_payment_return["Payment return"]
  node_customer_orders["Order tracking<br/>[OrdersPage.jsx]"]
end

subgraph group_admin["Administration"]
  node_admin_entry["Admin entry<br/>[main.jsx]"]
  node_admin_app["Admin app<br/>[App.jsx]"]
  node_admin_catalog["Catalog management<br/>[AddItemsPage.jsx]"]
  node_admin_inventory["Inventory editing<br/>[ItemListPage.jsx]"]
  node_admin_hookah["Hookah management<br/>[AddHookahPage.jsx]"]
  node_admin_hookah_list["Hookah inventory<br/>[HookahListPage.jsx]"]
  node_admin_orders["Order dashboard"]
  node_order_details["Order details"]
  node_status_dropdown["Status selector<br/>[StatusDropdown.jsx]"]
  node_status_config["Status configuration<br/>[statusConfig.jsx]"]
end

subgraph group_backend["Backend services"]
  node_admin_orders_api["Order controller"]
  node_admin_controller["Admin controller<br/>[adminController.js]"]
  node_category_controller["Category controller"]
  node_payment_controller["Payment controller"]
  node_user_controller["User controller<br/>[userController.js]"]
  node_email_sender["Email utility<br/>[sendEmail.js]"]
end

subgraph group_identity["Customer identity"]
  node_login["Sign in<br/>[LoginPage.jsx]"]
  node_signup["Sign up<br/>[SignupPage.jsx]"]
  node_verify_email["Email verification<br/>[VerifyEmail.jsx]"]
  node_forgot_password["Password recovery<br/>[ForgotPassword.jsx]"]
  node_reset_password["Password reset<br/>[ResetPassword.jsx]"]
end

node_shopper(("Shopper"))

node_frontend_entry -->|"renders"| node_frontend_app
node_admin_entry -->|"renders"| node_admin_app
node_admin_orders -->|"renders"| node_order_details
node_status_dropdown -->|"reads settings"| node_status_config

click node_frontend_entry "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/main.jsx"
click node_frontend_app "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/App.jsx"
click node_catalog "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/ProductItemsPage/ProductItemsPage.jsx"
click node_hookah "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/HookahPage/HookahPage.jsx"
click node_search "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/SearchResults/SearchResults.jsx"
click node_cart "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/CartPage/CartPage.jsx"
click node_addresses "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/AddressPage/AddressPage.jsx"
click node_payment_return "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/PaymentReturnPage/PaymentReturnPage.jsx"
click node_customer_orders "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/OrdersPage/OrdersPage.jsx"
click node_admin_entry "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/main.jsx"
click node_admin_app "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/App.jsx"
click node_admin_catalog "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/AddItemsPage/AddItemsPage.jsx"
click node_admin_inventory "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/ItemListPage/ItemListPage.jsx"
click node_admin_hookah "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/AddHookahPage/AddHookahPage.jsx"
click node_admin_hookah_list "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/HookahListPage/HookahListPage.jsx"
click node_admin_orders "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/AdminOrdersView.jsx"
click node_order_details "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/components/OrderDetailsModal.jsx"
click node_status_dropdown "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/components/StatusDropdown.jsx"
click node_status_config "https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/statusConfig.jsx"
click node_admin_orders_api "https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/adminOrderController.js"
click node_admin_controller "https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/adminController.js"
click node_category_controller "https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/categoryController.js"
click node_payment_controller "https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/paymentController.js"
click node_user_controller "https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/userController.js"
click node_email_sender "https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/utils/sendEmail.js"
click node_login "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/LoginPage/LoginPage.jsx"
click node_signup "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/SignupPage/SignupPage.jsx"
click node_verify_email "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/pages/auth/VerifyEmail.jsx"
click node_forgot_password "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/pages/auth/ForgotPassword.jsx"
click node_reset_password "https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/pages/auth/ResetPassword.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_frontend_entry,node_frontend_app,node_catalog,node_hookah,node_search,node_cart,node_addresses,node_payment_return,node_customer_orders toneBlue
class node_admin_entry,node_admin_app,node_admin_catalog,node_admin_inventory,node_admin_hookah,node_admin_hookah_list,node_admin_orders,node_order_details,node_status_dropdown,node_status_config toneAmber
class node_admin_orders_api,node_admin_controller,node_category_controller,node_payment_controller,node_user_controller,node_email_sender toneMint
class node_login,node_signup,node_verify_email,node_forgot_password,node_reset_password toneRose
class node_shopper toneIndigo
```

## Components

### Customer storefront

- [Frontend entry](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/main.jsx): `frontend/src/main.jsx`
- [Frontend app](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Product browsing](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/ProductItemsPage/ProductItemsPage.jsx): `frontend/src/components/ProductItemsPage/ProductItemsPage.jsx`
- [Hookah browsing](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/HookahPage/HookahPage.jsx): `frontend/src/components/HookahPage/HookahPage.jsx`
- [Search results](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/SearchResults/SearchResults.jsx): `frontend/src/components/SearchResults/SearchResults.jsx`
- [Cart and checkout](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/CartPage/CartPage.jsx): `frontend/src/components/CartPage/CartPage.jsx`
- [Delivery addresses](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/AddressPage/AddressPage.jsx): `frontend/src/components/AddressPage/AddressPage.jsx`
- [Payment return](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/PaymentReturnPage/PaymentReturnPage.jsx): `frontend/src/components/PaymentReturnPage/PaymentReturnPage.jsx`
- [Order tracking](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/OrdersPage/OrdersPage.jsx): `frontend/src/components/OrdersPage/OrdersPage.jsx`

### Administration

- [Admin entry](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/main.jsx): `admin/src/main.jsx`
- [Admin app](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/App.jsx): `admin/src/App.jsx`
- [Catalog management](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/AddItemsPage/AddItemsPage.jsx): `admin/src/components/AddItemsPage/AddItemsPage.jsx`
- [Inventory editing](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/ItemListPage/ItemListPage.jsx): `admin/src/components/ItemListPage/ItemListPage.jsx`
- [Hookah management](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/AddHookahPage/AddHookahPage.jsx): `admin/src/components/AddHookahPage/AddHookahPage.jsx`
- [Hookah inventory](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/HookahListPage/HookahListPage.jsx): `admin/src/components/HookahListPage/HookahListPage.jsx`
- [Order dashboard](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/AdminOrdersView.jsx): `admin/src/components/DashboardPage/AdminOrdersView.jsx`
- [Order details](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/components/OrderDetailsModal.jsx): `admin/src/components/DashboardPage/components/OrderDetailsModal.jsx`
- [Status selector](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/components/StatusDropdown.jsx): `admin/src/components/DashboardPage/components/StatusDropdown.jsx`
- [Status configuration](https://github.com/hexagondigitalservices/freshmart_app/blob/main/admin/src/components/DashboardPage/statusConfig.jsx): `admin/src/components/DashboardPage/statusConfig.jsx`

### Backend services

- [Order controller](https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/adminOrderController.js): `backend/controllers/adminOrderController.js`
- [Admin controller](https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/adminController.js): `backend/controllers/adminController.js`
- [Category controller](https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/categoryController.js): `backend/controllers/categoryController.js`
- [Payment controller](https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/paymentController.js): `backend/controllers/paymentController.js`
- [User controller](https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/controllers/userController.js): `backend/controllers/userController.js`
- [Email utility](https://github.com/hexagondigitalservices/freshmart_app/blob/main/backend/utils/sendEmail.js): `backend/utils/sendEmail.js`

### Customer identity

- [Sign in](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/LoginPage/LoginPage.jsx): `frontend/src/components/LoginPage/LoginPage.jsx`
- [Sign up](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/components/SignupPage/SignupPage.jsx): `frontend/src/components/SignupPage/SignupPage.jsx`
- [Email verification](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/pages/auth/VerifyEmail.jsx): `frontend/src/pages/auth/VerifyEmail.jsx`
- [Password recovery](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/pages/auth/ForgotPassword.jsx): `frontend/src/pages/auth/ForgotPassword.jsx`
- [Password reset](https://github.com/hexagondigitalservices/freshmart_app/blob/main/frontend/src/pages/auth/ResetPassword.jsx): `frontend/src/pages/auth/ResetPassword.jsx`

### Other components

- **Shopper**

## Connections

- Frontend entry → Frontend app: renders (evidence: `frontend/src/main.jsx`)
- Admin entry → Admin app: renders (evidence: `admin/src/main.jsx`)
- Order dashboard → Order details: renders (evidence: `admin/src/components/DashboardPage/AdminOrdersView.jsx`)
- Status selector → Status configuration: reads settings (evidence: `admin/src/components/DashboardPage/components/StatusDropdown.jsx`)
