# saurabhthakur-73/elitefullstack architecture

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

- Interactive diagram: https://gitdiagram.com/saurabhthakur-73/elitefullstack
- Repository: https://github.com/saurabhthakur-73/elitefullstack

## Overview

EliteFinish is a painter-hiring marketplace: users register or log in, browse painters, and create and track bookings. The backend also supports painter profiles, product listings, reviews, admin operations, password recovery, and Razorpay payments. The README describes AI scan/BOQ as a future, separate microservice, so it is not shown as implemented. Some frontend pages and backend controllers were not sampled; their paths and capabilities are supported by the tree and README, but uncertain internal wiring is omitted.

Main entry points: [`backend/server.js`](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/server.js) (Express API), [`frontend/src/App.jsx`](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/App.jsx) (React app), [`frontend/src/api/axios.js`](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/api/axios.js) (HTTP client), [`backend/controllers/adminController.js`](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/adminController.js) (Admin controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web app"]
  node_webapp["React app<br/>[App.jsx]"]
  node_authcontext["Auth context<br/>[AuthContext.jsx]"]
  node_authpages["Login and signup<br/>[Login.jsx]"]
  node_browsepages["Browse painters<br/>[Painters.jsx]"]
  node_bookingpages["Booking views<br/>[BookingForm.jsx]"]
  node_catalogpages["Product views<br/>[Products.jsx]"]
  node_painterpages["Painter tools"]
  node_adminpage["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_apiclient["HTTP client<br/>[axios.js]"]
end

subgraph group_api["API and auth"]
  node_server["Express API<br/>[server.js]"]
  node_authroutes["Auth routes<br/>[authRoutes.js]"]
  node_authcontroller["Auth controller<br/>[authController.js]"]
  node_bookingroutes["Booking routes<br/>[bookingRoutes.js]"]
  node_user[("User records<br/>[User.js]")]
  node_db["MongoDB connection<br/>[db.js]"]
end

subgraph group_marketplace["Marketplace"]
  node_bookingcontroller["Booking controller"]
  node_paintercontroller["Painter controller"]
  node_productcontroller["Product controller"]
  node_reviewroutes["Review routes<br/>[reviewRoutes.js]"]
  node_reviewcontroller["Review controller"]
  node_booking[("Booking records<br/>[Booking.js]")]
  node_painter[("Painter records<br/>[Painter.js]")]
  node_product[("Product records<br/>[Product.js]")]
  node_review[("Review records<br/>[Review.js]")]
end

subgraph group_operations["Platform operations"]
  node_adminroutes["Admin routes<br/>[adminRoutes.js]"]
  node_admincontroller["Admin controller<br/>[adminController.js]"]
end

subgraph group_integrations["External services"]
  node_paymentroutes["Payment routes<br/>[paymentRoutes.js]"]
  node_paymentcontroller["Payment controller"]
  node_sendemail["Email sender<br/>[sendEmail.js]"]
end

node_customer(("Customer or painter"))
node_mongo[("MongoDB")]
node_razorpay["Razorpay"]
node_email["Email service"]

node_customer -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_authpages
node_webapp -->|"routes to"| node_browsepages
node_webapp -->|"routes to"| node_bookingpages
node_webapp -->|"routes to"| node_catalogpages
node_webapp -->|"routes to"| node_painterpages
node_webapp -->|"routes to"| node_adminpage
node_webapp -->|"provides auth"| node_authcontext
node_authpages -->|"requests"| node_apiclient
node_browsepages -->|"requests"| node_apiclient
node_bookingpages -->|"requests"| node_apiclient
node_catalogpages -->|"requests"| node_apiclient
node_painterpages -->|"requests"| node_apiclient
node_adminpage -->|"requests"| node_apiclient
node_apiclient -->|"calls API"| node_server
node_server -->|"dispatches"| node_authroutes
node_server -->|"dispatches"| node_bookingroutes
node_server -->|"dispatches"| node_reviewroutes
node_server -->|"dispatches"| node_adminroutes
node_server -->|"dispatches"| node_paymentroutes
node_server -->|"dispatches"| node_paintercontroller
node_server -->|"dispatches"| node_productcontroller
node_authroutes -->|"dispatches"| node_authcontroller
node_bookingroutes -->|"dispatches"| node_bookingcontroller
node_reviewroutes -->|"dispatches"| node_reviewcontroller
node_adminroutes -->|"dispatches"| node_admincontroller
node_paymentroutes -->|"dispatches"| node_paymentcontroller
node_authcontroller -->|"reads and writes"| node_user
node_authcontroller -->|"sends reset email"| node_sendemail
node_sendemail -->|"sends via"| node_email
node_bookingcontroller -->|"reads and writes"| node_booking
node_bookingcontroller -->|"reads"| node_painter
node_paintercontroller -->|"reads and writes"| node_painter
node_productcontroller -->|"reads and writes"| node_product
node_reviewcontroller -->|"reads and updates"| node_booking
node_reviewcontroller -->|"reads and writes"| node_review
node_reviewcontroller -->|"updates rating"| node_painter
node_admincontroller -->|"reads and updates"| node_painter
node_admincontroller -->|"reads and deletes"| node_product
node_admincontroller -->|"reads"| node_booking
node_admincontroller -->|"counts"| node_user
node_paymentcontroller -->|"reads and updates"| node_booking
node_paymentcontroller -->|"creates order"| node_razorpay
node_server -->|"connects"| node_db
node_db -->|"opens connection"| node_mongo

click node_webapp "https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/App.jsx"
click node_authcontext "https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/context/AuthContext.jsx"
click node_authpages "https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/Login.jsx"
click node_browsepages "https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/Painters.jsx"
click node_bookingpages "https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/BookingForm.jsx"
click node_catalogpages "https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/Products.jsx"
click node_painterpages "https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/PainterDashboard.jsx"
click node_adminpage "https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_apiclient "https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/api/axios.js"
click node_server "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/server.js"
click node_authroutes "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/authRoutes.js"
click node_authcontroller "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/authController.js"
click node_bookingroutes "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/bookingRoutes.js"
click node_bookingcontroller "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/bookingController.js"
click node_paintercontroller "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/painterController.js"
click node_productcontroller "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/productController.js"
click node_reviewroutes "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/reviewRoutes.js"
click node_reviewcontroller "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/reviewController.js"
click node_adminroutes "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/adminRoutes.js"
click node_admincontroller "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/adminController.js"
click node_paymentroutes "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/paymentRoutes.js"
click node_paymentcontroller "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/paymentController.js"
click node_user "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/User.js"
click node_booking "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/Booking.js"
click node_painter "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/Painter.js"
click node_product "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/Product.js"
click node_review "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/Review.js"
click node_db "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/config/db.js"
click node_sendemail "https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/utils/sendEmail.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_authcontext,node_authpages,node_browsepages,node_bookingpages,node_catalogpages,node_painterpages,node_adminpage,node_apiclient toneBlue
class node_server,node_authroutes,node_authcontroller,node_bookingroutes,node_user,node_db,node_mongo toneAmber
class node_bookingcontroller,node_paintercontroller,node_productcontroller,node_reviewroutes,node_reviewcontroller,node_booking,node_painter,node_product,node_review toneMint
class node_adminroutes,node_admincontroller toneRose
class node_paymentroutes,node_paymentcontroller,node_sendemail,node_customer,node_razorpay,node_email toneIndigo
```

## Components

### Web app

- [React app](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Auth context](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/context/AuthContext.jsx): `frontend/src/context/AuthContext.jsx`
- [Login and signup](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Browse painters](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/Painters.jsx): `frontend/src/pages/Painters.jsx`
- [Booking views](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/BookingForm.jsx): `frontend/src/pages/BookingForm.jsx`
- [Product views](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/Products.jsx): `frontend/src/pages/Products.jsx`
- [Painter tools](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/PainterDashboard.jsx): `frontend/src/pages/PainterDashboard.jsx`
- [Admin dashboard](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [HTTP client](https://github.com/saurabhthakur-73/elitefullstack/blob/main/frontend/src/api/axios.js): `frontend/src/api/axios.js`

### API and auth

- [Express API](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/server.js): `backend/server.js`
- [Auth routes](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/authRoutes.js): `backend/routes/authRoutes.js`
- [Auth controller](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/authController.js): `backend/controllers/authController.js`
- [Booking routes](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/bookingRoutes.js): `backend/routes/bookingRoutes.js`
- [User records](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/User.js): `backend/models/User.js`
- [MongoDB connection](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/config/db.js): `backend/config/db.js`

### Marketplace

- [Booking controller](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/bookingController.js): `backend/controllers/bookingController.js`
- [Painter controller](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/painterController.js): `backend/controllers/painterController.js`
- [Product controller](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/productController.js): `backend/controllers/productController.js`
- [Review routes](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/reviewRoutes.js): `backend/routes/reviewRoutes.js`
- [Review controller](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/reviewController.js): `backend/controllers/reviewController.js`
- [Booking records](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/Booking.js): `backend/models/Booking.js`
- [Painter records](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/Painter.js): `backend/models/Painter.js`
- [Product records](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/Product.js): `backend/models/Product.js`
- [Review records](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/models/Review.js): `backend/models/Review.js`

### Platform operations

- [Admin routes](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/adminRoutes.js): `backend/routes/adminRoutes.js`
- [Admin controller](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/adminController.js): `backend/controllers/adminController.js`

### External services

- [Payment routes](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/routes/paymentRoutes.js): `backend/routes/paymentRoutes.js`
- [Payment controller](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/controllers/paymentController.js): `backend/controllers/paymentController.js`
- [Email sender](https://github.com/saurabhthakur-73/elitefullstack/blob/main/backend/utils/sendEmail.js): `backend/utils/sendEmail.js`

### Other components

- **Customer or painter**
- **MongoDB**
- **Razorpay**
- **Email service**

## Connections

- Customer or painter → React app: uses
- React app → Login and signup: routes to
- React app → Browse painters: routes to
- React app → Booking views: routes to
- React app → Product views: routes to
- React app → Painter tools: routes to
- React app → Admin dashboard: routes to
- React app → Auth context: provides auth
- Login and signup → HTTP client: requests
- Browse painters → HTTP client: requests
- Booking views → HTTP client: requests
- Product views → HTTP client: requests
- Painter tools → HTTP client: requests
- Admin dashboard → HTTP client: requests
- HTTP client → Express API: calls API
- Express API → Auth routes: dispatches
- Express API → Booking routes: dispatches
- Express API → Review routes: dispatches
- Express API → Admin routes: dispatches
- Express API → Payment routes: dispatches
- Express API → Painter controller: dispatches
- Express API → Product controller: dispatches
- Auth routes → Auth controller: dispatches
- Booking routes → Booking controller: dispatches
- Review routes → Review controller: dispatches
- Admin routes → Admin controller: dispatches
- Payment routes → Payment controller: dispatches
- Auth controller → User records: reads and writes
- Auth controller → Email sender: sends reset email
- Email sender → Email service: sends via
- Booking controller → Booking records: reads and writes
- Booking controller → Painter records: reads
- Painter controller → Painter records: reads and writes
- Product controller → Product records: reads and writes
- Review controller → Booking records: reads and updates
- Review controller → Review records: reads and writes
- Review controller → Painter records: updates rating
- Admin controller → Painter records: reads and updates
- Admin controller → Product records: reads and deletes
- Admin controller → Booking records: reads
- Admin controller → User records: counts
- Payment controller → Booking records: reads and updates
- Payment controller → Razorpay: creates order
- Express API → MongoDB connection: connects
- MongoDB connection → MongoDB: opens connection
