# dheetchithselvan12/rent-ease architecture

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

- Interactive diagram: https://gitdiagram.com/dheetchithselvan12/rent-ease
- Repository: https://github.com/dheetchithselvan12/rent-ease

## Overview

This is a rental-commerce application: customers browse rentable products, manage a cart, check out, and track orders or subscriptions; administrators manage the product catalog. The client is a routed React/Redux application backed by an Express API, with MongoDB models and Cloudinary image uploads. The graph includes documented/import-index relationships and excerpted calls; client-to-API links are dashed because the sampled excerpts do not show the request wiring.

Main entry points: [`client/src/App.jsx`](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/App.jsx) (Route Application), [`client/src/app/store.js`](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/app/store.js) (Redux Store), [`server/app.js`](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/app.js) (Express API), [`client/src/pages/ProductDetailes.jsx`](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/ProductDetailes.jsx) (Product Details)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Customer and Admin Client"]
  node_app["Route Application<br/>[App.jsx]"]
  node_catalog["Catalog Browsing<br/>[AllProducts.jsx]"]
  node_product_detail["Product Details"]
  node_cart_page["Cart<br/>[Cart.jsx]"]
  node_checkout_page["Checkout<br/>[Checkout.jsx]"]
  node_account["Account and Orders<br/>[MyOrders.jsx]"]
  node_dashboard["User Dashboard<br/>[UserDashboard.jsx]"]
  node_admin_products["Product Admin<br/>[Products.jsx]"]
  node_product_card["Product Card<br/>[ProductCard.jsx]"]
end

subgraph group_state["Client State and Features"]
  node_redux_store["Redux Store<br/>[store.js]"]
  node_auth_state["Authentication State<br/>[authSlice.jsx]"]
  node_cart_state["Cart State<br/>[cartSlice.js]"]
  node_checkout_state["Checkout State<br/>[checkoutSlice.js]"]
  node_product_state["Product State and API<br/>[productsSlice.js]"]
  node_order_state["Order State<br/>[orderSlice.js]"]
end

subgraph group_api["API and Domain Logic"]
  node_api_app["Express API<br/>[app.js]"]
  node_auth_routes["Authentication Routes<br/>[authRoutes.js]"]
  node_product_routes["Product Routes<br/>[productRoutes.js]"]
  node_order_routes["Order Routes<br/>[orderRoutes.js]"]
  node_user_routes["User Routes<br/>[userRoutes.js]"]
  node_auth_controller["Authentication Logic<br/>[authController.js]"]
  node_product_controller["Product Logic"]
  node_order_controller["Order Logic<br/>[orderController.js]"]
  node_user_controller["User Profile Logic<br/>[userController.js]"]
  node_token["Token Utility"]
  node_image_upload["Image Upload Adapter"]
end

subgraph group_storage["Persistence and Integrations"]
  node_user_model[("User Records<br/>[userModel.js]")]
  node_product_model[("Product Records<br/>[Product.js]")]
  node_order_model[("Order Records<br/>[Order.js]")]
end

node_shopper(("Shopper"))
node_cloudinary[("Cloudinary")]
node_database[("MongoDB")]

node_shopper -->|"uses"| node_app
node_app -->|"routes to"| node_catalog
node_app -->|"routes to"| node_product_detail
node_app -->|"routes to"| node_cart_page
node_app -->|"routes to"| node_checkout_page
node_app -->|"routes to"| node_account
node_app -->|"routes to"| node_dashboard
node_app -->|"routes to"| node_admin_products
node_catalog -->|"uses"| node_product_state
node_catalog -->|"renders"| node_product_card
node_product_detail -->|"renders"| node_product_card
node_product_detail -->|"updates"| node_cart_state
node_product_detail -->|"updates"| node_checkout_state
node_admin_products -->|"uses"| node_product_state
node_redux_store -->|"registers"| node_auth_state
node_redux_store -->|"registers"| node_cart_state
node_redux_store -->|"registers"| node_checkout_state
node_redux_store -->|"registers"| node_order_state
node_redux_store -->|"registers"| node_product_state
node_dashboard -->|"uses"| node_order_state
node_product_state -.->|"requests products"| node_product_routes
node_order_state -.->|"requests orders"| node_order_routes
node_api_app -->|"mounts"| node_auth_routes
node_api_app -->|"mounts"| node_product_routes
node_api_app -->|"mounts"| node_order_routes
node_api_app -->|"mounts"| node_user_routes
node_auth_routes -->|"dispatches"| node_auth_controller
node_product_routes -->|"dispatches"| node_product_controller
node_order_routes -->|"dispatches"| node_order_controller
node_user_routes -->|"dispatches"| node_user_controller
node_auth_controller -->|"reads and writes"| node_user_model
node_auth_controller -->|"generates token"| node_token
node_product_controller -->|"reads and writes"| node_product_model
node_product_controller -->|"uploads images"| node_image_upload
node_order_controller -->|"reads and writes"| node_order_model
node_user_controller -->|"updates"| node_user_model
node_image_upload -->|"stores images"| node_cloudinary
node_user_model -.->|"persists in"| node_database
node_product_model -.->|"persists in"| node_database
node_order_model -.->|"persists in"| node_database
node_checkout_page -.->|"submits through"| node_order_state

