# prasad066/estatehub architecture

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

- Interactive diagram: https://gitdiagram.com/prasad066/estatehub
- Repository: https://github.com/prasad066/estatehub

## Overview

EstateHub is a real-estate marketplace for account management, property discovery and listings, favorites, and buyer/seller booking workflows. Users enter through the routed frontend, authenticate, and use buyer or seller dashboard features backed by API services and a backend that persists users, properties, favorites, and bookings. Property listings also upload images to Cloudinary. The source index and excerpts support the shown frontend routes, API handlers, and model calls; links from frontend services to backend routes are not shown directly, so they are omitted.

Main entry points: [`EstateHub_frontend/src/main.jsx`](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/main.jsx) (App routing), [`EstateHub_frontend/src/services/properties.services.js`](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/services/properties.services.js) (Property API client), [`EstateHub_backend/index.js`](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/index.js) (Express server), [`EstateHub_backend/controllers/property.controllers.js`](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/controllers/property.controllers.js) (Property operations)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend experience"]
  node_app["App routing<br/>[main.jsx]"]
  node_home["Home dashboards<br/>[Home.jsx]"]
  node_auth_ui["Login and registration<br/>[Login.jsx]"]
  node_properties_ui["Property browsing<br/>[Properties.jsx]"]
  node_view_ui["Property details<br/>[Viewproperty.jsx]"]
  node_listings_ui["Seller listings<br/>[Listings.jsx]"]
  node_favorites_ui["Favorites<br/>[Favorites.jsx]"]
  node_bookings_ui["Buyer bookings<br/>[Bookings.jsx]"]
  node_requests_ui["Seller requests<br/>[Requests.jsx]"]
  node_analytics_ui["Listing analytics<br/>[Analytics.jsx]"]
  node_profile_ui["Profile management<br/>[Profile.jsx]"]
end

subgraph group_client_data["Client state and API"]
  node_user_state["User state<br/>[user.slice.js]"]
  node_auth_client["Auth API client<br/>[auth.services.js]"]
  node_property_client["Property API client"]
  node_favorite_client["Favorites API client"]
  node_booking_client["Booking API client"]
end

subgraph group_api["Backend API"]
  node_server["Express server<br/>[index.js]"]
  node_user_routes["User routes<br/>[user.routes.js]"]
  node_property_routes["Property routes<br/>[property.routes.js]"]
  node_favorite_routes["Favorite routes<br/>[favorite.routes.js]"]
  node_booking_routes["Booking routes<br/>[booking.routes.js]"]
end

subgraph group_domain["Marketplace operations"]
  node_user_logic["Account operations"]
  node_property_logic["Property operations"]
  node_favorite_logic["Favorite operations"]
  node_booking_logic["Booking lifecycle"]
end

subgraph group_persistence["Persistence and media"]
  node_user_model[("User records<br/>[users.model.js]")]
  node_property_model[("Property records<br/>[property.model.js]")]
  node_favorite_model[("Favorite records<br/>[favorite.model.js]")]
  node_booking_model[("Booking records<br/>[booking.model.js]")]
  node_db[("Database connection<br/>[db.connection.js]")]
end

node_visitor(("Marketplace user"))
node_cloudinary["Cloudinary image service"]

node_visitor -->|"uses"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_auth_ui
node_app -->|"routes to"| node_properties_ui
node_app -->|"routes to"| node_view_ui
node_app -->|"routes to"| node_listings_ui
node_app -->|"routes to"| node_favorites_ui
node_app -->|"routes to"| node_bookings_ui
node_app -->|"routes to"| node_requests_ui
node_app -->|"routes to"| node_analytics_ui
node_app -->|"routes to"| node_profile_ui
node_app -->|"reads token"| node_user_state
node_auth_ui -->|"calls"| node_auth_client
node_auth_ui -->|"updates"| node_user_state
node_profile_ui -->|"calls"| node_auth_client
node_profile_ui -->|"reads state"| node_user_state
node_properties_ui -->|"calls"| node_property_client
node_properties_ui -->|"calls"| node_favorite_client
node_listings_ui -->|"calls"| node_property_client
node_favorites_ui -->|"calls"| node_property_client
node_favorites_ui -->|"calls"| node_favorite_client
node_bookings_ui -->|"calls"| node_booking_client
node_bookings_ui -->|"calls"| node_property_client
node_bookings_ui -->|"calls"| node_auth_client
node_requests_ui -->|"calls"| node_property_client
node_requests_ui -->|"calls"| node_booking_client
node_requests_ui -->|"calls"| node_auth_client
node_analytics_ui -->|"calls"| node_property_client
node_view_ui -->|"calls"| node_booking_client
node_view_ui -->|"calls"| node_property_client
node_server -->|"mounts"| node_user_routes
node_server -->|"mounts"| node_property_routes
node_server -->|"mounts"| node_favorite_routes
node_server -->|"mounts"| node_booking_routes
node_server -->|"connects"| node_db
node_user_routes -->|"dispatches"| node_user_logic
node_property_routes -->|"dispatches"| node_property_logic
node_favorite_routes -->|"dispatches"| node_favorite_logic
node_booking_routes -->|"dispatches"| node_booking_logic
node_user_logic -->|"queries"| node_user_model
node_property_logic -->|"queries"| node_property_model
node_property_logic -->|"deletes related"| node_booking_model
node_property_logic -->|"uploads images"| node_cloudinary
node_property_routes -->|"uploads files"| node_property_logic
node_favorite_logic -->|"queries"| node_favorite_model
node_booking_logic -->|"queries and updates"| node_booking_model
node_booking_logic -->|"checks availability"| node_property_model

click node_app "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/main.jsx"
click node_home "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/Home/Home.jsx"
click node_auth_ui "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/auth/Login.jsx"
click node_properties_ui "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Properties.jsx"
click node_view_ui "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Viewproperty.jsx"
click node_listings_ui "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Listings.jsx"
click node_favorites_ui "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Favorites.jsx"
click node_bookings_ui "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Bookings.jsx"
click node_requests_ui "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Requests.jsx"
click node_analytics_ui "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Analytics.jsx"
click node_profile_ui "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Profile.jsx"
click node_user_state "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/features/user.slice.js"
click node_auth_client "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/services/auth.services.js"
click node_property_client "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/services/properties.services.js"
click node_favorite_client "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/services/favorite.services.js"
click node_booking_client "https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/services/booking.services.js"
click node_server "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/index.js"
click node_user_routes "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/routes/user.routes.js"
click node_property_routes "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/routes/property.routes.js"
click node_favorite_routes "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/routes/favorite.routes.js"
click node_booking_routes "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/routes/booking.routes.js"
click node_user_logic "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/controllers/user.controllers.js"
click node_property_logic "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/controllers/property.controllers.js"
click node_favorite_logic "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/controllers/favorite.controllers.js"
click node_booking_logic "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/controllers/booking.controllers.js"
click node_user_model "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/model/users.model.js"
click node_property_model "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/model/property.model.js"
click node_favorite_model "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/model/favorite.model.js"
click node_booking_model "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/model/booking.model.js"
click node_db "https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/database/db.connection.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_home,node_auth_ui,node_properties_ui,node_view_ui,node_listings_ui,node_favorites_ui,node_bookings_ui,node_requests_ui,node_analytics_ui,node_profile_ui,node_visitor toneBlue
class node_user_state,node_auth_client,node_property_client,node_favorite_client,node_booking_client toneAmber
class node_server,node_user_routes,node_property_routes,node_favorite_routes,node_booking_routes toneMint
class node_user_logic,node_property_logic,node_favorite_logic,node_booking_logic toneRose
class node_user_model,node_property_model,node_favorite_model,node_booking_model,node_db,node_cloudinary toneIndigo
```

## Components

### Frontend experience

- [App routing](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/main.jsx): `EstateHub_frontend/src/main.jsx`
- [Home dashboards](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/Home/Home.jsx): `EstateHub_frontend/src/components/Home/Home.jsx`
- [Login and registration](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/auth/Login.jsx): `EstateHub_frontend/src/components/auth/Login.jsx`
- [Property browsing](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Properties.jsx): `EstateHub_frontend/src/components/dashboard/Properties.jsx`
- [Property details](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Viewproperty.jsx): `EstateHub_frontend/src/components/dashboard/Viewproperty.jsx`
- [Seller listings](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Listings.jsx): `EstateHub_frontend/src/components/dashboard/Listings.jsx`
- [Favorites](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Favorites.jsx): `EstateHub_frontend/src/components/dashboard/Favorites.jsx`
- [Buyer bookings](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Bookings.jsx): `EstateHub_frontend/src/components/dashboard/Bookings.jsx`
- [Seller requests](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Requests.jsx): `EstateHub_frontend/src/components/dashboard/Requests.jsx`
- [Listing analytics](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Analytics.jsx): `EstateHub_frontend/src/components/dashboard/Analytics.jsx`
- [Profile management](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/components/dashboard/Profile.jsx): `EstateHub_frontend/src/components/dashboard/Profile.jsx`

### Client state and API

- [User state](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/features/user.slice.js): `EstateHub_frontend/src/features/user.slice.js`
- [Auth API client](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/services/auth.services.js): `EstateHub_frontend/src/services/auth.services.js`
- [Property API client](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/services/properties.services.js): `EstateHub_frontend/src/services/properties.services.js`
- [Favorites API client](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/services/favorite.services.js): `EstateHub_frontend/src/services/favorite.services.js`
- [Booking API client](https://github.com/prasad066/estatehub/blob/main/EstateHub_frontend/src/services/booking.services.js): `EstateHub_frontend/src/services/booking.services.js`

### Backend API

- [Express server](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/index.js): `EstateHub_backend/index.js`
- [User routes](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/routes/user.routes.js): `EstateHub_backend/routes/user.routes.js`
- [Property routes](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/routes/property.routes.js): `EstateHub_backend/routes/property.routes.js`
- [Favorite routes](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/routes/favorite.routes.js): `EstateHub_backend/routes/favorite.routes.js`
- [Booking routes](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/routes/booking.routes.js): `EstateHub_backend/routes/booking.routes.js`

### Marketplace operations

- [Account operations](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/controllers/user.controllers.js): `EstateHub_backend/controllers/user.controllers.js`
- [Property operations](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/controllers/property.controllers.js): `EstateHub_backend/controllers/property.controllers.js`
- [Favorite operations](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/controllers/favorite.controllers.js): `EstateHub_backend/controllers/favorite.controllers.js`
- [Booking lifecycle](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/controllers/booking.controllers.js): `EstateHub_backend/controllers/booking.controllers.js`

### Persistence and media

- [User records](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/model/users.model.js): `EstateHub_backend/model/users.model.js`
- [Property records](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/model/property.model.js): `EstateHub_backend/model/property.model.js`
- [Favorite records](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/model/favorite.model.js): `EstateHub_backend/model/favorite.model.js`
- [Booking records](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/model/booking.model.js): `EstateHub_backend/model/booking.model.js`
- [Database connection](https://github.com/prasad066/estatehub/blob/main/EstateHub_backend/database/db.connection.js): `EstateHub_backend/database/db.connection.js`

### Other components

- **Marketplace user**
- **Cloudinary image service**

## Connections

- Marketplace user → App routing: uses (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Home dashboards: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Login and registration: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Property browsing: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Property details: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Seller listings: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Favorites: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Buyer bookings: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Seller requests: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Listing analytics: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → Profile management: routes to (evidence: `EstateHub_frontend/src/main.jsx`)
- App routing → User state: reads token
- Login and registration → Auth API client: calls (evidence: `EstateHub_frontend/src/components/auth/Login.jsx`)
- Login and registration → User state: updates (evidence: `EstateHub_frontend/src/components/auth/Login.jsx`)
- Profile management → Auth API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Profile.jsx`)
- Profile management → User state: reads state (evidence: `EstateHub_frontend/src/components/dashboard/Profile.jsx`)
- Property browsing → Property API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Properties.jsx`)
- Property browsing → Favorites API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Properties.jsx`)
- Seller listings → Property API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Listings.jsx`)
- Favorites → Property API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Favorites.jsx`)
- Favorites → Favorites API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Favorites.jsx`)
- Buyer bookings → Booking API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Bookings.jsx`)
- Buyer bookings → Property API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Bookings.jsx`)
- Buyer bookings → Auth API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Bookings.jsx`)
- Seller requests → Property API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Requests.jsx`)
- Seller requests → Booking API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Requests.jsx`)
- Seller requests → Auth API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Requests.jsx`)
- Listing analytics → Property API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Analytics.jsx`)
- Property details → Booking API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Viewproperty.jsx`)
- Property details → Property API client: calls (evidence: `EstateHub_frontend/src/components/dashboard/Viewproperty.jsx`)
- Express server → User routes: mounts (evidence: `EstateHub_backend/index.js`)
- Express server → Property routes: mounts (evidence: `EstateHub_backend/index.js`)
- Express server → Favorite routes: mounts (evidence: `EstateHub_backend/index.js`)
- Express server → Booking routes: mounts (evidence: `EstateHub_backend/index.js`)
- Express server → Database connection: connects (evidence: `EstateHub_backend/index.js`)
- User routes → Account operations: dispatches (evidence: `EstateHub_backend/controllers/user.controllers.js`)
- Property routes → Property operations: dispatches (evidence: `EstateHub_backend/routes/property.routes.js`)
- Favorite routes → Favorite operations: dispatches (evidence: `EstateHub_backend/routes/favorite.routes.js`)
- Booking routes → Booking lifecycle: dispatches (evidence: `EstateHub_backend/routes/booking.routes.js`)
- Account operations → User records: queries (evidence: `EstateHub_backend/controllers/user.controllers.js`)
- Property operations → Property records: queries (evidence: `EstateHub_backend/controllers/property.controllers.js`)
- Property operations → Booking records: deletes related (evidence: `EstateHub_backend/controllers/property.controllers.js`)
- Property operations → Cloudinary image service: uploads images (evidence: `EstateHub_backend/controllers/property.controllers.js`)
- Property routes → Property operations: uploads files (evidence: `EstateHub_backend/routes/property.routes.js`)
- Favorite operations → Favorite records: queries (evidence: `EstateHub_backend/controllers/favorite.controllers.js`)
- Booking lifecycle → Booking records: queries and updates (evidence: `EstateHub_backend/controllers/booking.controllers.js`)
- Booking lifecycle → Property records: checks availability (evidence: `EstateHub_backend/controllers/booking.controllers.js`)
