"The best way to predict the future is to implement it." β Alan Kay
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.
- π 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
- 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
- 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
| 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 |
- 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
- 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
Ensure you have the following installed:
- Java 17 or higher
- Maven 3.8+
- PostgreSQL 14+
- Git
- Stripe Account (for payment processing)
-
Clone the repository
git clone https://github.com/ARONAGENT/AirBnb_App_SpringBoot.git cd AirBnb_App_SpringBoot -
Configure Database
Create a PostgreSQL database:
CREATE DATABASE airbnb_db;
-
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
-
Build the Application
mvn clean install
-
Run the Application
mvn spring-boot:run
-
Access the Application
- API Base URL:
http://localhost:8080 - Swagger UI:
http://localhost:8080/swagger-ui.html
- API Base URL:
# Register User
POST /api/auth/signup
# Login User
POST /api/auth/login# 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}# Create Room
POST /api/hotels/{hotelId}/rooms
# Update Room
PUT /api/rooms/{id}
# Get Room Inventory
GET /api/rooms/inventory# Create Booking
POST /api/bookings
# Get Booking Status
GET /api/bookings/{id}
# Cancel Booking
PUT /api/bookings/{id}/cancel# Stripe Webhook Endpoint
POST /api/payments/webhookUser 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.
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.
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]**
- 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.
For any inquiries, permissions, or collaboration opportunities:
Built with β€οΈ by ARONAGENT
π Star this repo if you find it helpful! β











