A full-stack hotel booking platform where users can browse, book hotels, save favorites, and securely pay online. Built using React for the frontend and Node.js (Express) with MySQL and Sequelize for the backend. Secure authentication is handled with Bcrypt, and payments are integrated via Stripe.
- React
- React Router
- Custom CSS
- Node.js
- Express.js
- Sequelize (ORM)
- MySQL
- Bcrypt
- JWT (Authentication)
- Stripe (Payments)
- π Search and browse hotels
- ποΈ Book hotel rooms
- π Save and manage favorite hotels
- π Secure login & registration using Bcryptrypt
- π³ Stripe-powered payments
- ποΈ Persistent storage using MySQL & Sequelizelize
git clone https://github.com/Misha2007/booking_system.git
cd booking_systemcd backend
npm installlCreate a .env file inside the backend directory with the following content:
PORT=port
DATABASE_USER=your_mysql_user
DATABASE_PASSWORD=your_mysql_password
DATABASE_HOST=your_database_host
DATABASE_DIALECT=your_database_dialect
JWT_SECRET=your_jwt_secret
secretKey=your_stripe_secret_keyCreate a config folder in the backend directory and create there a auth.config.js file with the following content:
export default {
secret:
"your_secret_key",
};In addition create in the same directory backend/config create a config.json file with the following content:
{
"development": {
"username": "your_mysql_user",
"password": "your_mysql_password",
"database": "booking_system",
"host": "your_database_host",
"dialect": "mysql"
},
"test": {
"username": "your_mysql_user",
"password": "your_mysql_password",
"database": "booking_system",
"host": "your_database_host",
"dialect": "mysql"
},
"production": {
"username": "your_mysql_user",
"password": "your_mysql_password",
"database": "booking_system",
"host": "your_database_host",
"dialect": "mysql"
}
}
}Then start the server:
node index.jscd frontend
npm install
npm startrtbooking_system/
β
βββ frontend/ # React frontend
β βββ public/
β βββ src/
β βββ components/
β βββ pages/
β βββ ...
β
βββ backend/ # Express backend
β βββ controllers/
β βββ models/
β βββ routes/
β βββ ...
οΏ½οΏ½ββ ...
- Passwords are hashed with Bcrypt
- User sessions are managed using JWT
- Sensitive keys and credentials stored in
.envfiles
- Integrated with Stripe Checkout
- Handles secure booking payments in real-time
This project is open-source and available under the MIT License.
MIT License
Copyright (c) 2025 Misha2007
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
S IN THE
SOFTWARE.