How gemacjr/quarkus-todo works
Project type and purpose
• This is a standalone backend service: a RESTful CRUD API (“Todo API”) built with Quarkus (Java 17).
• It exposes HTTP endpoints (Create/Read/Update/Delete) for “todo” items, uses Hibernate ORM (Panache) for persistence, supports H2 (dev) and PostgreSQL (prod), and ships with Swagger UI, health checks, metrics, and Docker containerization.
File structure
• Top‐level:
• Docker-related files (Dockerfile, docker-compose.yml, src/main/docker/*.Dockerfile.*)
• Maven wrapper and pom.xml (build tool and dependency management)
• README.md (project overview)
• src/main/java/com/swiftbeard/… follows a classic layered MVC‐style layout:
• resource/ → JAX-RS REST endpoints
• service/ → business logic
• mapper/ → DTO ↔ Entity conversions
• dto/ → API data transfer objects
• model/ → JPA entities
• exception/ → global error handling
• src/main/resources/application.properties (configuration)
• src/test/… (JUnit 5 + REST Assured integration tests)
README for additional insights
• Tech stack calls out Quarkus, Hibernate Panache, PostgreSQL/H2, SmallRye OpenAPI, CDI, Hibernate Validator, JUnit5, Docker, Docker Compose.
• Features: health checks, metrics, Swagger docs, native builds via GraalVM.
• Docker Compose ties together the API container and a PostgreSQL container on a shared network.
Detail is key
• Architectural elements: HTTP interface, business logic, persistence, configuration, observability (metrics/health), documentation (Swagger), containerization, and testing.
• Lay out components in “lanes” or “tiers” (e.g., Client Tier, Application Tier, Data Tier, Infra Tier).
• Special features: H2 vs. PostgreSQL profiles, native executable build, health/metrics endpoints on /q/health and /q/metrics, and Swagger UI endpoint.