# bhatthimanshu4/maid-nanny-service-platform architecture

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

- Interactive diagram: https://gitdiagram.com/bhatthimanshu4/maid-nanny-service-platform
- Repository: https://github.com/bhatthimanshu4/maid-nanny-service-platform

## Overview

This is a maid-and-nanny service management platform with a Next.js frontend and an Express/MongoDB backend. Its principal domain workflow is helper discovery, plan selection, booking, helper response and completion, followed by a household review. The backend also supports account registration and login, user/helper profiles, helper verification documents, and administration. Frontend pages are included as product surfaces, but no frontend-to-backend calls are shown in the supplied evidence; those connections are therefore omitted.

Main entry points: [`Backend/server.js`](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/server.js) (Express server), [`Backend/routes/BookingRoutes.js`](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/BookingRoutes.js) (Booking management), [`Backend/middleware/authMiddleware.js`](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/middleware/authMiddleware.js) (JWT guard), [`Backend/routes/authRoutes.js`](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/authRoutes.js) (Authentication)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_home_page["Home page<br/>[page.tsx]"]
  node_login_page["Login page<br/>[page.tsx]"]
  node_signup_page["Signup page<br/>[page.tsx]"]
  node_household_page["Household page<br/>[page.tsx]"]
  node_navbar["Navigation<br/>[Navbar.tsx]"]
end

subgraph group_identity["Accounts and profiles"]
  node_auth_routes["Authentication<br/>[authRoutes.js]"]
  node_user_routes["User profiles<br/>[userRoutes.js]"]
  node_user_model[("User records<br/>[User.js]")]
end

subgraph group_marketplace["Helper marketplace"]
  node_helper_routes["Helper profiles<br/>[helperRoutes.js]"]
  node_helper_model[("Helper records<br/>[Helper.js]")]
  node_upload_middleware["Document upload"]
  node_service_routes["Service plans"]
  node_service_model[("Plan records<br/>[ServicePlan.js]")]
end

subgraph group_booking["Booking lifecycle"]
  node_booking_routes["Booking management<br/>[BookingRoutes.js]"]
  node_booking_model[("Booking records<br/>[Booking.js]")]
  node_review_routes["Reviews and ratings<br/>[reviewRoutes.js]"]
  node_review_model[("Review records<br/>[Review.js]")]
end

subgraph group_platform["Backend platform"]
  node_server["Express server<br/>[server.js]"]
  node_auth_middleware["JWT guard<br/>[authMiddleware.js]"]
  node_admin_routes["Admin operations<br/>[adminRoutes.js]"]
end

node_household(("Household"))
node_helper_actor(("Helper"))
node_admin_actor(("Administrator"))

node_server -->|"mounts routes"| node_admin_routes
node_server -->|"mounts routes"| node_auth_routes
node_server -->|"mounts routes"| node_user_routes
node_server -->|"mounts routes"| node_helper_routes
node_server -->|"mounts routes"| node_service_routes
node_server -->|"mounts routes"| node_booking_routes
node_server -->|"mounts routes"| node_review_routes
node_auth_routes -->|"creates and reads"| node_user_model
node_auth_routes -->|"creates"| node_helper_model
node_user_routes -->|"reads and updates"| node_user_model
node_helper_routes -->|"reads and updates"| node_helper_model
node_helper_routes -->|"processes documents"| node_upload_middleware
node_service_routes -->|"finds helper"| node_helper_model
node_service_routes -->|"manages plans"| node_service_model
node_booking_routes -->|"finds helper"| node_helper_model
node_booking_routes -->|"checks plan"| node_service_model
node_booking_routes -->|"creates and updates"| node_booking_model
node_review_routes -->|"checks completion"| node_booking_model
node_review_routes -->|"creates and reads"| node_review_model
node_auth_routes -.-> node_auth_middleware
node_user_routes -->|"guards routes"| node_auth_middleware
node_helper_routes -->|"guards routes"| node_auth_middleware
node_service_routes -->|"guards routes"| node_auth_middleware
node_booking_routes -->|"guards routes"| node_auth_middleware
node_review_routes -->|"guards creation"| node_auth_middleware
node_admin_routes -->|"guards routes"| node_auth_middleware
node_household -.->|"registers or logs in"| node_auth_routes
node_helper_actor -.->|"registers"| node_auth_routes
node_household -.->|"browses helpers"| node_helper_routes
node_household -.->|"requests booking"| node_booking_routes
node_helper_actor -.->|"responds to booking"| node_booking_routes
node_household -.->|"submits review"| node_review_routes
node_admin_actor -.->|"manages platform"| node_admin_routes

