# princejha08/nexfix architecture

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

## Overview

NexFix is a hardware, paint, and sanitaryware e-commerce store. Shoppers browse products, manage accounts and addresses, add items to a cart, complete checkout, and track orders; admins also manage catalog and orders. The graph shows the React route shell, Express route mounting, and source-confirmed product, user, review, and payment interactions. The README documents additional cart, address, order, and admin capabilities, but their internal wiring is not fully shown in the sampled source.

Main entry points: [`frontend/src/App.jsx`](https://github.com/princejha08/nexfix/blob/main/frontend/src/App.jsx) (React App), [`backend/src/controller/order.controller.js`](https://github.com/princejha08/nexfix/blob/main/backend/src/controller/order.controller.js) (Order Controller), [`backend/src/app.js`](https://github.com/princejha08/nexfix/blob/main/backend/src/app.js) (Express App), [`backend/src/controller/user.controller.js`](https://github.com/princejha08/nexfix/blob/main/backend/src/controller/user.controller.js) (User Controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_webapp["React App<br/>[App.jsx]"]
  node_catalogui["Catalog Pages<br/>[ProductList.jsx]"]
  node_productui["Product Page<br/>[Product.jsx]"]
  node_homeui["Home Page<br/>[HomePage.jsx]"]
  node_cartui["Cart Page<br/>[MyCart.jsx]"]
  node_ordersui["Order Tracking<br/>[MyOrders.jsx]"]
end

subgraph group_identity["Accounts"]
  node_accountui["Account Forms<br/>[CreateAccount.jsx]"]
  node_loginui["Login<br/>[LogIn.jsx]"]
  node_addressui["Address Forms<br/>[AddAddressForm.jsx]"]
end

subgraph group_commerce["Commerce"]
end

subgraph group_server["Backend API"]
  node_api["Express App<br/>[app.js]"]
  node_productroutes["Product Routes<br/>[product.routes.js]"]
  node_productctrl["Product Controller"]
  node_userroutes["User Routes<br/>[user.routes.js]"]
  node_userctrl["User Controller<br/>[user.controller.js]"]
  node_reviewroutes["Review Routes<br/>[review.routes.js]"]
  node_reviewctrl["Review Controller"]
  node_paymentroutes["Payment Routes<br/>[payment.routes.js]"]
  node_orderctrl["Order Controller"]
end

subgraph group_data["Data And Services"]
  node_mongodb[("MongoDB<br/>[index.js]")]
  node_products["Product Model<br/>[product.model.js]"]
  node_users["User Model<br/>[user.model.js]"]
  node_carts["Cart Model<br/>[cart.model.js]"]
  node_orders["Order Model<br/>[order.model.js]"]
  node_reviews["Review Model<br/>[review.model.js]"]
  node_cashfree["Cashfree"]
  node_cloudinary["Cloudinary"]
end

node_shopper(("Shopper"))
node_admin(("Admin"))

node_shopper -->|"uses"| node_webapp
node_admin -->|"manages store"| node_webapp
node_webapp -->|"routes to"| node_homeui
node_webapp -->|"routes to"| node_catalogui
node_webapp -->|"routes to"| node_productui
node_webapp -->|"routes to"| node_cartui
node_webapp -->|"routes to"| node_ordersui
node_webapp -->|"routes to"| node_accountui
node_webapp -->|"routes to"| node_loginui
node_webapp -->|"routes to"| node_addressui
node_api -->|"mounts"| node_productroutes
node_api -->|"mounts"| node_userroutes
node_api -->|"mounts"| node_reviewroutes
node_api -->|"mounts"| node_paymentroutes
node_productroutes -->|"dispatches"| node_productctrl
node_productctrl -->|"reads/writes"| node_products
node_productctrl -.->|"uploads images"| node_cloudinary
node_userroutes -->|"dispatches"| node_userctrl
node_userctrl -->|"reads/writes"| node_users
node_userctrl -->|"creates cart"| node_carts
node_userctrl -.->|"uploads image"| node_cloudinary
node_reviewroutes -->|"dispatches"| node_reviewctrl
node_reviewctrl -->|"reads/updates"| node_products
node_reviewctrl -->|"creates review"| node_reviews
node_paymentroutes -.->|"creates payment link"| node_cashfree
node_orderctrl -->|"reads"| node_users
node_orderctrl -->|"reads/clears"| node_carts
node_orderctrl -->|"creates/reads"| node_orders
node_orderctrl -->|"updates stock"| node_products
node_orderctrl -.->|"checks payment"| node_cashfree

click node_webapp "https://github.com/princejha08/nexfix/blob/main/frontend/src/App.jsx"
click node_catalogui "https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/ProductList.jsx"
click node_productui "https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/Product.jsx"
click node_homeui "https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/HomePage.jsx"
click node_cartui "https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/MyCart.jsx"
click node_ordersui "https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/MyOrders.jsx"
click node_accountui "https://github.com/princejha08/nexfix/blob/main/frontend/src/components/forms/CreateAccount.jsx"
click node_loginui "https://github.com/princejha08/nexfix/blob/main/frontend/src/components/LogIn.jsx"
click node_addressui "https://github.com/princejha08/nexfix/blob/main/frontend/src/components/forms/AddAddressForm.jsx"
click node_api "https://github.com/princejha08/nexfix/blob/main/backend/src/app.js"
click node_productroutes "https://github.com/princejha08/nexfix/blob/main/backend/src/routes/product.routes.js"
click node_productctrl "https://github.com/princejha08/nexfix/blob/main/backend/src/controller/product.controller.js"
click node_userroutes "https://github.com/princejha08/nexfix/blob/main/backend/src/routes/user.routes.js"
click node_userctrl "https://github.com/princejha08/nexfix/blob/main/backend/src/controller/user.controller.js"
click node_reviewroutes "https://github.com/princejha08/nexfix/blob/main/backend/src/routes/review.routes.js"
click node_reviewctrl "https://github.com/princejha08/nexfix/blob/main/backend/src/controller/review.controller.js"
click node_paymentroutes "https://github.com/princejha08/nexfix/blob/main/backend/src/routes/payment.routes.js"
click node_orderctrl "https://github.com/princejha08/nexfix/blob/main/backend/src/controller/order.controller.js"
click node_mongodb "https://github.com/princejha08/nexfix/blob/main/backend/src/db/index.js"
click node_products "https://github.com/princejha08/nexfix/blob/main/backend/src/models/product.model.js"
click node_users "https://github.com/princejha08/nexfix/blob/main/backend/src/models/user.model.js"
click node_carts "https://github.com/princejha08/nexfix/blob/main/backend/src/models/cart.model.js"
click node_orders "https://github.com/princejha08/nexfix/blob/main/backend/src/models/order.model.js"
click node_reviews "https://github.com/princejha08/nexfix/blob/main/backend/src/models/review.model.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_webapp,node_catalogui,node_productui,node_homeui,node_cartui,node_ordersui toneBlue
class node_accountui,node_loginui,node_addressui toneAmber
class node_api,node_productroutes,node_productctrl,node_userroutes,node_userctrl,node_reviewroutes,node_reviewctrl,node_paymentroutes,node_orderctrl toneRose
class node_mongodb,node_products,node_users,node_carts,node_orders,node_reviews,node_cashfree,node_cloudinary,node_shopper,node_admin toneIndigo
```

## Components

### Storefront

- [React App](https://github.com/princejha08/nexfix/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Catalog Pages](https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/ProductList.jsx): `frontend/src/components/pages/ProductList.jsx`
- [Product Page](https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/Product.jsx): `frontend/src/components/pages/Product.jsx`
- [Home Page](https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/HomePage.jsx): `frontend/src/components/pages/HomePage.jsx`
- [Cart Page](https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/MyCart.jsx): `frontend/src/components/pages/MyCart.jsx`
- [Order Tracking](https://github.com/princejha08/nexfix/blob/main/frontend/src/components/pages/MyOrders.jsx): `frontend/src/components/pages/MyOrders.jsx`

### Accounts

- [Account Forms](https://github.com/princejha08/nexfix/blob/main/frontend/src/components/forms/CreateAccount.jsx): `frontend/src/components/forms/CreateAccount.jsx`
- [Login](https://github.com/princejha08/nexfix/blob/main/frontend/src/components/LogIn.jsx): `frontend/src/components/LogIn.jsx`
- [Address Forms](https://github.com/princejha08/nexfix/blob/main/frontend/src/components/forms/AddAddressForm.jsx): `frontend/src/components/forms/AddAddressForm.jsx`

### Backend API

- [Express App](https://github.com/princejha08/nexfix/blob/main/backend/src/app.js): `backend/src/app.js`
- [Product Routes](https://github.com/princejha08/nexfix/blob/main/backend/src/routes/product.routes.js): `backend/src/routes/product.routes.js`
- [Product Controller](https://github.com/princejha08/nexfix/blob/main/backend/src/controller/product.controller.js): `backend/src/controller/product.controller.js`
- [User Routes](https://github.com/princejha08/nexfix/blob/main/backend/src/routes/user.routes.js): `backend/src/routes/user.routes.js`
- [User Controller](https://github.com/princejha08/nexfix/blob/main/backend/src/controller/user.controller.js): `backend/src/controller/user.controller.js`
- [Review Routes](https://github.com/princejha08/nexfix/blob/main/backend/src/routes/review.routes.js): `backend/src/routes/review.routes.js`
- [Review Controller](https://github.com/princejha08/nexfix/blob/main/backend/src/controller/review.controller.js): `backend/src/controller/review.controller.js`
- [Payment Routes](https://github.com/princejha08/nexfix/blob/main/backend/src/routes/payment.routes.js): `backend/src/routes/payment.routes.js`
- [Order Controller](https://github.com/princejha08/nexfix/blob/main/backend/src/controller/order.controller.js): `backend/src/controller/order.controller.js`

### Data And Services

- [MongoDB](https://github.com/princejha08/nexfix/blob/main/backend/src/db/index.js): `backend/src/db/index.js`
- [Product Model](https://github.com/princejha08/nexfix/blob/main/backend/src/models/product.model.js): `backend/src/models/product.model.js`
- [User Model](https://github.com/princejha08/nexfix/blob/main/backend/src/models/user.model.js): `backend/src/models/user.model.js`
- [Cart Model](https://github.com/princejha08/nexfix/blob/main/backend/src/models/cart.model.js): `backend/src/models/cart.model.js`
- [Order Model](https://github.com/princejha08/nexfix/blob/main/backend/src/models/order.model.js): `backend/src/models/order.model.js`
- [Review Model](https://github.com/princejha08/nexfix/blob/main/backend/src/models/review.model.js): `backend/src/models/review.model.js`
- **Cashfree**
- **Cloudinary**

### Other components

- **Shopper**
- **Admin**

## Connections

- Shopper → React App: uses
- Admin → React App: manages store
- React App → Home Page: routes to
- React App → Catalog Pages: routes to
- React App → Product Page: routes to
- React App → Cart Page: routes to
- React App → Order Tracking: routes to
- React App → Account Forms: routes to
- React App → Login: routes to
- React App → Address Forms: routes to
- Express App → Product Routes: mounts
- Express App → User Routes: mounts
- Express App → Review Routes: mounts
- Express App → Payment Routes: mounts
- Product Routes → Product Controller: dispatches
- Product Controller → Product Model: reads/writes
- Product Controller → Cloudinary: uploads images
- User Routes → User Controller: dispatches
- User Controller → User Model: reads/writes
- User Controller → Cart Model: creates cart
- User Controller → Cloudinary: uploads image
- Review Routes → Review Controller: dispatches
- Review Controller → Product Model: reads/updates
- Review Controller → Review Model: creates review
- Payment Routes → Cashfree: creates payment link
- Order Controller → User Model: reads
- Order Controller → Cart Model: reads/clears
- Order Controller → Order Model: creates/reads
- Order Controller → Product Model: updates stock
- Order Controller → Cashfree: checks payment
