This is a MERN stack website for hotel booking.
The project is divided into two main parts:
client
: Frontend built with React and Viteserver
: Backend built with Node.js and Express
Before you begin, ensure you have the following installed:
- Node.js
- npm
- MongoDB
-
Clone the repository:
git clone https://github.com/kesharwaniyanshi/Hotel_Booking_site.git cd Hotel_Booking_site
-
Install dependencies for both client and server:
cd client npm install cd ../server npm install
-
Set up environment variables:
-
In the
server
folder, create a.env
file and add:MONGODB_URI=your_mongodb_connection_string JWT_SECRET_KEY=your_jwt_secret
-
In the
client
folder, create a.env
file and add:VITE_APP_URI_API=http://localhost:5000 # or your backend URL
-
-
Start the server:
cd server nodemon server.js
-
In a new terminal, start the client:
cd client npm run dev
-
Open your browser and navigate to
http://localhost:5173
(or the port Vite is running on)
-
User Authentication
- Secure SignIn and SignUp functionality
- JSON Web Token (JWT) based authentication
- Password encryption for enhanced security
-
Role-Based Access Control
- User roles: Guest, Registered User, and Admin/Host
- Admin panel for hotel owners and site administrators
-
Multi-Page Architecture
- Intuitive navigation between different sections of the website
- Responsive design for seamless experience across devices
-
Database Integration
- MongoDB integration for efficient data storage and retrieval
-
Review and Rating System
- Allow users to leave reviews and ratings for hotels
-
Responsive Design
- Mobile-friendly interface
- Consistent user experience across various screen sizes
- Frontend: React, Vite
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JSON Web Tokens (JWT)