How sameerwork0207/myroommate_nashik works
MyRoommate is a roommate and rental-listing web application. Its backend serves the public site and listing/lead APIs, while route modules dispatch authentication, student-account, and admin operations to controllers and MongoDB models. OTP login can send email; bearer-token middleware protects student and admin routes. The tree also shows browser pages and scripts for listings, login, dashboard, and admin tasks, but their request wiring is not established by the supplied excerpts. Evidence is limited to the README (empty), source index, and shown source excerpts.
Main entry points: index.js Express API · authController.js OTP authentication · user.js Student routes · userController.js Student account
Components 21
Public experience
- Public pages
public/index.html - Listing browser
public/js/main.js - Login interface
public/js/login.js - Student dashboard
public/js/dashboard.js - Admin console
public/js/admin.js
API and workflows
- Express API
api/index.js - Authentication routes
routes/auth.js - OTP authentication
controllers/authController.js - Student routes
routes/user.js - Student account
controllers/userController.js - Token and role guard
middlewares/authMiddleware.js - Admin routes
routes/admin.js - Property and lead admin
controllers/adminController.js - Listing and lead API
api/index.js
Persistence
- Database connection
config/db.js - User records
models/User.js - Listing records
models/Listing.js - Lead records
models/Lead.js
Other components
- Visitor
- Email delivery
- MongoDB
Connections 20
- Visitor → Express API: requests pages and APIs
api/index.js - Express API → Public pages: serves static files
api/index.js - Express API → Authentication routes: mounts auth
api/index.js - Express API → Admin routes: mounts admin
api/index.js - Express API → Student routes: mounts student routes
api/index.js - Express API → Listing records: queries listings
api/index.js - Express API → Lead records: creates leads
api/index.js - Express API → Database connection: connects database
api/index.js - Authentication routes → OTP authentication: dispatches auth
routes/auth.js - OTP authentication → User records: reads and updates users
controllers/authController.js - OTP authentication → Email delivery: sends OTP email
controllers/authController.js - Student routes → Token and role guard: protects student routes
routes/user.js - Student routes → Student account: dispatches account actions
routes/user.js - Student account → User records: reads and updates users
controllers/userController.js - Student account → Lead records: reads visit requests
controllers/userController.js - Admin routes → Token and role guard: protects admin routes
routes/admin.js - Admin routes → Property and lead admin: dispatches admin actions
routes/admin.js - Property and lead admin → Listing records: manages listings
controllers/adminController.js - Property and lead admin → Lead records: manages leads
controllers/adminController.js - Database connection → MongoDB: connects
config/db.js