This project contains a full stack hotel booking system tailored for solo travelers and hotel staff
Link to video project demonstration https://youtu.be/VXE_SwAyU_4
-/frontend-react.js frontend application
- /backend - Node.js and Express backend -hotel_booking.sql - database schema for MySQL
-node.js and npm installed Mysql Server is installed and running
ADMIN
email: admin@example.com password: hotelmng
TEST USER
email: testuser@example.com
password: password123
1 Navigate to the frontend folder
cd frontend
2 install dependencies
npm install
3 start the React app
npm start The app will run on local host port 3000, usually
- Navigate to the backend cd backend
2 install dependencies
3 The .env file already includes JWT_SECRET
4 Start the backend server
node index.js run this in the backend folder
The server will run on port localhost 3001
1 open up MySQL commandline or GUI tool
run these
CREATE DATABASE hotel_booking; USE hotel_booking;
3 Run the following to import the schema
source/path/to/hotel_booking.sql
Replace path/to with the actual path to the .sql file.
Edit db.js password with your own MySQL root password. (password when installing MySQL server )
If the project doesn't run correctly or you see errors related to missing packages
- Delete the node_modules folders in both /frontend and /backend directories
2 then reinstall the dependencies by running the following in each folder
npm install
This will restore all the required packages using the package.json files
Developed by Joshua Tite for the Ci601 Final year project