Skip to content

cena261/traveloka-clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Traveloka Clone - Project Discontinuation Notice

Project Status: Development Suspended

After considerable effort and progress on this ambitious travel booking platform clone, I have made the difficult decision to suspend active development. The project has grown significantly in complexity, and the technology stack requirements have expanded beyond what I can currently maintain as a solo developer. However, I believe the groundwork laid here could be valuable for others interested in building similar systems or learning from this architecture.

What Was Accomplished

Database Foundation

The project successfully implemented the first 5 database migrations out of a planned 25, establishing the core data model:

  • V1 to V5 completed: Database extensions, schemas, common types, IAM tables, geographic data with PostGIS, and core business entities
  • PostgreSQL 16 with PostGIS: Full geographic capabilities for location-based searches
  • Multi-schema architecture: Clean separation between business domains

Module Development

Two modules were completed:

  • Common Module: Shared utilities, base entities, configurations, and cross-cutting concerns
  • IAM Module: Identity and Access Management with Keycloak integration (partially completed)

Technology Stack

The project uses a comprehensive modern technology stack suitable for enterprise-scale applications:

Core Technologies

  • Java 17 with Spring Boot 3.2.x
  • PostgreSQL 16 with PostGIS extension for geographic data
  • Redis 7 for session management and caching
  • Elasticsearch 8 for full-text search and autocomplete
  • MinIO for object storage (images, documents)
  • Keycloak 25 for identity and access management
  • Docker and Docker Compose for containerization

Spring Ecosystem

  • Spring Data JPA with Hibernate Spatial
  • Spring Security with JWT authentication
  • Spring Cache abstraction
  • Spring Validation
  • Spring Async for background processing

Development Tools

  • Flyway for database migrations
  • MapStruct for DTO mapping
  • Lombok for reducing boilerplate
  • Maven for dependency management
  • TestContainers for integration testing

External Service Integrations

  • MailHog for email testing in development
  • pgAdmin for database management
  • Kibana for Elasticsearch visualization

Architecture Overview

The project follows a modular monolith architecture with clear separation of concerns:

Layered Architecture

Each module strictly follows a 4-layer architecture:

  1. Entity Layer: JPA entities mapping to database tables
  2. Repository Layer: Data access using Spring Data JPA
  3. Service Layer: Business logic and transaction management
  4. Controller Layer: REST API endpoints

Module Structure

The planned architecture consists of 11 core business modules and 3 support modules:

Core Business Modules:

Module Purpose Database Migration Status
iam Identity & Access Management V3 Partially Complete
inventory Partners, Properties, Airlines V5 Planned
geo Geographic/Location Services V4 Planned
media Media/File Management V6 Planned
pricing Dynamic Pricing Engine V7 Planned
availability Availability Calendar V8 Planned
booking Booking Lifecycle V9 Planned
payment Payment Processing V10 Planned
review Reviews & Ratings V11 Planned
notify Notifications/Communications V12 Planned
analytics Analytics & Business Intelligence V13, V15 Planned

Support Modules:

  • common: Shared utilities and configurations (Complete)
  • integration: External system integrations
  • search: Elasticsearch-based search functionality

Database Migration Roadmap

The project includes a comprehensive 25-phase database migration plan:

Phase 1: Foundation (V1-V5) - COMPLETED

Basic setup with extensions, schemas, core types, IAM tables, geographic data, and business entities.

Phase 2: Business Logic (V6-V15) - PLANNED

Implementation of media management, pricing engine, availability calendar, booking lifecycle, payment processing, reviews, notifications, search analytics, external integrations, and business intelligence.

Phase 3: Performance (V16-V20) - PLANNED

Performance optimizations including strategic indexing, table partitioning, Vietnamese full-text search, spatial indexes, and materialized views.

Phase 4: Advanced Features (V21-V25) - PLANNED

Advanced features including audit logging, stored procedures, data integrity constraints, caching strategies, and monitoring.

Development Methodology

The project was developed using Spec-Driven Development with the following approach:

  1. Specification First: Detailed specifications before implementation
  2. Test-Driven Development: Tests written before code
  3. Constitutional Principles: Strict architectural guidelines
  4. Modular Development: Each module developed independently

For Future Contributors

If you wish to continue this project, here are the recommended next steps:

Immediate Priorities

  1. Complete the IAM module implementation
  2. Implement the Geographic (geo) module as it's foundational
  3. Build the Inventory module for property management
  4. Establish the Search module with Elasticsearch

Technical Considerations

  • The database schema is well-designed and should be followed
  • Keycloak integration requires careful configuration
  • Redis session management needs proper TTL settings
  • PostGIS queries need optimization for performance
  • Vietnamese language support requires special handling in Elasticsearch

Challenges to Address

  • Complexity Management: The technology stack is extensive and requires expertise in multiple areas
  • Performance Optimization: Geographic searches and availability queries need careful optimization
  • Integration Overhead: Multiple external services require coordination
  • Testing Strategy: Comprehensive testing with TestContainers can be resource-intensive

Development Environment Setup

The project includes Docker Compose configurations for all services. To start:

  1. Clone the repository
  2. Navigate to the docker directory
  3. Run docker-compose up -d
  4. Apply database migrations with Flyway
  5. Configure Keycloak realm

Why Development Stopped

The project scope expanded significantly as I attempted to create a production-ready system. The combination of multiple complex technologies, the need for extensive integration work, and the requirement for comprehensive testing made it challenging to continue as a solo developer. The architecture is sound, but the implementation effort required exceeds available resources.

Lessons Learned

  1. Start Smaller: A microservices approach might have allowed for more incremental progress
  2. Technology Stack: While comprehensive, the stack might be overengineered for initial development
  3. Modular Monolith: The architecture is solid but requires significant upfront investment
  4. Documentation: Spec-driven development created excellent documentation but added overhead
  5. Please: Take good care of your mental health — I’ve spent nights sitting in a corner, crying while trying to build this project.

Contact

If you're interested in continuing this project or have questions about the implementation decisions, feel free to open an issue in the repository. While I won't be actively developing, I'm happy to provide context and guidance where possible.

License

This project is released under the MIT License, allowing anyone to use, modify, and distribute the code freely.


This project represents months of planning and initial development. While it won't reach completion under my stewardship, I hope it serves as a valuable reference or starting point for others interested in building similar systems. The architecture decisions, database design, and module structure reflect industry best practices and could be adapted for various travel or booking platforms.
Nuoc mat anh roi cuoc choi ket thuc

— Cena Nguyen
Original Author & Architect

About

Booking platform clone built with Spring Boot & React

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors