Architecture Overview¶
System Architecture¶
The Gustaffo Reservations Application is built on a modern, modular architecture following best practices for Spring Boot applications. It uses a layered approach with clear separation of concerns between different components.
1 2 3 4 5 6 7 8 9 |
|
Core Components¶
- API Layer: REST controllers handling HTTP requests and SSE events
- Service Layer: Business logic implementation
- Data Access Layer: Repository interfaces for database operations
- External Integrations: Connectors to third-party services
- Security Layer: Authentication and authorization
Technology Stack¶
Backend¶
- Java 17
- Spring Boot 2.5.15
- Spring Security with OAuth2
- Spring Data JPA
- Hibernate with JCache
- Flyway for database migrations
Databases¶
- PostgreSQL (Production)
- H2 (Development/Testing)
Infrastructure¶
- Docker containerization
- AWS deployment
Testing¶
- Spock Framework
- JUnit
- Mockito
Communication Patterns¶
REST API¶
The application exposes RESTful endpoints for standard CRUD operations and business processes.
Server-Sent Events (SSE)¶
For real-time updates like room availability checking, the application uses Server-Sent Events to push data to clients as it becomes available.
Asynchronous Processing¶
Long-running operations like availability checks are processed asynchronously using CompletableFuture to improve responsiveness.