Skip to content

Subhro16/HotelReservationManagement

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

26 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Hotel Reservation System

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.

πŸ—οΈ Architecture

This project follows a microservices architecture with the following components:

Backend Microservices

  • 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

Frontend

  • React Application (Port: 3000) - Modern UI built with React and React Router

πŸš€ Prerequisites

Before running this project, ensure you have the following installed:

πŸ“‹ Installation & Setup

1. Clone the Repository

git clone <repository-url>
cd hotel-reservation_ttp1adjr2504_team6

2. Database Setup

  1. Start MySQL server
  2. Create a database (optional - databases will be created automatically)
  3. Update database credentials in all application.properties files:
    • Replace your_password_here with your actual MySQL password
    • Update username if different from root

3. Backend Setup

Start Services in Order:

  1. Discovery Server (Must be started first)

    cd "HOTEL RESERVATION SYSTEM/DiscoveryServer"
    mvn spring-boot:run
  2. API Gateway

    cd "HOTEL RESERVATION SYSTEM/APIGateway"
    mvn spring-boot:run
  3. Authentication Service

    cd "HOTEL RESERVATION SYSTEM/LoginAndRegistration"
    mvn spring-boot:run
  4. Hotel Room Management

    cd "HOTEL RESERVATION SYSTEM/HotelRoomManagement"
    mvn spring-boot:run
  5. Reservation Management

    cd "HOTEL RESERVATION SYSTEM/ReservationManagement"
    mvn spring-boot:run
  6. Payment Management

    cd "HOTEL RESERVATION SYSTEM/PaymentManagement"
    mvn spring-boot:run
  7. Search Management

    cd "HOTEL RESERVATION SYSTEM/SearchManagement"
    mvn spring-boot:run

4. Frontend Setup

cd react-app
npm install
npm run dev

The React application will be available at http://localhost:3000

πŸ”§ Configuration

Database Configuration

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

Port Configuration

  • 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

🎯 Features

User Features

  • User registration and authentication
  • Hotel and room search
  • Room booking and reservation management
  • Payment processing
  • Booking history and management
  • Profile management

Admin Features

  • Hotel management (Add, Edit, Delete)
  • Room management (Add, Edit, Delete)
  • Reservation management
  • Payment status management
  • Customer management
  • Dashboard with analytics

Technical Features

  • JWT-based authentication
  • Microservices architecture
  • Service discovery with Eureka
  • API Gateway with routing
  • CORS configuration
  • Database per service pattern
  • RESTful APIs

πŸ“± Usage

For Users

  1. Register/Login: Create an account or login with existing credentials
  2. Search Hotels: Use the search functionality to find hotels
  3. Book Rooms: Select available rooms and make reservations
  4. Make Payments: Complete payment for your bookings
  5. Manage Bookings: View and manage your reservations

For Administrators

  1. Login: Use admin credentials to access admin dashboard
  2. Manage Hotels: Add, edit, or remove hotels
  3. Manage Rooms: Add, edit, or remove rooms for hotels
  4. View Reservations: Monitor all bookings and reservations
  5. Process Payments: Update payment statuses
  6. Customer Management: View and manage customer information

πŸ”Œ API Endpoints

Authentication Service (/auth)

  • POST /auth/register - User registration
  • POST /auth/login - User login
  • POST /auth/validate - Token validation

Hotel Room Management (/hotelmanager)

  • GET /hotelmanager/hotels - Get all hotels
  • POST /hotelmanager/hotels - Add new hotel
  • PUT /hotelmanager/hotels/{id} - Update hotel
  • DELETE /hotelmanager/hotels/{id} - Delete hotel
  • GET /hotelmanager/rooms - Get all rooms
  • POST /hotelmanager/rooms - Add new room
  • PUT /hotelmanager/rooms/{id} - Update room
  • DELETE /hotelmanager/rooms/{id} - Delete room

Reservation Management (/reservation)

  • GET /reservation/bookings - Get all reservations
  • POST /reservation/bookings - Create new reservation
  • PUT /reservation/bookings/{id} - Update reservation
  • DELETE /reservation/bookings/{id} - Cancel reservation

Payment Management (/payments)

  • GET /payments - Get all payments
  • POST /payments - Process payment
  • PUT /payments/{id}/status - Update payment status

Search Management (/search)

  • GET /search/hotels - Search hotels
  • GET /search/rooms - Search rooms

πŸ› οΈ Development

Project Structure

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

Building the Project

# Build all microservices
cd "HOTEL RESERVATION SYSTEM"
mvn clean install

# Build frontend
cd react-app
npm run build

Running Tests

# Backend tests
mvn test

# Frontend tests
npm test

πŸ”’ Security

  • JWT-based authentication
  • Password encryption
  • CORS configuration
  • Input validation
  • SQL injection prevention

πŸ› Troubleshooting

Common Issues

  1. Port Already in Use

    • Check if ports are available
    • Kill processes using the ports
    • Update port configuration if needed
  2. Database Connection Issues

    • Verify MySQL is running
    • Check database credentials
    • Ensure database exists
  3. Service Discovery Issues

    • Ensure Discovery Server is running first
    • Check Eureka dashboard at http://localhost:8761
  4. Frontend Not Loading

    • Check if all backend services are running
    • Verify API Gateway is accessible
    • Check browser console for errors

Logs

  • Check application logs in each service directory
  • Monitor Eureka dashboard for service registration
  • Check browser developer tools for frontend issues

πŸ“„ License

This project is developed for educational purposes.

πŸ‘₯ Team

This project was developed by Team 6 as part of the hotel reservation system development.

Team Members & Modules

  • 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages