# ravimahto69/carwash architecture

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

- Interactive diagram: https://gitdiagram.com/ravimahto69/carwash
- Repository: https://github.com/ravimahto69/carwash

## Overview

WashHub is a car-wash booking and management platform. Its main customer journey is to discover services and locations, create a booking, pay, track booking status, and leave a review; administrators manage bookings, services, stores, payments, and reviews. The map groups the app-facing components, API domains, persistence layer, and Razorpay integration. README capabilities inform the workflow; dashed edges mark client/API or gateway connections not shown in the sampled source.

Main entry points: [`src/app/lib/db.js`](https://github.com/ravimahto69/carwash/blob/master/src/app/lib/db.js) (MongoDB Connection), [`src/app/api/payment/verify/route.js`](https://github.com/ravimahto69/carwash/blob/master/src/app/api/payment/verify/route.js) (Payment Operations), [`src/app/api/reviews/route.js`](https://github.com/ravimahto69/carwash/blob/master/src/app/api/reviews/route.js) (Review Operations), [`src/app/api/admin/bookings/route.js`](https://github.com/ravimahto69/carwash/blob/master/src/app/api/admin/bookings/route.js) (Admin Bookings)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Customer and Admin Experience"]
  node_service_ui["Service Browsing<br/>[Services.jsx]"]
  node_booking_ui["Booking<br/>[Book.jsx]"]
  node_payment_ui["Payment<br/>[Payment.jsx]"]
  node_confirmation_ui["Booking Status"]
  node_review_ui["Reviews<br/>[ReviewSection.jsx]"]
  node_user_profile["User Profile<br/>[UserProfile.jsx]"]
  node_admin_ui["Admin Dashboard<br/>[Admin.jsx]"]
  node_store_ui["Nearby Stores<br/>[NearbyStores.jsx]"]
end

subgraph group_api["Application API"]
  node_auth_api["Authentication<br/>[route.js]"]
  node_service_api["Service Management<br/>[route.js]"]
  node_booking_api["Booking Management<br/>[route.js]"]
  node_payment_api["Payment Operations<br/>[route.js]"]
  node_review_api["Review Operations<br/>[route.js]"]
  node_store_api["Store Discovery<br/>[route.js]"]
  node_admin_api["Admin Bookings<br/>[route.js]"]
  node_profile_api["User Account APIs<br/>[route.js]"]
end

subgraph group_data["Persistence"]
  node_db_connection["MongoDB Connection<br/>[db.js]"]
  node_user_model[("User Records<br/>[User.js]")]
  node_booking_model[("Booking Records<br/>[Booking.js]")]
  node_payment_model[("Payment Records<br/>[Payment.js]")]
  node_service_model[("Service Records<br/>[Service.js]")]
  node_review_model[("Review Records<br/>[Review.js]")]
  node_store_model[("Store Records<br/>[Store.js]")]
  node_contact_model[("Contact Records<br/>[Contact.js]")]
end

subgraph group_integrations["External Integrations"]
  node_razorpay["Razorpay"]
end

node_customer(("Customer"))
node_admin(("Admin"))

node_customer -->|"browses"| node_service_ui
node_customer -->|"books service"| node_booking_ui
node_customer -->|"pays securely"| node_payment_ui
node_customer -->|"tracks booking"| node_confirmation_ui
node_customer -->|"leaves review"| node_review_ui
node_customer -->|"finds locations"| node_store_ui
node_admin -->|"manages operations"| node_admin_ui
node_service_ui -.->|"requests services"| node_service_api
node_booking_ui -.->|"submits booking"| node_booking_api
node_payment_ui -.->|"starts payment"| node_payment_api
node_confirmation_ui -.->|"checks status"| node_booking_api
node_review_ui -.->|"submits reviews"| node_review_api
node_store_ui -.->|"searches stores"| node_store_api
node_user_profile -.->|"updates account"| node_profile_api
node_admin_ui -.->|"manages bookings"| node_admin_api
node_auth_api -->|"connects"| node_db_connection
node_auth_api -->|"creates user"| node_user_model
node_service_api -->|"connects"| node_db_connection
node_service_api -->|"reads and writes"| node_service_model
node_booking_api -->|"connects"| node_db_connection
node_booking_api -->|"reads and writes"| node_booking_model
node_payment_api -->|"updates payment"| node_payment_model
node_payment_api -->|"updates booking"| node_booking_model
node_payment_api -->|"connects"| node_db_connection
node_payment_api -.->|"verifies payment"| node_razorpay
node_review_api -->|"connects"| node_db_connection
node_review_api -->|"reads and writes"| node_review_model
node_review_api -->|"populates booking"| node_booking_model
node_store_api -->|"connects"| node_db_connection
node_store_api -->|"queries stores"| node_store_model
node_admin_api -->|"connects"| node_db_connection
node_admin_api -->|"manages bookings"| node_booking_model
node_admin_api -->|"reads payments"| node_payment_model
node_profile_api -->|"connects"| node_db_connection
node_profile_api -->|"updates profile"| node_user_model

click node_service_ui "https://github.com/ravimahto69/carwash/blob/master/src/app/component/Services.jsx"
click node_booking_ui "https://github.com/ravimahto69/carwash/blob/master/src/app/component/Book.jsx"
click node_payment_ui "https://github.com/ravimahto69/carwash/blob/master/src/app/component/Payment.jsx"
click node_confirmation_ui "https://github.com/ravimahto69/carwash/blob/master/src/app/component/BookingConfirmation.jsx"
click node_review_ui "https://github.com/ravimahto69/carwash/blob/master/src/app/component/ReviewSection.jsx"
click node_user_profile "https://github.com/ravimahto69/carwash/blob/master/src/app/component/UserProfile.jsx"
click node_admin_ui "https://github.com/ravimahto69/carwash/blob/master/src/app/component/Admin.jsx"
click node_store_ui "https://github.com/ravimahto69/carwash/blob/master/src/app/component/NearbyStores.jsx"
click node_auth_api "https://github.com/ravimahto69/carwash/blob/master/src/app/api/register/route.js"
click node_service_api "https://github.com/ravimahto69/carwash/blob/master/src/app/api/services/route.js"
click node_booking_api "https://github.com/ravimahto69/carwash/blob/master/src/app/api/booking/route.js"
click node_payment_api "https://github.com/ravimahto69/carwash/blob/master/src/app/api/payment/verify/route.js"
click node_review_api "https://github.com/ravimahto69/carwash/blob/master/src/app/api/reviews/route.js"
click node_store_api "https://github.com/ravimahto69/carwash/blob/master/src/app/api/stores/nearby/route.js"
click node_admin_api "https://github.com/ravimahto69/carwash/blob/master/src/app/api/admin/bookings/route.js"
click node_profile_api "https://github.com/ravimahto69/carwash/blob/master/src/app/api/user/profile/route.js"
click node_db_connection "https://github.com/ravimahto69/carwash/blob/master/src/app/lib/db.js"
click node_user_model "https://github.com/ravimahto69/carwash/blob/master/src/app/models/User.js"
click node_booking_model "https://github.com/ravimahto69/carwash/blob/master/src/app/models/Booking.js"
click node_payment_model "https://github.com/ravimahto69/carwash/blob/master/src/app/models/Payment.js"
click node_service_model "https://github.com/ravimahto69/carwash/blob/master/src/app/models/Service.js"
click node_review_model "https://github.com/ravimahto69/carwash/blob/master/src/app/models/Review.js"
click node_store_model "https://github.com/ravimahto69/carwash/blob/master/src/app/models/Store.js"
click node_contact_model "https://github.com/ravimahto69/carwash/blob/master/src/app/models/Contact.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_service_ui,node_booking_ui,node_payment_ui,node_confirmation_ui,node_review_ui,node_user_profile,node_admin_ui,node_store_ui toneBlue
class node_auth_api,node_service_api,node_booking_api,node_payment_api,node_review_api,node_store_api,node_admin_api,node_profile_api toneAmber
class node_db_connection,node_user_model,node_booking_model,node_payment_model,node_service_model,node_review_model,node_store_model,node_contact_model toneMint
class node_razorpay toneRose
class node_customer,node_admin toneIndigo
```

## Components

### Customer and Admin Experience

- [Service Browsing](https://github.com/ravimahto69/carwash/blob/master/src/app/component/Services.jsx): `src/app/component/Services.jsx`
- [Booking](https://github.com/ravimahto69/carwash/blob/master/src/app/component/Book.jsx): `src/app/component/Book.jsx`
- [Payment](https://github.com/ravimahto69/carwash/blob/master/src/app/component/Payment.jsx): `src/app/component/Payment.jsx`
- [Booking Status](https://github.com/ravimahto69/carwash/blob/master/src/app/component/BookingConfirmation.jsx): `src/app/component/BookingConfirmation.jsx`
- [Reviews](https://github.com/ravimahto69/carwash/blob/master/src/app/component/ReviewSection.jsx): `src/app/component/ReviewSection.jsx`
- [User Profile](https://github.com/ravimahto69/carwash/blob/master/src/app/component/UserProfile.jsx): `src/app/component/UserProfile.jsx`
- [Admin Dashboard](https://github.com/ravimahto69/carwash/blob/master/src/app/component/Admin.jsx): `src/app/component/Admin.jsx`
- [Nearby Stores](https://github.com/ravimahto69/carwash/blob/master/src/app/component/NearbyStores.jsx): `src/app/component/NearbyStores.jsx`

### Application API

- [Authentication](https://github.com/ravimahto69/carwash/blob/master/src/app/api/register/route.js): `src/app/api/register/route.js`
- [Service Management](https://github.com/ravimahto69/carwash/blob/master/src/app/api/services/route.js): `src/app/api/services/route.js`
- [Booking Management](https://github.com/ravimahto69/carwash/blob/master/src/app/api/booking/route.js): `src/app/api/booking/route.js`
- [Payment Operations](https://github.com/ravimahto69/carwash/blob/master/src/app/api/payment/verify/route.js): `src/app/api/payment/verify/route.js`
- [Review Operations](https://github.com/ravimahto69/carwash/blob/master/src/app/api/reviews/route.js): `src/app/api/reviews/route.js`
- [Store Discovery](https://github.com/ravimahto69/carwash/blob/master/src/app/api/stores/nearby/route.js): `src/app/api/stores/nearby/route.js`
- [Admin Bookings](https://github.com/ravimahto69/carwash/blob/master/src/app/api/admin/bookings/route.js): `src/app/api/admin/bookings/route.js`
- [User Account APIs](https://github.com/ravimahto69/carwash/blob/master/src/app/api/user/profile/route.js): `src/app/api/user/profile/route.js`

### Persistence

- [MongoDB Connection](https://github.com/ravimahto69/carwash/blob/master/src/app/lib/db.js): `src/app/lib/db.js`
- [User Records](https://github.com/ravimahto69/carwash/blob/master/src/app/models/User.js): `src/app/models/User.js`
- [Booking Records](https://github.com/ravimahto69/carwash/blob/master/src/app/models/Booking.js): `src/app/models/Booking.js`
- [Payment Records](https://github.com/ravimahto69/carwash/blob/master/src/app/models/Payment.js): `src/app/models/Payment.js`
- [Service Records](https://github.com/ravimahto69/carwash/blob/master/src/app/models/Service.js): `src/app/models/Service.js`
- [Review Records](https://github.com/ravimahto69/carwash/blob/master/src/app/models/Review.js): `src/app/models/Review.js`
- [Store Records](https://github.com/ravimahto69/carwash/blob/master/src/app/models/Store.js): `src/app/models/Store.js`
- [Contact Records](https://github.com/ravimahto69/carwash/blob/master/src/app/models/Contact.js): `src/app/models/Contact.js`

### External Integrations

- **Razorpay**

### Other components

- **Customer**
- **Admin**

## Connections

- Customer → Service Browsing: browses (evidence: `README.md`)
- Customer → Booking: books service (evidence: `README.md`)
- Customer → Payment: pays securely (evidence: `README.md`)
- Customer → Booking Status: tracks booking (evidence: `README.md`)
- Customer → Reviews: leaves review (evidence: `README.md`)
- Customer → Nearby Stores: finds locations (evidence: `README.md`)
- Admin → Admin Dashboard: manages operations (evidence: `README.md`)
- Service Browsing → Service Management: requests services
- Booking → Booking Management: submits booking
- Payment → Payment Operations: starts payment
- Booking Status → Booking Management: checks status
- Reviews → Review Operations: submits reviews
- Nearby Stores → Store Discovery: searches stores
- User Profile → User Account APIs: updates account
- Admin Dashboard → Admin Bookings: manages bookings
- Authentication → MongoDB Connection: connects (evidence: `src/app/api/register/route.js`)
- Authentication → User Records: creates user (evidence: `src/app/api/register/route.js`)
- Service Management → MongoDB Connection: connects (evidence: `src/app/api/services/route.js`)
- Service Management → Service Records: reads and writes (evidence: `src/app/api/services/route.js`)
- Booking Management → MongoDB Connection: connects (evidence: `src/app/api/booking/route.js`)
- Booking Management → Booking Records: reads and writes (evidence: `src/app/api/booking/route.js`)
- Payment Operations → Payment Records: updates payment (evidence: `src/app/api/payment/verify/route.js`)
- Payment Operations → Booking Records: updates booking (evidence: `src/app/api/payment/verify/route.js`)
- Payment Operations → MongoDB Connection: connects (evidence: `src/app/api/payment/verify/route.js`)
- Payment Operations → Razorpay: verifies payment
- Review Operations → MongoDB Connection: connects (evidence: `src/app/api/reviews/route.js`)
- Review Operations → Review Records: reads and writes (evidence: `src/app/api/reviews/route.js`)
- Review Operations → Booking Records: populates booking (evidence: `src/app/api/reviews/route.js`)
- Store Discovery → MongoDB Connection: connects (evidence: `src/app/api/stores/nearby/route.js`)
- Store Discovery → Store Records: queries stores (evidence: `src/app/api/stores/nearby/route.js`)
- Admin Bookings → MongoDB Connection: connects (evidence: `src/app/api/admin/bookings/route.js`)
- Admin Bookings → Booking Records: manages bookings (evidence: `src/app/api/admin/bookings/route.js`)
- Admin Bookings → Payment Records: reads payments (evidence: `src/app/api/admin/bookings/route.js`)
- User Account APIs → MongoDB Connection: connects (evidence: `src/app/api/user/profile/route.js`)
- User Account APIs → User Records: updates profile (evidence: `src/app/api/user/profile/route.js`)
