How shiva-hub577/womens-pg-website-repo-version2 works
Pujyasritha’s Living is a role-based women’s PG and hostel management portal. Residents, workers, and administrators enter through authentication and role-specific routes; the application then serves room, rent, complaint, or administrative workflows, with MongoDB-backed records and email notifications. Admin capabilities include occupancy oversight, allotment, payment reporting, complaint assignment, and verified resident departures; workers handle complaint progress and resolution. Monthly rent reminders are a separate API-triggered workflow. The graph follows documented routes and sampled controller dependencies; some template rendering and database wiring are documented only at a high level.
Main entry points: dashboardController.js Occupancy and Payments · complaintController.js Complaint Lifecycle · app.js Express Application · tenantRoutes.js Resident and Worker Routes
Components 29
Entry and UI
- Authentication Routes
routes/authRoutes.js - Admin Routes
routes/adminRoutes.js - Resident and Worker Routes
routes/tenantRoutes.js - Portal Screens
views - Landing Composition
components/LandingPage.jsx - Hero and Navigation
components/Hero.jsx - Feature Preview
components/FeaturePreview.jsx - Reminder API
routes/apiRoutes.js
Portal Workflows
- Authentication and OTP
controllers/authController.js - Role Protection
middlewares/authMiddleware.js - Occupancy and Payments
controllers/dashboardController.js - Complaint Lifecycle
controllers/complaintController.js - Rent Reminder Dispatch
controllers/reminderController.js - Evidence Upload
middlewares/uploadMiddleware.js
Domain Records
- Role Accounts
models/Tenant.js - Rooms and Residents
models/Room.js - Rent Payments
models/RentPayment.js - Complaint Records
models/Complaint.js - Worker Records
models/Worker.js - Verification Records
models/Otp.js - Departure Archive
models/RemovedTenant.js - Reminder Log
models/NotificationLog.js
Notifications
- Email Service
services/emailservices.js
Runtime
- Express Application
app.js - MongoDB
Other components
- Resident
- Administrator
- Maintenance Worker
- Resend
Connections 45
- Express Application → Authentication Routes: mounts
app.js - Express Application → Admin Routes: mounts
app.js - Express Application → Resident and Worker Routes: mounts
app.js - Express Application → Reminder API: mounts
app.js - Express Application → Role Protection: sets user locals
app.js - Express Application → MongoDB: connects
- Authentication Routes → Authentication and OTP: dispatches
routes/authRoutes.js - Authentication Routes → Portal Screens: serves portal pages
README.md - Admin Routes → Role Protection: guards admin routes
routes/adminRoutes.js - Admin Routes → Occupancy and Payments: dispatches
routes/adminRoutes.js - Admin Routes → Complaint Lifecycle: dispatches
routes/adminRoutes.js - Resident and Worker Routes → Role Protection: role protects
routes/tenantRoutes.js - Resident and Worker Routes → Occupancy and Payments: dispatches
routes/tenantRoutes.js - Resident and Worker Routes → Complaint Lifecycle: dispatches
routes/tenantRoutes.js - Admin Routes → Evidence Upload: processes photos
routes/adminRoutes.js - Resident and Worker Routes → Evidence Upload: processes photos
routes/tenantRoutes.js - Resident and Worker Routes → Evidence Upload: processes photos
routes/tenantRoutes.js - Reminder API → Rent Reminder Dispatch: dispatches
routes/apiRoutes.js - Authentication and OTP → Role Accounts: reads and writes
controllers/authController.js - Authentication and OTP → Verification Records: reads and writes
controllers/authController.js - Authentication and OTP → Rooms and Residents: looks up residents
controllers/authController.js - Authentication and OTP → Email Service: sends verification
controllers/authController.js - Occupancy and Payments → Rooms and Residents: reads and updates
controllers/dashboardController.js - Occupancy and Payments → Role Accounts: updates accounts
controllers/dashboardController.js - Occupancy and Payments → Rent Payments: reads and updates
controllers/dashboardController.js - Occupancy and Payments → Departure Archive: archives departures
controllers/dashboardController.js - Occupancy and Payments → Complaint Records: reads complaints
controllers/dashboardController.js - Occupancy and Payments → Email Service: emails reports
controllers/dashboardController.js - Complaint Lifecycle → Complaint Records: reads and updates
controllers/complaintController.js - Complaint Lifecycle → Rooms and Residents: looks up residents
controllers/complaintController.js - Complaint Lifecycle → Role Accounts: looks up residents
controllers/complaintController.js - Complaint Lifecycle → Worker Records: assigns workers
controllers/complaintController.js - Complaint Lifecycle → Email Service: sends alerts
controllers/complaintController.js - Rent Reminder Dispatch → Rooms and Residents: reads occupancy
controllers/reminderController.js - Rent Reminder Dispatch → Rent Payments: reads and creates
controllers/reminderController.js - Rent Reminder Dispatch → Reminder Log: logs reminders
controllers/reminderController.js - Rent Reminder Dispatch → Email Service: sends reports
controllers/reminderController.js - Email Service → Resend: sends messages
services/emailservices.js - Resident → Authentication Routes: uses portal
README.md - Administrator → Authentication Routes: uses portal
README.md - Maintenance Worker → Authentication Routes: uses portal
README.md - Landing Composition → Hero and Navigation: composes
components/LandingPage.jsx - Landing Composition → Feature Preview: previews features
- Occupancy and Payments → Portal Screens: renders admin pages
README.md - Complaint Lifecycle → Portal Screens: renders complaint pages
README.md