How samitsankhla/real_estate_marketplace works
This is a MERN real-estate marketplace for buyers, sellers, and administrators. The main buyer journey is property discovery and detail viewing, followed by wishlist, inquiry, and seller communication; sellers manage listings and administrators oversee platform activity. The graph also shows authentication, contact, and the API/data layer. Edges use the supplied excerpts, source index, or README; unsampled page-to-API calls are not inferred.
Main entry points: server.js REST and socket server · App.jsx Route application · admin.controller.js Admin operations · auth.controller.js Registration and login
Components 30
Marketplace UI
- Route application
frontend/src/App.jsx - Browse and search
frontend/src/pagees/shared/Properties.jsx - Property details
frontend/src/pagees/shared/PropertyDetails.jsx - Seller listing tools
frontend/src/pagees/seller/AddProperty.jsx - Wishlist and inquiries
frontend/src/pagees/buyer/Wishlist.jsx - Chat interface
frontend/src/pagees/shared/ChatMessage.jsx - Account screens
frontend/src/pagees/auth/Register.jsx
Identity and access
- Session context
frontend/src/context/AuthContext.jsx - REST and socket server
backend/server.js - Authentication routes
backend/routes/auth.routes.js - Registration and login
backend/controllers/auth.controller.js - JWT and role checks
backend/middlewares/auth.middleware.js - Verification email
backend/utils/sendEmail.js - User records
backend/models/user.model.js
Property listings
- Listing operations
backend/controllers/property.controller.js - Property records
backend/models/property.model.js - Cloudinary images
Buyer seller engagement
- Inquiry handling
backend/controllers/inquiry.controller.js - Inquiry records
backend/models/inquiry.model.js - Wishlist handling
backend/controllers/wishlist.controller.js - Wishlist records
backend/models/wishlist.modle.js - Chat and messaging
backend/routes/chat.routes.js - Chat records
backend/models/chat.model.js - Contact messages
backend/controllers/contact.controller.js - Contact records
backend/models/contact.model.js
Platform operations
- Admin workspace
frontend/src/pagees/admin/AdminDashboard.jsx - Admin operations
backend/controllers/admin.controller.js
Other components
- Buyer, seller, admin
- MongoDB
- Brevo email service
Connections 41
- Buyer, seller, admin → Route application: use marketplace
- Route application → Browse and search: routes to
frontend/src/App.jsx - Route application → Property details: routes to
frontend/src/App.jsx - Route application → Account screens: routes to
frontend/src/App.jsx - Route application → Wishlist and inquiries: routes to
frontend/src/App.jsx - Route application → Chat interface: routes to
frontend/src/App.jsx - Route application → Seller listing tools: routes to
frontend/src/App.jsx - Route application → Admin workspace: routes to
frontend/src/App.jsx - Account screens → Session context: uses
frontend/src/pagees/auth/Register.jsx - Session context → REST and socket server: requests API
frontend/src/context/AuthContext.jsx - REST and socket server → Authentication routes: mounts
backend/server.js - REST and socket server → Listing operations: mounts routes
backend/server.js - REST and socket server → Inquiry handling: mounts routes
backend/server.js - REST and socket server → Wishlist handling: mounts routes
backend/server.js - REST and socket server → Chat and messaging: mounts
backend/server.js - REST and socket server → Admin operations: mounts routes
backend/server.js - REST and socket server → Contact messages: mounts routes
backend/server.js - Authentication routes → Registration and login: dispatches
backend/routes/auth.routes.js - Authentication routes → JWT and role checks: protects routes
backend/routes/auth.routes.js - Registration and login → User records: reads and writes
backend/controllers/auth.controller.js - Registration and login → Verification email: sends verification
backend/controllers/auth.controller.js - Verification email → Brevo email service: sends email
- JWT and role checks → User records: loads user
backend/middlewares/auth.middleware.js - Listing operations → Property records: reads and writes
backend/controllers/property.controller.js - Listing operations → Cloudinary images: uploads images
backend/controllers/property.controller.js - Seller listing tools → Property details: manage listings
- Browse and search → Property details: open listing
- Property details → Wishlist and inquiries: save or inquire
- Wishlist and inquiries → Chat interface: contact seller
- Inquiry handling → Inquiry records: reads and writes
backend/controllers/inquiry.controller.js - Wishlist handling → Wishlist records: reads and writes
- Chat and messaging → Chat records: reads and writes
backend/routes/chat.routes.js - Contact messages → Contact records: reads and writes
backend/controllers/contact.controller.js - Admin workspace → Admin operations: manage platform
- Admin operations → User records: manages users
backend/controllers/admin.controller.js - Admin operations → Property records: manages listings
backend/controllers/admin.controller.js - Admin operations → Inquiry records: reads inquiries
backend/controllers/admin.controller.js - REST and socket server → MongoDB: connects database
backend/server.js - Registration and login → MongoDB: persists accounts
- Listing operations → MongoDB: persists listings
- Chat and messaging → Buyer, seller, admin: buyer seller chat