About This Architecture
Hotel booking REST API architecture using Spring Boot with layered separation of concerns across controllers, services, and data persistence. Client requests flow through the Spring Boot REST API to controllers, which delegate to booking and payment services that interact with PostgreSQL and a mock payment gateway. This three-tier pattern isolates business logic from HTTP handling and database operations, enabling independent testing and maintenance of each layer. Fork this diagram on Diagrams.so to customize service boundaries, add authentication middleware, or integrate a real payment processor. The mock gateway approach is ideal for development and staging environments before connecting production payment systems.