How useraar/booking-management-application works
Main Components
• API Gateway / Controllers: Represent the REST endpoints (BookingController, FlightController, TestController, MyConfigController) that serve as entry points for the client requests.
• Service Layer: Encapsulated by the various service classes (BookingService, FlightService, PassengerService) which manage business logic.
• Data Access Layer (DAO/Repositories): Contains repository interfaces (BookingRepository, FlightRepository, PassengerRepository) that interface with the PostgreSQL database.
• Domain/Entities and DTOs: Include the entity classes (BookingEntity, FlightEntity, PassengerEntity) and DTO objects for requests and responses that model the data.
• Configuration and Exception Handling: Components such as MyConfigProperties and custom exceptions (EntityNotFoundException) support configuration management and error handling.
• Database & Migrations: PostgreSQL (often managed via Docker and referenced by docker-compose.yml) and database version control via Liquibase change logs.
• Infrastructure: Dockerfile, docker-compose.yml, and Gradle scripts (build.gradle.kts, gradlew, gradlew.bat) that support building, containerization, and deployment.
Relationships and Data Flow
• Service layer interactions with Data Access Components (Repositories) which perform CRUD operations on the database.
• Flow for both incoming requests (from API to service, then to repository, to the database) and outgoing responses.
• Where configuration settings (from MyConfigProperties) and exception management are tied into the overall flow.
Architectural Patterns and Technologies
• Layered Architecture (Controller -> Service -> Repository -> Database) is the fundamental pattern here.
• Use of Spring Boot for REST API creation and dependency injection.
• That JPA/Hibernate abstracts interaction with PostgreSQL.
• Integration with Liquibase for automated database migrations.
• Existence of Docker components (Dockerfile, docker-compose.yml) as enabling containerized deployment.
• Mention Gradle as the build automation tool that ties the code together.