Skip to content

A robust, enterprise-grade hotel management and booking platform designed to handle 10,000+ hotels with optimized dynamic pricing strategies. This system implements a monolithic architecture featuring advanced HotelMinPrice strategy that efficiently manages 900,000+ records (90 days Γ— 10,000 hotels) for lightning-fast search operations.

Notifications You must be signed in to change notification settings

ARONAGENT/AirBnb_App_SpringBoot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

32 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

🏨 Airbnb Hotel Management & Booking System

Spring Boot Java PostgreSQL Stripe Visitors GitHub issues License

"The best way to predict the future is to implement it." β€” Alan Kay


πŸ“‹ Overview

A robust, enterprise-grade hotel management and booking platform designed to handle 10,000+ hotels with optimized dynamic pricing strategies. This system implements a monolithic architecture featuring advanced HotelMinPrice strategy that efficiently manages 900,000+ records (90 days Γ— 10,000 hotels) for lightning-fast search operations.

Built with modern software engineering principles, this application showcases JWT authentication, role-based access control, real-time payment processing with Stripe webhooks, Decorator pattern for flexible pricing, comprehensive inventory management, and intelligent cancellation policies.

🎯 Key Highlights

  • πŸ” Secure Authentication - JWT-based authentication with role-based access control (RBAC)
  • πŸ’° Dynamic Pricing Engine - Decorator pattern implementation for flexible pricing strategies
  • πŸ’³ Payment Integration - Stripe webhook integration for real-time payment processing
  • πŸ“Š Optimized Search - HotelMinPrice strategy for efficient querying across massive datasets
  • 🏒 Inventory Management - Comprehensive room availability and booking management
  • πŸ“ API Documentation - Interactive Swagger UI for seamless API exploration
  • βœ… Input Validation - Robust validation layer ensuring data integrity

✨ Features

Core Functionality

  • User Management: Complete user registration, authentication, and profile management
  • Hotel Operations: CRUD operations for hotels with manager-specific access control
  • Room Management: Dynamic room creation, updates, and inventory tracking
  • Booking System: End-to-end booking flow with availability checks and conflict resolution
  • Payment Processing: Secure payment handling via Stripe with webhook confirmation
  • Cancellation Management: Flexible cancellation policies with automated refund processing
  • Dynamic Pricing: Multiple pricing strategies using Decorator pattern

Technical Features

  • Scalable Architecture: Monolithic design optimized for 10,000+ hotels
  • Performance Optimization: Efficient search algorithms handling 900K+ price records
  • Real-time Updates: Webhook-based payment status synchronization
  • Data Validation: Comprehensive input validation at all API endpoints
  • API Documentation: Auto-generated Swagger documentation
  • Error Handling: Graceful error handling with meaningful responses

✨πŸ”₯ Bookings Flow

bookings flow

πŸ› οΈ Technologies

Tech Stack

Technology Version Purpose
Java 17+ Core programming language
Spring Boot 3.x Application framework
Spring Security 6.x Authentication & authorization
Spring Data JPA 3.x Data persistence layer
PostgreSQL 14+ Primary database
Hibernate 6.x ORM framework
JWT Latest Token-based authentication
Stripe API Latest Payment processing
Swagger/OpenAPI 3.x API documentation
Maven 3.8+ Dependency management
Lombok Latest Boilerplate code reduction
Jackson Latest JSON processing

Architecture Patterns

  • Monolithic Architecture - Unified deployment model
  • Repository Pattern - Data access abstraction
  • Decorator Pattern - Flexible pricing strategies
  • Service Layer Pattern - Business logic separation
  • DTO Pattern - Data transfer optimization

πŸ“Έ Screenshots

# Screenshot Description
0 0 0 ER Diagram11 ER Diagram - Database schema
1 Handles Input Validation Handles Input Validation - Request validation
2 signUp the User User Signup - Registration flow
3 Login the User to Get Access the Token User Login - JWT authentication
4 create Hotel By Hotel Manager Create Hotel - Hotel creation
5 Get Hotel By ID Get Hotel - Retrieve details
6 Update Hotel Info Put Mapping Update Hotel - Modify details
7 Create Room for Hotel with id 1 Create Room - Room setup
8 Update Hotel Room Info Update Room - Room modifications
9 Inventory View of Room Database Inventory View - Database overview
10 Payment Status Of Bookings Flow Payment Status - Booking payments
11 Stripe Payment Confirm Status Stripe Confirmation - Payment verified

