Template for build microservice with hexagonal architecture based on Quarkus framework
The idea was:
- Use this template for create a new repo on gh,
- give a new name to the project
- useing always the same structure (domain -> application -> adapters -> boot),
- launch script (
init-micros.sh) to personalize your micro (possibly using the name of the project as__MICROS_TEMPLATE__name), - already have a little working flow (
/api/v1/greetings).
! if you are using intelliJ idea, after launching the init script, close the IDE, delete the .idea directory and re open it
- JDK 21+ (atm)
- Maven (using 3.9.11
mvnwatm) - Any shell supporting
bash
After init, the structure will be:
<project-name>
├─ pom.xml # parent POM (packaging=pom)
├─ <project-name>-domain # domain (business logic isolated)
├─ <project-name>-application # use case + ports
├─ <project-name>-inbound-adapter # REST API, consumer
├─ <project-name>-outbound-adapter # DB, client, producer
└─ <project-name>-boot # modulo runtime Quarkus
dependecy schemas:
boot ──┬──> inbound-adapter ─┐
└──> outbound-adapter ─┴──> application ───> domain
This project is licensed under the Apache License 2.0.
Copyright © 2025 Andrea Ciambella