This project is a full-stack hotel booking application built using the MERN stack (MongoDB, Express, React, Node.js). The system allows users to browse hotels, view room details, check availability, and make bookings with secure authentication. It includes both the frontend and backend components and is designed to provide a responsive, smooth user experience.
- User Authentication: Secure login and registration with encrypted passwords.
- Browse Hotels: Users can search for hotels, filter by location, price, and more.
- Booking System: Book rooms with real-time availability checks.
- User Dashboard: View and manage bookings.
- Admin Dashboard: Manage hotel data, rooms, and bookings.
- Responsive UI: Optimized for both desktop and mobile devices.
- Frontend: React, CSS, Bootstrap (or other CSS frameworks as needed)
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JWT (JSON Web Tokens) for secure user sessions
- Deployment: Hosted on services like Heroku (backend) and Netlify/Vercel (frontend)
Follow these steps to set up the project locally:
-
Clone the repository:
git clone https://github.com/Binary-Shade/Full-stack-hotel-booking.git cd Full-stack-hotel-booking
-
Install dependencies for both frontend and backend:
- For the backend:
cd backend npm install
- For the frontend:
cd ../frontend npm install
- For the backend:
-
Environment Variables: Create a
.env
file in thebackend
directory with the following:MONGO_URI=your-mongodb-connection-string JWT_SECRET=your-jwt-secret
-
Backend: In the
backend
directory, run:npm start
-
Frontend: In the
frontend
directory, run:npm start
-
Access the application:
- Frontend:
http://localhost:3000
- Backend (API):
http://localhost:5000
- Frontend:
hotel-booking-system/
├── backend/
│ ├── controllers/
│ ├── models/
│ ├── routes/
│ ├── utils/
│ └── server.js
├── frontend/
│ ├── public/
│ ├── src/
│ ├── components/
│ ├── pages/
│ ├── App.js
│ └── index.js
└── README.md
- Backend: Contains the server code, routes, models, and controllers for the API.
- Frontend: React code, organized into components and pages for a smooth user experience.
- User Authentication:
/api/auth/
- Hotel Management:
/api/hotels/
- Room Management:
/api/rooms/
- Booking:
/api/bookings/
- Implement additional payment gateway integration.
- Add user review and rating system for hotels.
- Enhanced search filters for improved user experience.
Contributions are welcome! Feel free to open issues or submit pull requests for new features, bug fixes, or improvements.
This project is licensed under the MIT License.
Feel free to customize further according to your project specifics!