How musipatlaharicharan/hms works
This is a hostel-management portal for students, wardens, administrators, and security staff. Users authenticate and then access role-protected screens for registration, allocation, residents, fees, attendance, leave, notices, mess, complaints, and gate monitoring. The frontend calls a JSON API; backend routes apply authentication and authorization before domain controllers handle requests and persist records. The source excerpts confirm several wiring paths; other documented-by-index subsystems are included, but uncertain connections are omitted. The README is empty, so feature coverage is based on the source tree and index.
Main entry points: App.jsx Routes and roles · server.js Express API · api.js API client · studentController.js Student management
Components 34
Web application
- Routes and roles
frontend/src/App.jsx - Session context
frontend/src/context/AuthContext.jsx - Toast feedback
frontend/src/context/ToastContext.jsx - API client
frontend/src/services/api.js - Dashboard
frontend/src/pages/Dashboard.jsx - Resident screens
frontend/src/pages/Students.jsx - Room allocation
frontend/src/pages/Rooms.jsx - Fee screens
frontend/src/pages/Fees.jsx - Mess screens
frontend/src/pages/MessDashboard.jsx - Gate monitoring
frontend/src/pages/GateWatchman.jsx - Issue reporting
frontend/src/pages/ReportIssue.jsx
API and access
- Express API
backend/src/server.js - Authentication
backend/src/controllers/authController.js - JWT and roles
backend/src/middleware/authMiddleware.js
Resident operations
- Student management
backend/src/controllers/studentController.js - Room management
backend/src/controllers/roomController.js - Attendance and leave
backend/src/controllers/attendanceController.js - Fee management
backend/src/controllers/feeController.js
Hostel services
- Mess and complaints
backend/src/controllers/messController.js - Issue management
backend/src/controllers/issueController.js - Notices
backend/src/controllers/noticeController.js - Dashboard data
backend/src/controllers/dashboardController.js - Email notifications
backend/src/services/emailService.js
Domain records
- User records
backend/src/models/User.js - Student records
backend/src/models/Student.js - Room records
backend/src/models/Room.js - Attendance records
backend/src/models/Attendance.js - Fee records
backend/src/models/Fee.js - Mess records
backend/src/models/MessEntry.js - Complaint records
backend/src/models/Complaint.js - Issue records
backend/src/models/Issue.js - Leave records
backend/src/models/Leave.js - Notice records
backend/src/models/Notice.js
Other components
- Portal user
Connections 48
- Portal user → Routes and roles: uses
frontend/src/App.jsx - Routes and roles → Session context: provides session
frontend/src/App.jsx - Routes and roles → Toast feedback: provides feedback
frontend/src/App.jsx - Routes and roles → Dashboard: routes to
frontend/src/App.jsx - Routes and roles → Resident screens: routes to
frontend/src/App.jsx - Routes and roles → Room allocation: routes to
frontend/src/App.jsx - Routes and roles → Fee screens: routes to
frontend/src/App.jsx - Routes and roles → Mess screens: routes to
frontend/src/App.jsx - Routes and roles → Gate monitoring: routes to
frontend/src/App.jsx - Routes and roles → Issue reporting: routes to
frontend/src/App.jsx - Session context → API client: requests session
frontend/src/context/AuthContext.jsx - Dashboard → API client: requests data
frontend/src/pages/Dashboard.jsx - Resident screens → API client: requests data
- Room allocation → API client: requests data
- Fee screens → API client: requests data
- Mess screens → API client: requests data
frontend/src/pages/MessDashboard.jsx - Gate monitoring → API client: requests data
frontend/src/pages/GateWatchman.jsx - Issue reporting → API client: requests data
- API client → Express API: sends API requests
- Express API → Authentication: mounts routes
backend/src/server.js - Express API → Student management: mounts routes
backend/src/server.js - Express API → Room management: mounts routes
backend/src/server.js - Express API → Attendance and leave: mounts routes
backend/src/server.js - Express API → Fee management: mounts routes
backend/src/server.js - Express API → Mess and complaints: mounts routes
backend/src/server.js - Express API → Issue management: mounts routes
backend/src/server.js - Express API → Notices: mounts routes
backend/src/server.js - Express API → Dashboard data: mounts routes
backend/src/server.js - Student management → JWT and roles: protects routes
backend/src/routes/studentRoutes.js - Attendance and leave → Attendance records: reads and writes
backend/src/controllers/attendanceController.js - Attendance and leave → Leave records: reads
backend/src/controllers/attendanceController.js - Student management → Student records: reads and writes
backend/src/controllers/studentController.js - Student management → User records: reads and writes
backend/src/controllers/studentController.js - Student management → Room records: allocates
backend/src/controllers/studentController.js - Student management → Fee records: creates fees
backend/src/controllers/studentController.js - Student management → Email notifications: notifies
backend/src/controllers/studentController.js - Room management → Room records: reads and writes
backend/src/controllers/roomController.js - Room management → Student records: reads
backend/src/controllers/roomController.js - Fee management → Fee records: manages
- Mess and complaints → Mess records: reads and writes
backend/src/controllers/messController.js - Mess and complaints → Complaint records: reads and writes
backend/src/controllers/messController.js - Mess and complaints → Student records: looks up
backend/src/controllers/messController.js - Issue management → Issue records: manages
backend/src/controllers/issueController.js - Notices → Notice records: manages
- Authentication → User records: authenticates
backend/src/controllers/authController.js - Authentication → Student records: loads profile
backend/src/controllers/authController.js - Authentication → Email notifications: sends notifications
backend/src/controllers/authController.js - JWT and roles → User records: loads user
backend/src/middleware/authMiddleware.js