How arshad-dev57/realtor_backend works
This is an Express/MongoDB real-estate marketplace API. Buyers and realtors enter through API routes to authenticate, manage property listings, request tours, and use lead/contact features; dashboards, payments, subscriptions, and device/notification capabilities support those workflows. Controllers own domain operations, while Mongoose models hold the principal records and services handle email and push delivery. Several route and controller files were not excerpted, so their features are represented by supported directory paths without guessed internal call chains.
Main entry points: app.js Express API · tour.controller.js Tour scheduling · property.controller.js Property listings · dashboard.controller.js User dashboards
Components 32
API and access
- Express API
app.js - Authentication routes
routes/auth.routes.js - Authentication guard
middlewares/auth.middleware.js
Marketplace workflows
- Property routes
routes/property.routes.js - Property listings
controllers/property.controller.js - Tour routes
routes/tour.routes.js - Tour scheduling
controllers/tour.controller.js - Lead workflows
controllers/lead.controller.js - Lead requests
controllers/leadrequest.controller.js - User dashboards
controllers/dashboard.controller.js - Admin dashboard
controllers/admin.dashboard.controller.js
Accounts and revenue
- User accounts
models/user.model.js - Authentication and profiles
controllers/auth.controller.js - Device management
controllers/device.controller.js - Payments
controllers/payment.controller.js - Subscriptions
controllers/subscription.controller.js
Engagement and messaging
- Notification workflows
controllers/notification.controller.js - Push delivery
services/onesignal.js - Email delivery
services/email.service.js
Domain records
- Notification records
models/notification.model.js - Property records
models/property.model.js - Tour records
models/tour.model.js - Lead records
models/lead.model.js - Lead request records
models/leadRequest.model.js - Device records
models/device.model.js - Revoked tokens
models/tokenBlacklist.model.js - One-time codes
models/otp.model.js - Payment records
models/payment.model.js
Other components
- API client
- Image storage
- OneSignal
- Gmail SMTP
Connections 48
- API client → Express API: sends requests
app.js - Express API → Authentication routes: mounts routes
app.js - Express API → Property routes: mounts routes
app.js - Express API → Tour routes: mounts routes
app.js - Express API → Lead workflows: mounts lead routes
app.js - Express API → Lead requests: mounts request routes
app.js - Express API → User dashboards: mounts routes
app.js - Authentication routes → Authentication and profiles: dispatches to
routes/auth.routes.js - Authentication routes → Subscriptions: dispatches to
routes/auth.routes.js - Authentication routes → Authentication guard: protects routes
routes/auth.routes.js - Property routes → Property listings: dispatches to
routes/property.routes.js - Property routes → Authentication guard: protects routes
routes/property.routes.js - Property routes → Image storage: uploads images
routes/property.routes.js - Tour routes → Tour scheduling: dispatches to
routes/tour.routes.js - Tour routes → Authentication guard: protects routes
routes/tour.routes.js - Authentication guard → Revoked tokens: checks tokens
middlewares/auth.middleware.js - Authentication guard → Device records: checks devices
middlewares/auth.middleware.js - Authentication and profiles → User accounts: reads and updates
controllers/auth.controller.js - Authentication and profiles → Device records: uses devices
controllers/auth.controller.js - Authentication and profiles → One-time codes: uses codes
controllers/auth.controller.js - Property listings → Property records: manages listings
controllers/property.controller.js - Property listings → User accounts: looks up users
controllers/property.controller.js - Property listings → Notification workflows: notifies users
controllers/property.controller.js - Property listings → Email delivery: sends alerts
controllers/property.controller.js - Property listings → Push delivery: sends alerts
controllers/property.controller.js - Tour scheduling → Tour records: manages tours
controllers/tour.controller.js - Tour scheduling → Property records: looks up listings
controllers/tour.controller.js - Tour scheduling → User accounts: looks up users
controllers/tour.controller.js - Tour scheduling → Notification records: saves notices
controllers/tour.controller.js - Tour scheduling → Push delivery: sends alerts
controllers/tour.controller.js - Tour scheduling → Email delivery: sends email
controllers/tour.controller.js - Lead workflows → Lead records: manages leads
controllers/lead.controller.js - Lead workflows → User accounts: looks up users
controllers/lead.controller.js - Lead workflows → Notification workflows: calls notifications
controllers/lead.controller.js - User dashboards → Tour records: reads tours
controllers/dashboard.controller.js - User dashboards → Property records: reads listings
controllers/dashboard.controller.js - User dashboards → User accounts: reads users
controllers/dashboard.controller.js - User dashboards → Lead records: reads leads
controllers/dashboard.controller.js - User dashboards → Lead request records: reads requests
controllers/dashboard.controller.js - Notification workflows → Notification records: manages notices
controllers/notification.controller.js - Notification workflows → User accounts: looks up users
controllers/notification.controller.js - Notification workflows → Push delivery: sends push
controllers/notification.controller.js - Notification workflows → Email delivery: sends email
controllers/notification.controller.js - Push delivery → Notification records: saves notice
services/onesignal.js - Push delivery → OneSignal: sends push
services/onesignal.js - Email delivery → Gmail SMTP: sends email
services/email.service.js - Payments → Payment records: uses records
controllers/payment.controller.js - Subscriptions → User accounts: updates accounts