How gvardhan97/hostel-mess-management-system works
IIITA’s mess-management application serves students, mess managers, and hostel admins across the menu, attendance, feedback, billing, and payment lifecycle. Users enter through role-protected React views; the client calls an Express REST API, whose routes apply authentication/role checks and dispatch to controllers and domain services. Services implement the business stages against MongoDB models. The README documents Razorpay checkout and reporting capabilities; those branches are included, though their implementation details were not sampled. Several backend route/controller/service links are supported by the source index rather than excerpts.
Main entry points: controllers Request controllers · models Domain models · App.jsx Role-based pages · api HTTP API clients
Components 20
Web application
- Role-based pages
client/src/App.jsx - Student features
client/src/pages - Manager features
client/src/pages - Admin features
client/src/pages - HTTP API clients
client/src/api
API access
- Express API
server/app.js - REST routes
server/routes - Authentication & roles
server/middleware - Request controllers
server/controllers
Mess workflows
- Meal attendance
server/services/attendanceService.js - QR meal tokens
server/services/mealTokenService.js - Menu management
server/services/menuService.js - Feedback & analytics
server/services/feedbackService.js - Bill generation
server/services/billService.js - Payment processing
server/services/paymentService.js - Profiles & reports
server/services
Persistence
- Domain models
server/models - MongoDB
server/config/db.js
Other components
- Mess users
- Razorpay
Connections 27
- Mess users → Role-based pages: use role views
- Role-based pages → Student features: routes to
client/src/App.jsx - Role-based pages → Manager features: routes to
client/src/App.jsx - Role-based pages → Admin features: routes to
client/src/App.jsx - Student features → HTTP API clients: requests data
- Manager features → HTTP API clients: requests data
client/src/pages/MessManagerDashboard.jsx - Admin features → HTTP API clients: requests data
- HTTP API clients → Express API: calls REST API
- Express API → REST routes: mounts routes
server/app.js - REST routes → Authentication & roles: checks access
server/routes/billRoutes.js - REST routes → Request controllers: dispatches requests
server/routes/billRoutes.js - Request controllers → Meal attendance: delegates attendance
server/controllers/attendanceController.js - Request controllers → Feedback & analytics: delegates feedback
server/controllers/feedbackController.js - Request controllers → Bill generation: delegates billing
server/controllers/billController.js - Request controllers → Menu management: delegates menus
server/controllers/menuController.js - Request controllers → QR meal tokens: dispatches token work
- Request controllers → Payment processing: dispatches payment work
- Request controllers → Profiles & reports: dispatches reporting
server/controllers/billController.js - Meal attendance → Domain models: reads/writes
server/services/attendanceService.js - Feedback & analytics → Domain models: reads/writes
server/services/feedbackService.js - Bill generation → Domain models: reads/writes
server/services/billService.js - Menu management → Domain models: reads/writes
- QR meal tokens → Domain models: reads/writes
- Payment processing → Domain models: reads/writes
- Profiles & reports → Domain models: reads/writes
server/services/authService.js - Domain models → MongoDB: persists data
- Payment processing → Razorpay: processes checkout