A comprehensive web-based solution for managing hostel operations, including student management, room allocation, outpass management, complaint handling, and community features.
The Hostel Management System consists of three main components:
- Admin Client: A web application for hostel administrators to manage all aspects of the hostel
- Student Client: A web application for students to access hostel services
- Server: A backend API server that handles data processing, storage, and business logic
- Authentication: Secure admin login system
- Dashboard: Overview of key statistics and recent activities
- Student Management:
- Register, view, and deactivate student accounts
- View student details including parent mobile number
- Search and filter students by branch, name, room number, phone number, and roll number
- Room Management:
- View room occupancy and vacant beds by room type
- Automatic room allocation for new students
- Manual room reassignment capabilities
- Room vacancy transfers
- Outpass Management:
- Approve or reject student outpass requests
- View parent contact information during approval
- Complaints Management: View and resolve student complaints
- Announcements: Create and manage announcements for students
- Community Management:
- Monitor student community posts
- Real-time chat with students
- Admin messages highlighted with admin tag
- Food Management:
- Visualize student feedback
- Manage food menu
- Authentication: Secure student login system
- Profile Management:
- View and edit personal details
- Change password
- Upload profile photo
- Room Information: View assigned room details
- Outpass Requests: Submit and track outpass requests
- Complaints: Submit and track complaints
- Announcements: View hostel announcements
- Community Features:
- Create and view community posts
- Real-time chat with image sharing
- View admin and student messages with profile images
- Food Services:
- View food menu
- Submit food reviews
The hostel has 12 floors with specific allocation rules:
- Each room should have students of the same year
- Each floor should have students of the same year only
- Floor allocation by year:
- Floors 1-2: 1st year students
- Floors 3-5: 3rd year students
- Floors 6-9: 4th year students
- Floors 10-12: 2nd year students
- Room numbering follows the pattern:
- First floor: 101-139
- Second floor: 201-239
- And so on up to 12th floor: 1201-1239
- Rooms on 10th, 11th, and 12th floors follow a different pattern:
- 10th floor: 1001, 1011, 1021, 1031, etc.
- 11th floor: 1101, 1111, 1121, 1131, etc.
- 12th floor: 1201, 1211, 1221, 1231, etc.
- Room capacity varies:
- Rooms ending with 36: 2-sharing
- Rooms ending with 37: 3-sharing
- Rooms ending with 38: 3-sharing
- Rooms ending with 39: 2-sharing
- React 19
- React Router 6
- Bootstrap 5
- Axios for API requests
- React Hook Form for form handling
- Socket.IO Client for real-time communication
- Node.js
- Express.js
- MongoDB with Mongoose
- JWT for authentication
- Socket.IO for real-time communication
- Multer for file uploads
- Bcrypt for password hashing
- Node.js (v16 or higher)
- npm or yarn
- MongoDB (local or cloud instance)
-
Navigate to the server directory:
cd server -
Install dependencies:
npm install
-
Create a
.envfile with the following variables:PORT=4000 DBURL=mongodb://localhost:27017/hostel-management JWT_SECRET=your_jwt_secret CLOUD_NAME=your_cloudinary_name CLOUD_API_KEY=your_cloudinary_api_key CLOUD_API_SECRET=your_cloudinary_api_secret -
Start the server:
node server.js
-
Navigate to the admin-client directory:
cd admin-client -
Install dependencies:
npm install
-
Start the development server:
npm run dev
-
Navigate to the student-client directory:
cd student-client -
Install dependencies:
npm install
-
Start the development server:
npm run dev
The system includes a real-time chat feature using Socket.IO:
- Real-time messaging between students and administrators
- Image sharing in messages
- Admin messages highlighted with an admin tag
- Student messages display student name and profile image
- Message history persistence
For testing purposes, the system can generate male student test data:
- Emails follow the pattern: [year]071a[random]@vnrvjiet.in (e.g., [email protected] for 2nd year)
- Students are distributed across branches: CSE, CSE-AIML, CSE-DS, CSE-CYS, AIDS, MECH, EEE, ECE, CIVIL, AE, IT, CSBS
- Default password: 1234
- Rooms are automatically updated with allocated students
src/components: Reusable UI componentssrc/context: Context providers for state managementsrc/layouts: Page layout componentssrc/pages: Main page componentssrc/App.jsx: Main application component with routingsrc/main.jsx: Application entry point
- Similar structure to Admin Client
APIs: API route handlersconfig: Configuration filesmiddleware: Express middlewaremodels: Mongoose data modelsuploads: File upload storage
This project is licensed under the MIT License - see the LICENSE file for details.