A comprehensive microservices-based hotel reservation system built with Spring Boot and React. This system provides a complete solution for hotel management, room booking, payment processing, and user authentication.
This project follows a microservices architecture with the following components:
- Discovery Server (Port: 8761) - Service discovery using Netflix Eureka
- API Gateway (Port: 8085) - Centralized routing and CORS configuration
- Authentication Service (Port: 8080) - User registration, login, and JWT token management
- Hotel Room Management (Port: 8081) - Hotel and room CRUD operations
- Reservation Management (Port: 8082) - Booking and reservation handling
- Payment Management (Port: 8083) - Payment processing and status management
- Search Management (Port: 8084) - Hotel and room search functionality
- React Application (Port: 3000) - Modern UI built with React and React Router
Before running this project, ensure you have the following installed:
- Java 21 - Download here
- Maven 3.8+ - Download here
- Node.js 18+ - Download here
- MySQL 8.0+ - Download here
- Git - Download here
git clone <repository-url>
cd hotel-reservation_ttp1adjr2504_team6
- Start MySQL server
- Create a database (optional - databases will be created automatically)
- Update database credentials in all
application.properties
files:- Replace
your_password_here
with your actual MySQL password - Update username if different from
root
- Replace
-
Discovery Server (Must be started first)
cd "HOTEL RESERVATION SYSTEM/DiscoveryServer" mvn spring-boot:run
-
API Gateway
cd "HOTEL RESERVATION SYSTEM/APIGateway" mvn spring-boot:run
-
Authentication Service
cd "HOTEL RESERVATION SYSTEM/LoginAndRegistration" mvn spring-boot:run
-
Hotel Room Management
cd "HOTEL RESERVATION SYSTEM/HotelRoomManagement" mvn spring-boot:run
-
Reservation Management
cd "HOTEL RESERVATION SYSTEM/ReservationManagement" mvn spring-boot:run
-
Payment Management
cd "HOTEL RESERVATION SYSTEM/PaymentManagement" mvn spring-boot:run
-
Search Management
cd "HOTEL RESERVATION SYSTEM/SearchManagement" mvn spring-boot:run
cd react-app
npm install
npm run dev
The React application will be available at http://localhost:3000
Each microservice has its own database configuration in application.properties
:
- Authentication DB:
authentication_db
- Hotel Room Management DB:
hotelroommanagement_db
- Reservation DB:
reservation_db
- Payment DB:
payment_db
- Search DB:
search_db
- Discovery Server: 8761
- API Gateway: 8085
- Authentication Service: 8080
- Hotel Room Management: 8081
- Reservation Management: 8082
- Payment Management: 8083
- Search Management: 8084
- React Frontend: 3000
- User registration and authentication
- Hotel and room search
- Room booking and reservation management
- Payment processing
- Booking history and management
- Profile management
- Hotel management (Add, Edit, Delete)
- Room management (Add, Edit, Delete)
- Reservation management
- Payment status management
- Customer management
- Dashboard with analytics
- JWT-based authentication
- Microservices architecture
- Service discovery with Eureka
- API Gateway with routing
- CORS configuration
- Database per service pattern
- RESTful APIs
- Register/Login: Create an account or login with existing credentials
- Search Hotels: Use the search functionality to find hotels
- Book Rooms: Select available rooms and make reservations
- Make Payments: Complete payment for your bookings
- Manage Bookings: View and manage your reservations
- Login: Use admin credentials to access admin dashboard
- Manage Hotels: Add, edit, or remove hotels
- Manage Rooms: Add, edit, or remove rooms for hotels
- View Reservations: Monitor all bookings and reservations
- Process Payments: Update payment statuses
- Customer Management: View and manage customer information
POST /auth/register
- User registrationPOST /auth/login
- User loginPOST /auth/validate
- Token validation
GET /hotelmanager/hotels
- Get all hotelsPOST /hotelmanager/hotels
- Add new hotelPUT /hotelmanager/hotels/{id}
- Update hotelDELETE /hotelmanager/hotels/{id}
- Delete hotelGET /hotelmanager/rooms
- Get all roomsPOST /hotelmanager/rooms
- Add new roomPUT /hotelmanager/rooms/{id}
- Update roomDELETE /hotelmanager/rooms/{id}
- Delete room
GET /reservation/bookings
- Get all reservationsPOST /reservation/bookings
- Create new reservationPUT /reservation/bookings/{id}
- Update reservationDELETE /reservation/bookings/{id}
- Cancel reservation
GET /payments
- Get all paymentsPOST /payments
- Process paymentPUT /payments/{id}/status
- Update payment status
GET /search/hotels
- Search hotelsGET /search/rooms
- Search rooms
hotel-reservation_ttp1adjr2504_team6/
βββ HOTEL RESERVATION SYSTEM/
β βββ DiscoveryServer/ # Service discovery
β βββ APIGateway/ # API Gateway
β βββ LoginAndRegistration/ # Authentication service
β βββ HotelRoomManagement/ # Hotel & room management
β βββ ReservationManagement/ # Booking management
β βββ PaymentManagement/ # Payment processing
β βββ SearchManagement/ # Search functionality
βββ react-app/ # React frontend
# Build all microservices
cd "HOTEL RESERVATION SYSTEM"
mvn clean install
# Build frontend
cd react-app
npm run build
# Backend tests
mvn test
# Frontend tests
npm test
- JWT-based authentication
- Password encryption
- CORS configuration
- Input validation
- SQL injection prevention
-
Port Already in Use
- Check if ports are available
- Kill processes using the ports
- Update port configuration if needed
-
Database Connection Issues
- Verify MySQL is running
- Check database credentials
- Ensure database exists
-
Service Discovery Issues
- Ensure Discovery Server is running first
- Check Eureka dashboard at
http://localhost:8761
-
Frontend Not Loading
- Check if all backend services are running
- Verify API Gateway is accessible
- Check browser console for errors
- Check application logs in each service directory
- Monitor Eureka dashboard for service registration
- Check browser developer tools for frontend issues
This project is developed for educational purposes.
This project was developed by Team 6 as part of the hotel reservation system development.
- Shinjinee Paul (Team Lead) - Registration and Authentication
- Archisman Mandal - Add/Edit Hotel Details
- Rishav Pramanik - Payment
- Srijana Dey - Cancel and Edit Reservations
- Subhronil Saha - Search and Reserve Hotel
Note: Make sure to update the database passwords in all application.properties
files before running the application.