πŸŽ₯ Video Demonstrations

  • Hotel Activation Flow - Complete hotel activation process & Inventory Creation - Annual inventory setup (365 days)
Activate.hotel.and.Create.a.Inventory.for.room.1.year.mp4
  • Booking Flow - End-to-end booking demonstration
Bookings.Flow.of.Airbnb.App.mp4
  • Dynamic Pricing WorkFlow - Decorator Pattern - Every Rooms have 90 days Pricing Update Strategies
dynamic_pricing.mp4

πŸš€ Installation

Prerequisites

Ensure you have the following installed:

  • Java 17 or higher
  • Maven 3.8+
  • PostgreSQL 14+
  • Git
  • Stripe Account (for payment processing)

Setup Instructions

  1. Clone the repository

    git clone https://github.com/ARONAGENT/AirBnb_App_SpringBoot.git
    cd AirBnb_App_SpringBoot
  2. Configure Database

    Create a PostgreSQL database:

    CREATE DATABASE airbnb_db;
  3. Configure Application Properties

    Update src/main/resources/application.properties:

    # Database Configuration
    spring.datasource.url=jdbc:postgresql://localhost:5432/airbnb_db
    spring.datasource.username=your_username
    spring.datasource.password=your_password
    
    # JWT Configuration
    jwt.secret=your_secret_key
    jwt.expiration=86400000
    
    # Stripe Configuration
    stripe.api.key=your_stripe_secret_key
    stripe.webhook.secret=your_webhook_secret
  4. Build the Application

    mvn clean install
  5. Run the Application

    mvn spring-boot:run
  6. Access the Application

    • API Base URL: http://localhost:8080
    • Swagger UI: http://localhost:8080/swagger-ui.html

πŸ’» Usage

API Endpoints

Authentication

# Register User
POST /api/auth/signup

# Login User
POST /api/auth/login

Hotel Management

# Create Hotel (Manager only)
POST /api/hotels

# Get Hotel by ID
GET /api/hotels/{id}

# Update Hotel
PUT /api/hotels/{id}

# Delete Hotel
DELETE /api/hotels/{id}

Room Management

# Create Room
POST /api/hotels/{hotelId}/rooms

# Update Room
PUT /api/rooms/{id}

# Get Room Inventory
GET /api/rooms/inventory

Booking Management

# Create Booking
POST /api/bookings

# Get Booking Status
GET /api/bookings/{id}

# Cancel Booking
PUT /api/bookings/{id}/cancel

Payment Processing

# Stripe Webhook Endpoint
POST /api/payments/webhook

Example Request

User Registration:

POST /api/auth/signup
Content-Type: application/json

{
  "username": "john_doe",
  "email": "john@example.com",
  "password": "SecurePass123!",
  "role": "USER"
}

For detailed API documentation, visit the Swagger UI after running the application.


🀝 Contributing

Contributions are currently not accepted as this is a proprietary project. However, feedback and suggestions are welcome!

If you find any bugs or have feature requests, please open an issue on GitHub.


πŸ“„ License

Copyright (c) 2025 ROHAN UKE

This project and its source code are the exclusive property of the author.
Unauthorized copying, modification, distribution, or commercial use is strictly prohibited.
Limited use is granted for learning, reviewing, and non-commercial demonstration purposes only.
No warranties are provided; use at your own risk.
For permissions beyond this notice, contact: **[your-email@example.com]**

πŸ™ Acknowledgments

  • Spring Framework Team - For the incredible Spring Boot ecosystem
  • Stripe - For robust payment processing APIs
  • PostgreSQL Community - For the reliable database system
  • Open Source Community - For the countless libraries and tools that made this project possible
  • Swagger/OpenAPI - For excellent API documentation capabilities

Special thanks to everyone who provided feedback and suggestions during development.


πŸ“ž Contact

For any inquiries, permissions, or collaboration opportunities:

GitHub Repository


Built with ❀️ by ARONAGENT

🌟 Star this repo if you find it helpful! ⭐


*"Code is like humor. When you have to explain it, it's bad."* β€” Cory House

About

A robust, enterprise-grade hotel management and booking platform designed to handle 10,000+ hotels with optimized dynamic pricing strategies. This system implements a monolithic architecture featuring advanced HotelMinPrice strategy that efficiently manages 900,000+ records (90 days Γ— 10,000 hotels) for lightning-fast search operations.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages