# yashsabne/rentsmart_v2 architecture

> Architecture diagram of the GitHub repository yashsabne/rentsmart_v2, 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/yashsabne/rentsmart_v2
- Repository: https://github.com/yashsabne/rentsmart_v2

## Overview

RentSmart is a property rental and sales platform. Seekers browse listings, inspect a property, and can pay to unlock an owner’s contact or start a conversation; owners manage listings, promote them, and review activity. Accounts, preferences, saved/recently viewed properties, and evaluation history support these flows. The graph emphasizes documented service capabilities and sampled controller responsibilities; some integrations and service-to-service links are documented in the README rather than visible in the excerpts.

Main entry points: [`client/src/App.jsx`](https://github.com/yashsabne/rentsmart_v2/blob/main/client/src/App.jsx) (RentSmart app), [`services/property-service/src/controllers/propertyController.js`](https://github.com/yashsabne/rentsmart_v2/blob/main/services/property-service/src/controllers/propertyController.js) (Listings and discovery), [`services/payment-service/src/controller/paymentController.js`](https://github.com/yashsabne/rentsmart_v2/blob/main/services/payment-service/src/controller/paymentController.js) (Contact and promotion payments), [`services/auth-service/src/controllers/authController.js`](https://github.com/yashsabne/rentsmart_v2/blob/main/services/auth-service/src/controllers/authController.js) (Accounts and preferences)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web client"]
  node_web["RentSmart app<br/>[App.jsx]"]
  node_discovery["Search and details"]
  node_listing_ui["Listing management<br/>[CreateListing.jsx]"]
  node_dashboard["Owner dashboard<br/>[Dashboard.jsx]"]
end

subgraph group_property["Property services"]
  node_property_api["Listings and discovery"]
  node_listing_actions["Listing actions"]
  node_saved_activity["Saves and interactions"]
  node_intelligence["Property evaluation"]
end

subgraph group_identity["Accounts and activity"]
  node_accounts["Accounts and preferences<br/>[authController.js]"]
  node_user_store[("User records<br/>[User.js]")]
  node_activity[("Activity records")]
end

subgraph group_transactions["Payments and notifications"]
  node_payments["Contact and promotion payments"]
  node_payment_store[("Payment records")]
  node_notifications["Email notifications"]
  node_email_worker["Email worker<br/>[emailWorker.js]"]
end

subgraph group_platform["Messaging and infrastructure"]
  node_chat["Conversations and messages"]
  node_live_chat["Live chat events<br/>[chatSocket.js]"]
  node_redis_api["Redis operations API<br/>[redisController.js]"]
  node_redis_store[("Redis<br/>[redis.js]")]
end

node_seeker(("Property seeker"))
node_owner(("Property owner"))
node_mongo[("MongoDB")]
node_cloudinary["Cloudinary"]
node_razorpay["Razorpay"]
node_brevo["Brevo email API"]
node_ai_service["Property intelligence API"]

node_seeker -->|"uses"| node_web
node_owner -->|"uses"| node_web
node_web -->|"routes to"| node_discovery
node_web -->|"routes to"| node_listing_ui
node_web -->|"routes to"| node_dashboard
node_discovery -->|"searches and views"| node_property_api
node_listing_ui -->|"manages listings"| node_property_api
node_dashboard -->|"manages listing state"| node_listing_actions
node_discovery -->|"tracks interactions"| node_saved_activity
node_property_api -->|"requests evaluation"| node_intelligence
node_property_api -->|"reads and writes"| node_mongo
node_property_api -->|"uploads photos"| node_cloudinary
node_property_api -->|"evaluates properties"| node_ai_service
node_web -->|"authenticates"| node_accounts
node_accounts -->|"reads and writes"| node_user_store
node_accounts -->|"stores sessions"| node_redis_api
node_accounts -->|"logs activity"| node_activity
node_web -->|"pays to unlock or promote"| node_payments
node_payments -->|"fetches listing details"| node_property_api
node_payments -->|"creates and verifies orders"| node_razorpay
node_payments -->|"records payments"| node_payment_store
node_payments -->|"logs payment events"| node_activity
node_payments -->|"queues email jobs"| node_notifications
node_accounts -->|"queues email jobs"| node_notifications
node_notifications -->|"processes jobs"| node_email_worker
node_email_worker -->|"consumes queue"| node_redis_store
node_notifications -->|"sends email"| node_brevo
node_web -->|"starts conversations"| node_chat
node_chat -->|"updates live sessions"| node_live_chat
node_chat -->|"stores conversations"| node_mongo
node_web -->|"uses platform operations"| node_redis_api
node_redis_api -->|"performs Redis operations"| node_redis_store
node_property_api -->|"logs property activity"| node_activity
node_seeker -.->|"asks chatbot"| node_ai_service

click node_web "https://github.com/yashsabne/rentsmart_v2/blob/main/client/src/App.jsx"
click node_discovery "https://github.com/yashsabne/rentsmart_v2/blob/main/client/src/pages/PropertyBuyPage.jsx"
click node_listing_ui "https://github.com/yashsabne/rentsmart_v2/blob/main/client/src/pages/CreateListing.jsx"
click node_dashboard "https://github.com/yashsabne/rentsmart_v2/blob/main/client/src/pages/Dashboard.jsx"
click node_property_api "https://github.com/yashsabne/rentsmart_v2/blob/main/services/property-service/src/controllers/propertyController.js"
click node_listing_actions "https://github.com/yashsabne/rentsmart_v2/blob/main/services/property-service/src/controllers/listingActionController.js"
click node_saved_activity "https://github.com/yashsabne/rentsmart_v2/blob/main/services/property-service/src/controllers/interactionController.js"
click node_intelligence "https://github.com/yashsabne/rentsmart_v2/blob/main/services/property-service/src/services/propertyIntelligence.service.js"
click node_accounts "https://github.com/yashsabne/rentsmart_v2/blob/main/services/auth-service/src/controllers/authController.js"
click node_user_store "https://github.com/yashsabne/rentsmart_v2/blob/main/services/auth-service/src/models/User.js"
click node_activity "https://github.com/yashsabne/rentsmart_v2/blob/main/services/activity-service/src/controllers/activityController.js"
click node_payments "https://github.com/yashsabne/rentsmart_v2/blob/main/services/payment-service/src/controller/paymentController.js"
click node_payment_store "https://github.com/yashsabne/rentsmart_v2/blob/main/services/payment-service/src/controller/paymentHistoryController.js"
click node_notifications "https://github.com/yashsabne/rentsmart_v2/blob/main/services/notification-service/src/controller/notificationController.js"
click node_chat "https://github.com/yashsabne/rentsmart_v2/blob/main/services/chat-service/src/controllers/conversationController.js"
click node_live_chat "https://github.com/yashsabne/rentsmart_v2/blob/main/services/chat-service/src/sockets/chatSocket.js"
click node_redis_api "https://github.com/yashsabne/rentsmart_v2/blob/main/services/redis-service/src/controllers/redisController.js"
click node_redis_store "https://github.com/yashsabne/rentsmart_v2/blob/main/services/redis-service/src/config/redis.js"
click node_email_worker "https://github.com/yashsabne/rentsmart_v2/blob/main/services/notification-service/src/workers/emailWorker.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_web,node_discovery,node_listing_ui,node_dashboard toneBlue
class node_property_api,node_listing_actions,node_saved_activity,node_intelligence,node_mongo toneAmber
class node_accounts,node_user_store,node_activity,node_brevo,node_ai_service toneMint
class node_payments,node_payment_store,node_notifications,node_email_worker toneRose
class node_chat,node_live_chat,node_redis_api,node_redis_store,node_seeker,node_owner,node_cloudinary,node_razorpay toneIndigo
```

## Components

### Web client

- [RentSmart app](https://github.com/yashsabne/rentsmart_v2/blob/main/client/src/App.jsx): `client/src/App.jsx`
- [Search and details](https://github.com/yashsabne/rentsmart_v2/blob/main/client/src/pages/PropertyBuyPage.jsx): `client/src/pages/PropertyBuyPage.jsx`
- [Listing management](https://github.com/yashsabne/rentsmart_v2/blob/main/client/src/pages/CreateListing.jsx): `client/src/pages/CreateListing.jsx`
- [Owner dashboard](https://github.com/yashsabne/rentsmart_v2/blob/main/client/src/pages/Dashboard.jsx): `client/src/pages/Dashboard.jsx`

### Property services

- [Listings and discovery](https://github.com/yashsabne/rentsmart_v2/blob/main/services/property-service/src/controllers/propertyController.js): `services/property-service/src/controllers/propertyController.js`
- [Listing actions](https://github.com/yashsabne/rentsmart_v2/blob/main/services/property-service/src/controllers/listingActionController.js): `services/property-service/src/controllers/listingActionController.js`
- [Saves and interactions](https://github.com/yashsabne/rentsmart_v2/blob/main/services/property-service/src/controllers/interactionController.js): `services/property-service/src/controllers/interactionController.js`
- [Property evaluation](https://github.com/yashsabne/rentsmart_v2/blob/main/services/property-service/src/services/propertyIntelligence.service.js): `services/property-service/src/services/propertyIntelligence.service.js`

### Accounts and activity

- [Accounts and preferences](https://github.com/yashsabne/rentsmart_v2/blob/main/services/auth-service/src/controllers/authController.js): `services/auth-service/src/controllers/authController.js`
- [User records](https://github.com/yashsabne/rentsmart_v2/blob/main/services/auth-service/src/models/User.js): `services/auth-service/src/models/User.js`
- [Activity records](https://github.com/yashsabne/rentsmart_v2/blob/main/services/activity-service/src/controllers/activityController.js): `services/activity-service/src/controllers/activityController.js`

### Payments and notifications

- [Contact and promotion payments](https://github.com/yashsabne/rentsmart_v2/blob/main/services/payment-service/src/controller/paymentController.js): `services/payment-service/src/controller/paymentController.js`
- [Payment records](https://github.com/yashsabne/rentsmart_v2/blob/main/services/payment-service/src/controller/paymentHistoryController.js): `services/payment-service/src/controller/paymentHistoryController.js`
- [Email notifications](https://github.com/yashsabne/rentsmart_v2/blob/main/services/notification-service/src/controller/notificationController.js): `services/notification-service/src/controller/notificationController.js`
- [Email worker](https://github.com/yashsabne/rentsmart_v2/blob/main/services/notification-service/src/workers/emailWorker.js): `services/notification-service/src/workers/emailWorker.js`

### Messaging and infrastructure

- [Conversations and messages](https://github.com/yashsabne/rentsmart_v2/blob/main/services/chat-service/src/controllers/conversationController.js): `services/chat-service/src/controllers/conversationController.js`
- [Live chat events](https://github.com/yashsabne/rentsmart_v2/blob/main/services/chat-service/src/sockets/chatSocket.js): `services/chat-service/src/sockets/chatSocket.js`
- [Redis operations API](https://github.com/yashsabne/rentsmart_v2/blob/main/services/redis-service/src/controllers/redisController.js): `services/redis-service/src/controllers/redisController.js`
- [Redis](https://github.com/yashsabne/rentsmart_v2/blob/main/services/redis-service/src/config/redis.js): `services/redis-service/src/config/redis.js`

### Other components

- **Property seeker**
- **Property owner**
- **MongoDB**
- **Cloudinary**
- **Razorpay**
- **Brevo email API**
- **Property intelligence API**

## Connections

- Property seeker → RentSmart app: uses (evidence: `README.md`)
- Property owner → RentSmart app: uses (evidence: `README.md`)
- RentSmart app → Search and details: routes to (evidence: `client/src/App.jsx`)
- RentSmart app → Listing management: routes to (evidence: `client/src/App.jsx`)
- RentSmart app → Owner dashboard: routes to (evidence: `client/src/App.jsx`)
- Search and details → Listings and discovery: searches and views (evidence: `README.md`)
- Listing management → Listings and discovery: manages listings (evidence: `README.md`)
- Owner dashboard → Listing actions: manages listing state (evidence: `README.md`)
- Search and details → Saves and interactions: tracks interactions (evidence: `README.md`)
- Listings and discovery → Property evaluation: requests evaluation (evidence: `services/property-service/src/controllers/propertyController.js`)
- Listings and discovery → MongoDB: reads and writes (evidence: `README.md`)
- Listings and discovery → Cloudinary: uploads photos (evidence: `README.md`)
- Listings and discovery → Property intelligence API: evaluates properties (evidence: `README.md`)
- RentSmart app → Accounts and preferences: authenticates (evidence: `README.md`)
- Accounts and preferences → User records: reads and writes (evidence: `services/auth-service/src/controllers/authController.js`)
- Accounts and preferences → Redis operations API: stores sessions (evidence: `services/auth-service/src/controllers/authController.js`)
- Accounts and preferences → Activity records: logs activity (evidence: `README.md`)
- RentSmart app → Contact and promotion payments: pays to unlock or promote (evidence: `README.md`)
- Contact and promotion payments → Listings and discovery: fetches listing details (evidence: `services/payment-service/src/controller/paymentController.js`)
- Contact and promotion payments → Razorpay: creates and verifies orders (evidence: `README.md`)
- Contact and promotion payments → Payment records: records payments (evidence: `services/payment-service/src/controller/paymentController.js`)
- Contact and promotion payments → Activity records: logs payment events (evidence: `services/payment-service/src/controller/paymentController.js`)
- Contact and promotion payments → Email notifications: queues email jobs (evidence: `README.md`)
- Accounts and preferences → Email notifications: queues email jobs (evidence: `README.md`)
- Email notifications → Email worker: processes jobs
- Email worker → Redis: consumes queue (evidence: `README.md`)
- Email notifications → Brevo email API: sends email (evidence: `README.md`)
- RentSmart app → Conversations and messages: starts conversations (evidence: `README.md`)
- Conversations and messages → Live chat events: updates live sessions
- Conversations and messages → MongoDB: stores conversations (evidence: `README.md`)
- RentSmart app → Redis operations API: uses platform operations (evidence: `README.md`)
- Redis operations API → Redis: performs Redis operations (evidence: `services/redis-service/src/controllers/redisController.js`)
- Listings and discovery → Activity records: logs property activity (evidence: `README.md`)
- Property seeker → Property intelligence API: asks chatbot (evidence: `README.md`)
