https://github.com/shz-code/hotel-booking
Hotel booking mern app
https://github.com/shz-code/hotel-booking
express hotel-booking mern-stack mongodb node react
Last synced: 21 days ago
JSON representation
Hotel booking mern app
- Host: GitHub
- URL: https://github.com/shz-code/hotel-booking
- Owner: shz-code
- License: mit
- Created: 2024-01-16T18:26:37.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-06-19T14:14:49.000Z (almost 2 years ago)
- Last Synced: 2025-03-14T13:14:13.203Z (about 1 year ago)
- Topics: express, hotel-booking, mern-stack, mongodb, node, react
- Language: JavaScript
- Homepage:
- Size: 845 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# HOTel
HOTel is a full-stack MERN application designed to facilitate hotel room bookings. It features a minimalistic and responsive design that works seamlessly across both desktop and mobile devices. The application allows users to sign up, log in, filter rooms based on facilities, and book rooms. The system ensures secure user authentication with hashed passwords using bcrypt and manages state efficiently with Redux.
Short Introduction Video:
[](https://youtu.be/Go9t8Llwy8I)
# ScreenShots


# Features
- **User Authentication**: Users can sign up and log in. Passwords are securely hashed using bcrypt.
- **Room Booking**: Users can filter rooms based on facilities and book them.
- **Booking Capacity Management**: The application tracks the booking capacity of each - room. If the room's booking capacity is reached, a message is displayed to the user.
- **Responsive Design**: The frontend is designed to be simple, minimal, and responsive, providing a seamless experience on both desktop and mobile devices.
# Technologies Used
- **Frontend**: React
- **State Management**: Redux
- **Backend**: Node.js
- **Database**: MongoDB
# Installation
### Prerequisites
- Node.js
- MongoDB
- npm or yarn
# Steps
- Clone the repository:
```sh
https://github.com/shz-code/hotel-booking.git
cd hotel-booking
```
- Install backend dependencies:
```sh
cd backend
npm install
```
- Install frontend dependencies:
```sh
cd ../client
npm install
```
#### Set up environment variables:
Create a `.env` file in the backend directory and add the following variables:
```env
PORT=4003
LOCAL_DB_URL=your_mongodb_url
NODE_ENV=development
```
- Create a `.env` file in the frontend directory and add the following variables:
```env
VITE_API_URL=http://localhost:4003/api
```
- Run the backend server:
```sh
cd backend
npm start
```
- Run the frontend server:
```sh
cd ../client
npm run dev
```
# Usage
- **Sign Up**: Users can create a new account by providing an phone number and password.
- **Log** In: Users can log in using their pphone number and password.
- **Filter Rooms**: Users can filter rooms based on available facilities.
- **Book Rooms**: Users can book rooms if the booking capacity has not been reached. If the capacity is reached, a message will be displayed.
# Project Structure
- backend/: Contains the Node.js server code and API routes.
- models/: Mongoose models for MongoDB.
- routes/: API routes for authentication, room filtering, and booking.
- client/: Contains the React application code.
- src/: Main source folder.
- components/: React components.
- features/: Redux actions, reducers, and store configuration.
# Contributing
Contributions are welcome! Please fork the repository and submit a pull request for any features, bug fixes, or enhancements.
# License
This project is licensed under the MIT License. See the LICENSE file for details.
# Contact
For any inquiries or support, please contact your email/ Linkedin.