click node_home_page "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/app/page.tsx"
click node_login_page "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/app/auth/login/page.tsx"
click node_signup_page "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/app/auth/signup/page.tsx"
click node_household_page "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/app/household/page.tsx"
click node_navbar "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/components/Navbar.tsx"
click node_server "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/server.js"
click node_auth_routes "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/authRoutes.js"
click node_user_routes "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/userRoutes.js"
click node_user_model "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/User.js"
click node_auth_middleware "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/middleware/authMiddleware.js"
click node_helper_routes "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/helperRoutes.js"
click node_helper_model "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/Helper.js"
click node_upload_middleware "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/middleware/uploadmiddleware.js"
click node_service_routes "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/servicePlanRoutes.js"
click node_service_model "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/ServicePlan.js"
click node_booking_routes "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/BookingRoutes.js"
click node_booking_model "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/Booking.js"
click node_review_routes "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/reviewRoutes.js"
click node_review_model "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/Review.js"
click node_admin_routes "https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/adminRoutes.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_home_page,node_login_page,node_signup_page,node_household_page,node_navbar toneBlue
class node_auth_routes,node_user_routes,node_user_model toneAmber
class node_helper_routes,node_helper_model,node_upload_middleware,node_service_routes,node_service_model toneMint
class node_booking_routes,node_booking_model,node_review_routes,node_review_model toneRose
class node_server,node_auth_middleware,node_admin_routes,node_household,node_helper_actor,node_admin_actor toneIndigo
```

## Components

### Web experience

- [Home page](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/app/page.tsx): `Frontend/app/page.tsx`
- [Login page](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/app/auth/login/page.tsx): `Frontend/app/auth/login/page.tsx`
- [Signup page](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/app/auth/signup/page.tsx): `Frontend/app/auth/signup/page.tsx`
- [Household page](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/app/household/page.tsx): `Frontend/app/household/page.tsx`
- [Navigation](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Frontend/components/Navbar.tsx): `Frontend/components/Navbar.tsx`

### Accounts and profiles

- [Authentication](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/authRoutes.js): `Backend/routes/authRoutes.js`
- [User profiles](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/userRoutes.js): `Backend/routes/userRoutes.js`
- [User records](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/User.js): `Backend/models/User.js`

### Helper marketplace

- [Helper profiles](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/helperRoutes.js): `Backend/routes/helperRoutes.js`
- [Helper records](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/Helper.js): `Backend/models/Helper.js`
- [Document upload](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/middleware/uploadmiddleware.js): `Backend/middleware/uploadmiddleware.js`
- [Service plans](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/servicePlanRoutes.js): `Backend/routes/servicePlanRoutes.js`
- [Plan records](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/ServicePlan.js): `Backend/models/ServicePlan.js`

### Booking lifecycle

- [Booking management](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/BookingRoutes.js): `Backend/routes/BookingRoutes.js`
- [Booking records](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/Booking.js): `Backend/models/Booking.js`
- [Reviews and ratings](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/reviewRoutes.js): `Backend/routes/reviewRoutes.js`
- [Review records](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/models/Review.js): `Backend/models/Review.js`

### Backend platform

- [Express server](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/server.js): `Backend/server.js`
- [JWT guard](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/middleware/authMiddleware.js): `Backend/middleware/authMiddleware.js`
- [Admin operations](https://github.com/bhatthimanshu4/maid-nanny-service-platform/blob/main/Backend/routes/adminRoutes.js): `Backend/routes/adminRoutes.js`

### Other components

- **Household**
- **Helper**
- **Administrator**

## Connections

- Express server → Admin operations: mounts routes (evidence: `Backend/server.js`)
- Express server → Authentication: mounts routes (evidence: `Backend/server.js`)
- Express server → User profiles: mounts routes (evidence: `Backend/server.js`)
- Express server → Helper profiles: mounts routes (evidence: `Backend/server.js`)
- Express server → Service plans: mounts routes (evidence: `Backend/server.js`)
- Express server → Booking management: mounts routes (evidence: `Backend/server.js`)
- Express server → Reviews and ratings: mounts routes (evidence: `Backend/server.js`)
- Authentication → User records: creates and reads (evidence: `Backend/routes/authRoutes.js`)
- Authentication → Helper records: creates (evidence: `Backend/routes/authRoutes.js`)
- User profiles → User records: reads and updates (evidence: `Backend/routes/userRoutes.js`)
- Helper profiles → Helper records: reads and updates (evidence: `Backend/routes/helperRoutes.js`)
- Helper profiles → Document upload: processes documents (evidence: `Backend/routes/helperRoutes.js`)
- Service plans → Helper records: finds helper (evidence: `Backend/routes/servicePlanRoutes.js`)
- Service plans → Plan records: manages plans (evidence: `Backend/routes/servicePlanRoutes.js`)
- Booking management → Helper records: finds helper (evidence: `Backend/routes/BookingRoutes.js`)
- Booking management → Plan records: checks plan (evidence: `Backend/routes/BookingRoutes.js`)
- Booking management → Booking records: creates and updates (evidence: `Backend/routes/BookingRoutes.js`)
- Reviews and ratings → Booking records: checks completion (evidence: `Backend/routes/reviewRoutes.js`)
- Reviews and ratings → Review records: creates and reads (evidence: `Backend/routes/reviewRoutes.js`)
- Authentication → JWT guard
- User profiles → JWT guard: guards routes (evidence: `Backend/routes/userRoutes.js`)
- Helper profiles → JWT guard: guards routes (evidence: `Backend/routes/helperRoutes.js`)
- Service plans → JWT guard: guards routes (evidence: `Backend/routes/servicePlanRoutes.js`)
- Booking management → JWT guard: guards routes (evidence: `Backend/routes/BookingRoutes.js`)
- Reviews and ratings → JWT guard: guards creation (evidence: `Backend/routes/reviewRoutes.js`)
- Admin operations → JWT guard: guards routes (evidence: `Backend/routes/adminRoutes.js`)
- Household → Authentication: registers or logs in
- Helper → Authentication: registers
- Household → Helper profiles: browses helpers
- Household → Booking management: requests booking
- Helper → Booking management: responds to booking
- Household → Reviews and ratings: submits review
- Administrator → Admin operations: manages platform