click node_app "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/App.jsx"
click node_catalog "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/AllProducts.jsx"
click node_product_detail "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/ProductDetailes.jsx"
click node_cart_page "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/Cart.jsx"
click node_checkout_page "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/Checkout.jsx"
click node_account "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/UserAccount-pages/MyOrders.jsx"
click node_dashboard "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/UserAccount-pages/UserDashboard.jsx"
click node_admin_products "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/admin/Products.jsx"
click node_product_card "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/components/product/ProductCard.jsx"
click node_redux_store "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/app/store.js"
click node_auth_state "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/auth/authSlice.jsx"
click node_cart_state "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/cart/cartSlice.js"
click node_checkout_state "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/checkout/checkoutSlice.js"
click node_product_state "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/products/productsSlice.js"
click node_order_state "https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/order/orderSlice.js"
click node_api_app "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/app.js"
click node_auth_routes "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/routes/authRoutes.js"
click node_product_routes "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/routes/productRoutes.js"
click node_order_routes "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/routes/orderRoutes.js"
click node_user_routes "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/routes/userRoutes.js"
click node_auth_controller "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/controllers/authController.js"
click node_product_controller "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/controllers/productController.js"
click node_order_controller "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/controllers/orderController.js"
click node_user_controller "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/controllers/userController.js"
click node_user_model "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/models/userModel.js"
click node_product_model "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/models/Product.js"
click node_order_model "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/models/Order.js"
click node_token "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/lib/generateTokenUtils.js"
click node_image_upload "https://github.com/dheetchithselvan12/rent-ease/blob/main/server/utils/cloudinaryUpload.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,node_product_detail,node_cart_page,node_checkout_page,node_account,node_dashboard,node_admin_products,node_product_card toneBlue
class node_redux_store,node_auth_state,node_cart_state,node_checkout_state,node_product_state,node_order_state,node_cloudinary,node_database toneAmber
class node_api_app,node_auth_routes,node_product_routes,node_order_routes,node_user_routes,node_auth_controller,node_product_controller,node_order_controller,node_user_controller,node_token,node_image_upload toneMint
class node_user_model,node_product_model,node_order_model toneRose
class node_shopper toneIndigo
```

## Components

### Customer and Admin Client

- [Route Application](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Catalog Browsing](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/AllProducts.jsx): `client/src/pages/AllProducts.jsx`
- [Product Details](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/ProductDetailes.jsx): `client/src/pages/ProductDetailes.jsx`
- [Cart](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/Cart.jsx): `client/src/pages/Cart.jsx`
- [Checkout](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/Checkout.jsx): `client/src/pages/Checkout.jsx`
- [Account and Orders](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/UserAccount-pages/MyOrders.jsx): `client/src/pages/UserAccount-pages/MyOrders.jsx`
- [User Dashboard](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/pages/UserAccount-pages/UserDashboard.jsx): `client/src/pages/UserAccount-pages/UserDashboard.jsx`
- [Product Admin](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/admin/Products.jsx): `client/src/admin/Products.jsx`
- [Product Card](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/components/product/ProductCard.jsx): `client/src/components/product/ProductCard.jsx`

### Client State and Features

- [Redux Store](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/app/store.js): `client/src/app/store.js`
- [Authentication State](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/auth/authSlice.jsx): `client/src/features/auth/authSlice.jsx`
- [Cart State](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/cart/cartSlice.js): `client/src/features/cart/cartSlice.js`
- [Checkout State](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/checkout/checkoutSlice.js): `client/src/features/checkout/checkoutSlice.js`
- [Product State and API](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/products/productsSlice.js): `client/src/features/products/productsSlice.js`
- [Order State](https://github.com/dheetchithselvan12/rent-ease/blob/main/client/src/features/order/orderSlice.js): `client/src/features/order/orderSlice.js`

### API and Domain Logic

- [Express API](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/app.js): `server/app.js`
- [Authentication Routes](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/routes/authRoutes.js): `server/routes/authRoutes.js`
- [Product Routes](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/routes/productRoutes.js): `server/routes/productRoutes.js`
- [Order Routes](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/routes/orderRoutes.js): `server/routes/orderRoutes.js`
- [User Routes](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/routes/userRoutes.js): `server/routes/userRoutes.js`
- [Authentication Logic](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/controllers/authController.js): `server/controllers/authController.js`
- [Product Logic](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/controllers/productController.js): `server/controllers/productController.js`
- [Order Logic](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/controllers/orderController.js): `server/controllers/orderController.js`
- [User Profile Logic](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/controllers/userController.js): `server/controllers/userController.js`
- [Token Utility](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/lib/generateTokenUtils.js): `server/lib/generateTokenUtils.js`
- [Image Upload Adapter](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/utils/cloudinaryUpload.js): `server/utils/cloudinaryUpload.js`

### Persistence and Integrations

- [User Records](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/models/userModel.js): `server/models/userModel.js`
- [Product Records](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/models/Product.js): `server/models/Product.js`
- [Order Records](https://github.com/dheetchithselvan12/rent-ease/blob/main/server/models/Order.js): `server/models/Order.js`

### Other components

- **Shopper**
- **Cloudinary**
- **MongoDB**

## Connections

- Shopper → Route Application: uses
- Route Application → Catalog Browsing: routes to (evidence: `client/src/App.jsx`)
- Route Application → Product Details: routes to (evidence: `client/src/App.jsx`)
- Route Application → Cart: routes to (evidence: `client/src/App.jsx`)
- Route Application → Checkout: routes to (evidence: `client/src/App.jsx`)
- Route Application → Account and Orders: routes to (evidence: `client/src/App.jsx`)
- Route Application → User Dashboard: routes to (evidence: `client/src/App.jsx`)
- Route Application → Product Admin: routes to (evidence: `client/src/App.jsx`)
- Catalog Browsing → Product State and API: uses (evidence: `client/src/pages/AllProducts.jsx`)
- Catalog Browsing → Product Card: renders (evidence: `client/src/pages/AllProducts.jsx`)
- Product Details → Product Card: renders (evidence: `client/src/pages/ProductDetailes.jsx`)
- Product Details → Cart State: updates (evidence: `client/src/pages/ProductDetailes.jsx`)
- Product Details → Checkout State: updates (evidence: `client/src/pages/ProductDetailes.jsx`)
- Product Admin → Product State and API: uses (evidence: `client/src/admin/Products.jsx`)
- Redux Store → Authentication State: registers (evidence: `client/src/app/store.js`)
- Redux Store → Cart State: registers (evidence: `client/src/app/store.js`)
- Redux Store → Checkout State: registers (evidence: `client/src/app/store.js`)
- Redux Store → Order State: registers (evidence: `client/src/app/store.js`)
- Redux Store → Product State and API: registers (evidence: `client/src/app/store.js`)
- User Dashboard → Order State: uses (evidence: `client/src/pages/UserAccount-pages/UserDashboard.jsx`)
- Product State and API → Product Routes: requests products
- Order State → Order Routes: requests orders
- Express API → Authentication Routes: mounts (evidence: `server/app.js`)
- Express API → Product Routes: mounts (evidence: `server/app.js`)
- Express API → Order Routes: mounts (evidence: `server/app.js`)
- Express API → User Routes: mounts (evidence: `server/app.js`)
- Authentication Routes → Authentication Logic: dispatches (evidence: `server/routes/authRoutes.js`)
- Product Routes → Product Logic: dispatches (evidence: `server/routes/productRoutes.js`)
- Order Routes → Order Logic: dispatches (evidence: `server/routes/orderRoutes.js`)
- User Routes → User Profile Logic: dispatches (evidence: `server/routes/userRoutes.js`)
- Authentication Logic → User Records: reads and writes (evidence: `server/controllers/authController.js`)
- Authentication Logic → Token Utility: generates token (evidence: `server/controllers/authController.js`)
- Product Logic → Product Records: reads and writes (evidence: `server/controllers/productController.js`)
- Product Logic → Image Upload Adapter: uploads images (evidence: `server/controllers/productController.js`)
- Order Logic → Order Records: reads and writes (evidence: `server/controllers/orderController.js`)
- User Profile Logic → User Records: updates (evidence: `server/controllers/userController.js`)
- Image Upload Adapter → Cloudinary: stores images (evidence: `server/utils/cloudinaryUpload.js`)
- User Records → MongoDB: persists in
- Product Records → MongoDB: persists in
- Order Records → MongoDB: persists in
- Checkout → Order State: submits through
