# piyushraj2340/plant-selling-website architecture

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

- Interactive diagram: https://gitdiagram.com/piyushraj2340/plant-selling-website
- Repository: https://github.com/piyushraj2340/plant-selling-website

## Overview

Plant Seller is a full-stack, multi-vendor plant marketplace for customers, nurseries, and administrators. The main customer journey is browsing plants, managing a cart, checking out and tracking orders; nurseries manage inventory, storefronts, and fulfillment, while administrators oversee users, listings, orders, coupons, and analytics. The frontend routes users through React pages and the Express API dispatches requests to domain controllers and MongoDB models. README-documented integrations are shown; unsampled frontend/API wiring is not inferred beyond those documented capabilities.

Main entry points: [`backend/index.js`](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/index.js) (Express API), [`frontend/src/App.js`](https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/App.js) (React App), [`backend/src/controllers/checkoutController/cartController.js`](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/checkoutController/cartController.js) (Cart Operations), [`backend/src/controllers/nurseryController/nurseryController.js`](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/nurseryController/nurseryController.js) (Nursery Management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Customer Experience"]
  node_webapp["React App<br/>[App.js]"]
  node_routing["Page Routing<br/>[Routing.jsx]"]
  node_catalog_ui["Plant Browsing<br/>[Products.js]"]
  node_cart_ui["Cart<br/>[Cart.js]"]
  node_checkout_ui["Checkout<br/>[Checkout.js]"]
  node_orders_ui["Order History<br/>[Order.js]"]
end

subgraph group_commerce["Commerce Backend"]
  node_api["Express API<br/>[index.js]"]
  node_auth["Authentication<br/>[authController.js]"]
  node_products["Product Catalog"]
  node_cart["Cart Operations<br/>[cartController.js]"]
  node_orders["Order Processing<br/>[orderController.js]"]
  node_payment["Payment"]
  node_commerce_models[("Commerce Records<br/>[orders.js]")]
end

subgraph group_vendor["Nursery Platform"]
  node_plant_model[("Plant Listings<br/>[plants.js]")]
  node_nursery["Nursery Management"]
  node_storefront["Storefront Editing"]
end

subgraph group_operations["Platform Operations"]
  node_admin["Admin Operations<br/>[adminController.js]"]
  node_users["User Profiles<br/>[userController.js]"]
  node_user_model[("User Records<br/>[user.js]")]
end

node_customer(("Customer"))
node_mongo[("MongoDB")]
node_stripe["Stripe"]
node_cloudinary["Cloudinary"]

node_customer -->|"uses"| node_webapp
node_webapp -->|"renders"| node_routing
node_routing -->|"routes to"| node_catalog_ui
node_customer -->|"browses plants"| node_catalog_ui
node_customer -->|"manages cart"| node_cart_ui
node_customer -->|"checks out"| node_checkout_ui
node_customer -->|"tracks orders"| node_orders_ui
node_webapp -->|"calls REST API"| node_api
node_api -->|"routes requests"| node_auth
node_api -->|"routes requests"| node_products
node_api -->|"routes requests"| node_cart
node_api -->|"routes requests"| node_orders
node_api -->|"routes requests"| node_payment
node_api -->|"routes requests"| node_nursery
node_api -->|"routes requests"| node_storefront
node_api -->|"routes requests"| node_admin
node_api -->|"routes requests"| node_users
node_auth -->|"reads and writes"| node_user_model
node_users -->|"reads and writes"| node_user_model
node_products -->|"reads listings"| node_plant_model
node_cart -->|"updates cart records"| node_commerce_models
node_cart -->|"reads plant prices"| node_plant_model
node_orders -->|"creates orders"| node_commerce_models
node_nursery -->|"manages listings"| node_plant_model
node_storefront -.->|"stores layouts"| node_mongo
node_admin -.->|"manages marketplace data"| node_mongo
node_payment -.->|"processes payments"| node_stripe
node_nursery -.->|"uploads images"| node_cloudinary

click node_webapp "https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/App.js"
click node_routing "https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/Routing/Routing.jsx"
click node_catalog_ui "https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/features/products/Components/Products.js"
click node_cart_ui "https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/features/cart/Components/Cart.js"
click node_checkout_ui "https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/features/checkout/Components/Checkout.js"
click node_orders_ui "https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/features/order/Components/Order.js"
click node_api "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/index.js"
click node_auth "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/authController.js"
click node_products "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/productsController.js"
click node_cart "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/checkoutController/cartController.js"
click node_orders "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/checkoutController/orderController.js"
click node_payment "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/checkoutController/paymentController.js"
click node_commerce_models "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/model/checkoutModel/orders.js"
click node_plant_model "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/model/nurseryModel/plants.js"
click node_nursery "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/nurseryController/nurseryController.js"
click node_storefront "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/nurseryController/nurseryStoreController.js"
click node_admin "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/adminController.js"
click node_users "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/userController/userController.js"
click node_user_model "https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/model/userModel/user.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_routing,node_catalog_ui,node_cart_ui,node_checkout_ui,node_orders_ui toneBlue
class node_api,node_auth,node_products,node_cart,node_orders,node_payment,node_commerce_models,node_mongo toneAmber
class node_plant_model,node_nursery,node_storefront toneMint
class node_admin,node_users,node_user_model toneRose
class node_customer,node_stripe,node_cloudinary toneIndigo
```

## Components

### Customer Experience

- [React App](https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/App.js): `frontend/src/App.js`
- [Page Routing](https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/Routing/Routing.jsx): `frontend/src/Routing/Routing.jsx`
- [Plant Browsing](https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/features/products/Components/Products.js): `frontend/src/features/products/Components/Products.js`
- [Cart](https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/features/cart/Components/Cart.js): `frontend/src/features/cart/Components/Cart.js`
- [Checkout](https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/features/checkout/Components/Checkout.js): `frontend/src/features/checkout/Components/Checkout.js`
- [Order History](https://github.com/piyushraj2340/plant-selling-website/blob/master/frontend/src/features/order/Components/Order.js): `frontend/src/features/order/Components/Order.js`

### Commerce Backend

- [Express API](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/index.js): `backend/index.js`
- [Authentication](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/authController.js): `backend/src/controllers/authController.js`
- [Product Catalog](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/productsController.js): `backend/src/controllers/productsController.js`
- [Cart Operations](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/checkoutController/cartController.js): `backend/src/controllers/checkoutController/cartController.js`
- [Order Processing](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/checkoutController/orderController.js): `backend/src/controllers/checkoutController/orderController.js`
- [Payment](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/checkoutController/paymentController.js): `backend/src/controllers/checkoutController/paymentController.js`
- [Commerce Records](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/model/checkoutModel/orders.js): `backend/src/model/checkoutModel/orders.js`

### Nursery Platform

- [Plant Listings](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/model/nurseryModel/plants.js): `backend/src/model/nurseryModel/plants.js`
- [Nursery Management](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/nurseryController/nurseryController.js): `backend/src/controllers/nurseryController/nurseryController.js`
- [Storefront Editing](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/nurseryController/nurseryStoreController.js): `backend/src/controllers/nurseryController/nurseryStoreController.js`

### Platform Operations

- [Admin Operations](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/adminController.js): `backend/src/controllers/adminController.js`
- [User Profiles](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/controllers/userController/userController.js): `backend/src/controllers/userController/userController.js`
- [User Records](https://github.com/piyushraj2340/plant-selling-website/blob/master/backend/src/model/userModel/user.js): `backend/src/model/userModel/user.js`

### Other components

- **Customer**
- **MongoDB**
- **Stripe**
- **Cloudinary**

## Connections

- Customer → React App: uses (evidence: `README.md`)
- React App → Page Routing: renders (evidence: `frontend/src/App.js`)
- Page Routing → Plant Browsing: routes to (evidence: `frontend/src/Routing/Routing.jsx`)
- Customer → Plant Browsing: browses plants (evidence: `README.md`)
- Customer → Cart: manages cart (evidence: `README.md`)
- Customer → Checkout: checks out (evidence: `README.md`)
- Customer → Order History: tracks orders (evidence: `README.md`)
- React App → Express API: calls REST API (evidence: `README.md`)
- Express API → Authentication: routes requests (evidence: `backend/index.js`)
- Express API → Product Catalog: routes requests (evidence: `backend/index.js`)
- Express API → Cart Operations: routes requests (evidence: `backend/index.js`)
- Express API → Order Processing: routes requests (evidence: `backend/index.js`)
- Express API → Payment: routes requests (evidence: `backend/index.js`)
- Express API → Nursery Management: routes requests (evidence: `backend/index.js`)
- Express API → Storefront Editing: routes requests (evidence: `backend/index.js`)
- Express API → Admin Operations: routes requests (evidence: `backend/index.js`)
- Express API → User Profiles: routes requests (evidence: `backend/index.js`)
- Authentication → User Records: reads and writes (evidence: `backend/src/controllers/authController.js`)
- User Profiles → User Records: reads and writes (evidence: `backend/src/controllers/userController/userController.js`)
- Product Catalog → Plant Listings: reads listings (evidence: `backend/src/controllers/productsController.js`)
- Cart Operations → Commerce Records: updates cart records (evidence: `backend/src/controllers/checkoutController/cartController.js`)
- Cart Operations → Plant Listings: reads plant prices (evidence: `backend/src/controllers/checkoutController/cartController.js`)
- Order Processing → Commerce Records: creates orders (evidence: `backend/src/controllers/checkoutController/orderController.js`)
- Nursery Management → Plant Listings: manages listings (evidence: `backend/src/controllers/nurseryController/nurseryController.js`)
- Storefront Editing → MongoDB: stores layouts
- Admin Operations → MongoDB: manages marketplace data
- Payment → Stripe: processes payments (evidence: `README.md`)
- Nursery Management → Cloudinary: uploads images (evidence: `README.md`)
