Multi-Tenant PMS, Booking Engine & OTA Integration
A production-grade multi-tenant hotel booking engine API with an enterprise payment processing system and a comprehensive admin dashboard. Built on PHP 8.4 and Laravel with Octane for high-throughput request handling across multiple hotel properties with complete tenant isolation. The core booking flow uses saga-based distributed transactions with Server-Sent Events streaming for real-time client updates, recovery checkpoints for crash resilience, and price verification with fraud tolerance thresholds. A dynamic pricing engine handles per-room, per-person, and package modes with tax calculations (VAT brackets, municipality tax, company overrides), discount stacking, children pricing, and length-of-stay discounts. The generic search engine follows Clean Architecture with a 9-filter pipeline, specification pattern composition, and dual-format responses (JSON + Protocol Buffers). Enterprise capabilities include multi-gateway payment processing (TAP, Stripe, PayPal, Adyen, Network International, Tabby, Tamara) with 10+ regional payment methods, a Livewire admin dashboard covering hotel, room, rate, payment, user, and system management, multi-channel notifications with template registry and saga compensation, and an analytics engine with 11 statistical functions and concurrent metric processing. Code quality enforced at PHPStan level 9 with zero baseline errors. Security features HMAC request signing with Argon2id hashing, dual-guard authentication (JWT + HMAC for API, session + OTP for dashboard), automated secret rotation, progressive rate limiting with blocking, and nightly security audits.
Major features and technical achievements.
Saga-orchestrated transactions with real-time streaming
Multi-gateway abstraction with regional payment methods
Framework-independent search with extensible backend architecture
Multi-mode pricing with tax calculation and discount stacking
Multi-layer security with cryptographic request signing
Full-featured management console built with Livewire
Multi-channel notifications with template registry
Statistical analysis with concurrent metric processing
Bulk rate management with real-time availability tracking
Each hotel chain sees only their own data
Component-level health checks and multi-language content
Architectural patterns and design decisions.
Choreography-Based Transactions with SSE
Distributed transactions without a central coordinator. Each booking stage is autonomous with defined compensating actions and recovery checkpoints. Server-Sent Events stream real-time stage progress to clients. On failure, the system automatically executes reverse-order compensation (void or refund payments, cancel bookings) ensuring data consistency.
Clean Architecture with Filter Pipeline
Framework-independent search system with 4-layer separation (HTTP ā Application ā Domain ā Infrastructure). 9-filter pipeline processes criteria DTOs through composable stages. Supports multiple backends via strategy pattern.
Multi-Layer Protection
Three-layer defense against duplicate operations: Pipeline recovery points for stage-level resumption, webhook deduplication tables for external events, and state guards for payment operations. Ensures at-most-once semantics while maintaining eventual consistency.
Runtime Resolution
Factory classes resolve concrete implementations at runtime for payment gateways, file uploaders, notification channels, and health checkers. Configuration-driven resolution eliminates conditional logic and supports adding new providers without modifying existing code.
Interchangeable Algorithms
Interchangeable algorithm implementations for pricing calculations, payment gateway selection, and search backend routing. Each strategy conforms to a shared interface, allowing runtime selection based on configuration or context.
Data Access Abstraction
Consistent data access layer across booking, loyalty, payment, search, and saga domains. Repositories abstract persistence details, enabling testability and allowing storage implementations to change without affecting business logic.
Composable Query Rules
Business rules composed using fluent interface (spec1.and(spec2).or(spec3).not()). Builds complex queries from simple, reusable rules. Enables type-safe query composition without raw SQL.
Pluggable Engine Architecture
Strategy resolver routes searches to the appropriate backend. Currently using Database with architecture designed for adding new search engines (Algolia, MeiliSearch, etc.) without changing application logic. Unified result format regardless of backend.
Sequential Calculation
Prices flow through base calculation, then modifiers like taxes and discounts. New pricing logic slots in without touching existing code.
Multi-Source Abstraction
Factory-created query builders support Model, Builder, and Class-based entry points. Same search logic works across different data sources without code changes.
JSON & Protocol Buffers
Format negotiator parses Accept header for response format. Protocol Buffers provide 40-60% smaller payloads for mobile/IoT clients. Same data optimized for different use cases.
Stackable Adjustments
Taxes, promotions, and loyalty discounts applied in sequence. Each modifier checks if it applies before adjusting the price.
Configurable Per Rate Plan
Different pricing modes (per-room, per-person, package) selected based on how the rate plan is configured.