How ecibienestar/circonio-booking-loans-services works
Project Type and Purpose
• This is a Spring Boot-based, monolithic RESTful backend service that manages room reservations and item loans.
• There is no dedicated “frontend” code here; the module exposes HTTP endpoints consumed by external clients (web UI, mobile app, scripts).
File Structure
• Top-level artifacts:
• Maven wrapper, pom.xml – build & dependency management
• README, .github/workflows – CI/CD pipelines (GitHub Actions, Azure)
• src/main/java/com/booking:
• config (CorsConfig, SwaggerConfig)
• controller (BookingController, HallController, ItemController)
• service (BookingService, HallService, etc.)
• repository (Spring Data JPA interfaces)
• entity + dto subpackages
• exception handlers
• src/main/resources/application.properties – runtime configuration (DB, app name)
Extract Architectural Insights from the README
• Layered, modular REST approach
• Uses PostgreSQL via Spring Data JPA
• CI/CD with GitHub Actions + Azure Pipelines / App Service
• Swagger UI for API docs
Main Components & Interactions
a. Client Layer
• External Client (Web/mobile)
• Swagger UI (interactive API docs)
b. API Layer
• Controllers (REST endpoints)
c. Business Logic Layer
• Services implementing use-cases (bookings, loans, halls, items)
d. Data Access Layer
• Repositories (Spring Data JPA)
• Entities / DTO conversion
e. Persistence
• PostgreSQL Database
f. Infrastructure & Tools (sidecar/external)
• GitHub Actions / Azure Pipelines
• Azure App Service (hosting)
• SonarCloud (code quality)
• JaCoCo (coverage reports)
Relationships & Data Flow
• Controller → Service (invoke business logic)
• Service → Repository (CRUD on Entities)
• Repository → Database (SQL queries)
• Database → Repository → Service → Controller → Client (HTTP response)
• Swagger UI wired into Controller layer
• CI/CD pipelines triggered on Git events → build/test/deploy to Azure
Architectural Patterns & Principles
• Layered architecture (Controller → Service → Repository)
• Dependency Injection (Spring Boot)
• DTO pattern for request/response separation
• Exception handling via custom exceptions
• Configuration via property files
• Automated testing (JUnit 5) and quality gates (SonarCloud)
Essential Elements
• Clear labels: e.g., “BookingController,” “BookingService,” “BookingRepository”