This repository contains the source code for a Hotel Booking App built using Java, Spring Boot, React, MySQL, and JWT authentication. The application allows users to search for hotels, view details, make bookings, and manage their reservations.
-
Java: Java is a widely-used programming language known for its portability and versatility. In this project, Java is used for backend development.
-
Spring Boot: Spring Boot is a powerful framework for building Java-based applications quickly and with minimal configuration. It provides tools and plugins for rapid development.
-
React: React is a JavaScript library for building user interfaces. It allows for the creation of interactive and dynamic frontend components.
-
MySQL: MySQL is a popular open-source relational database management system. It is used for storing and managing the application's data, such as hotel information and user bookings.
-
JWT (JSON Web Tokens): JWT is a compact, URL-safe means of representing claims to be transferred between two parties. It is used for secure authentication and authorization in the application.
-
User Authentication: Users can sign up, log in, and log out securely using JWT authentication.
-
Hotel Search: Users can search for hotels based on location, dates, and other criteria.
-
Booking Management: Users can view available rooms, make bookings, and manage their reservations.
-
Admin Panel: Administrators have access to an admin panel where they can manage hotels, rooms, and bookings.
-
Responsive Design: The application is designed to be responsive and accessible on various devices, including desktops, tablets, and mobile phones.
The Hotel Booking App follows a client-server architecture:
-
Client-side: The frontend of the application is built using React, which interacts with the backend API to fetch data and manage user interactions.
-
Server-side: The backend is built using Spring Boot, which handles requests from the frontend, processes business logic, and interacts with the database.
-
Database: MySQL is used as the database management system for storing and retrieving application data.
The application is divided into several modules:
-
Authentication: Handles user authentication and authorization using JWT tokens.
-
Hotel Management: Manages hotel information, including details, availability, and pricing.
-
Booking Management: Handles user bookings, reservation details, and payment processing.
-
Admin Panel: Provides administrative functionalities for managing hotels, rooms, and user bookings.
The application supports multiple types of users:
-
Guests: Visitors who can browse hotels and view details but need to sign up or log in to make bookings.
-
Registered Users: Users who have signed up and logged in can make bookings, manage reservations, and access personalized features.
-
Administrators: Admin users have access to additional functionalities such as managing hotels, rooms, and bookings through the admin panel.
-
Security: The application prioritizes security measures such as JWT authentication, input validation, and secure communication protocols to protect user data.
-
Scalability: The architecture is designed to be scalable, allowing for future expansion and handling a large number of users and bookings.
-
Testing: Unit tests, integration tests, and end-to-end tests are implemented to ensure the reliability and robustness of the application.
-
Documentation: Detailed documentation is provided for developers, including setup instructions, API documentation, and code explanations.
To run the Hotel Booking App locally, follow these steps:
- Clone the repository to your local machine.
- Install dependencies for both the frontend and backend.
- Set up the MySQL database and configure the application properties.
- Run the backend server using Spring Boot.
- Run the frontend development server using React.
- Access the application through the provided URL and start exploring!
For detailed setup instructions, please refer to the documentation provided in the docs
directory.
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- @vitejs/plugin-react uses Babel for Fast Refresh
- @vitejs/plugin-react-swc uses SWC for Fast Refresh