Welcome to the backend repository of the Hostel Management Project. This MERN (MongoDB, Express.js, ReactJS, Node.js) project efficiently manages multiple blocks of rooms in a hostel, providing functionalities for chief wardens, staff (wardens, chefs, maintenance), and students.
- TypeScript: A typed superset of JavaScript, bringing static types to the language.
- NodeJS with Express.js: A backend framework for building scalable and performant server-side applications.
- MongoDB with Mongoose: A MongoDB object modeling tool designed to work in an asynchronous environment.
- Socket.io: Enables real-time bidirectional event-based communication.
- Repository Design Pattern:
- Extensive use of OOPS programming paradigm.
- Access to the database is through the repository only.
- Generic CRUD Repository.
- Backend Validation:
- MongoDB Schema: Validator module and in-built validator.
- Request Body: Yup module and custom RegEx.
- Request Params: Validator module.
- Error Handling:
- Errors handled globally.
- Errors handled through OOPS programming paradigm.
- Separation of operational and unexpected errors.
There are three types of users in the system:
- Chief Warden (Admin)
- Staffs:
- Warden
- Chef
- Maintenance
- Student
- Node.js: Ensure that Node.js is installed on your machine. You can download it from https://nodejs.org/.
- MongoDB: Install MongoDB and set up a database for the project.
- Clone the repository:
git clone https://github.com/Rishikesht1245/Hostel_Management_Backend.git
- Navigate to the project directory:
cd Hostel_Management_Backend
- Install dependencies
npm install
- Run the development server
npm start
- View the application: http://localhost:5173