Skip to content
Bhuvan-08Public

About

A full-stack Hotel Rooms Management System built with React, Node.js, and MySQL. Features role-based access for owners and guests. Admins can manage rooms and view all bookings on a dynamic dashboard. Guests can browse, book rooms with price calculation, and view their booking history. Ensures booking integrity with backend transactions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

StaySync (Full-Stack Hospitality Platform)

A full-stack web application designed to streamline hotel room bookings and management. This system provides a clean, animated, and professional user interface for both guests and hotel owners, ensuring a seamless experience from browsing to booking.


🚀 Project Overview

This project is a comprehensive Hotel Rooms Management System built with the MERN stack (MySQL, Express, React, Node.js). It features a robust backend API that handles authentication, room availability, and booking transactions, along with a dynamic frontend for a smooth user experience.

Key Features:

  • Role-Based Access Control:

    • Guests (Users): Can register, log in, browse available rooms, view room details, and book rooms for specific dates. They can also view their personal booking history.
    • Hotel Owner (Admin): Has full access to a protected dashboard to manage all aspects of the hotel, including adding, editing, and deleting rooms, as well as viewing and removing all bookings.
  • Dynamic Booking System:

    • Real-time price calculation based on the number of nights and guests.
    • Professional date-overlap validation on the backend to prevent double-booking, ensuring data integrity with ACID-compliant transactions.
  • Interactive Admin Dashboard:

    • Displays live statistics, including total rooms, number of active bookings, and monthly revenue.
    • Provides full CRUD (Create, Read, Update, Delete) functionality for hotel rooms and bookings.

🛠️ Technologies Used

  • Frontend:

    • React.js
    • React Router
    • React Bootstrap
    • Axios
    • Framer Motion (for animations)
    • Lucide React (for icons)
  • Backend:

    • Node.js
    • Express.js
    • MySQL2
    • JSON Web Tokens (JWT) for authentication
    • Bcrypt.js for password hashing
  • Database:

    • MySQL

⚙️ How to Run the Project

Prerequisites

  • Node.js and npm installed
  • MySQL Server installed and running

1. Backend Setup

  1. Navigate to the backend directory:

    cd backend
  2. Install dependencies:

    npm install
  3. Set up the database:

    • Open your MySQL client (e.g., MySQL Workbench).
    • Create a new database named hotel_management.
    • Run the SQL script provided in the project to create the necessary tables and insert sample data.
  4. Configure environment variables:

    • Create a .env file in the backend directory.
    • Add your database credentials and a JWT secret:
      DB_HOST=localhost
      DB_USER=your_mysql_username
      DB_PASSWORD=your_mysql_password
      DB_NAME=hotel_management
      JWT_SECRET=your_super_secret_key
  5. Start the backend server:

    node server.js

    The server will be running on http://localhost:5000.

2. Frontend Setup

  1. Open a new terminal and navigate to the frontend directory:

    cd frontend
  2. Install dependencies:

    npm install
  3. Start the frontend application:

    npm start

    The application will open in your browser at http://localhost:3000.

Default Login Credentials

  • Admin/Owner:
    • Username: admin
    • Password: 1234567
  • User/Guest:
    • You can register a new user account through the registration page.

About

A full-stack Hotel Rooms Management System built with React, Node.js, and MySQL. Features role-based access for owners and guests. Admins can manage rooms and view all bookings on a dynamic dashboard. Guests can browse, book rooms with price calculation, and view their booking history. Ensures booking integrity with backend transactions.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages