Skip to content

🛠️ Blank μ-service with Hex Arch, DDD, SAGA, Outbox&Kafka

For full code, visit this Repository.

⚠️ Replace [blank] word with your Domain Name ⚠️

Using Lg5 Spring 1.0.0-alpha, JDK 21

More details

🚀 Build project

Install 1/1: Setup JDK 21.

sdk use java 21.0.2-amzn 

Install ½: Install the dependencies in your project.

mvn clean install 

🚀 Deploy with K8s

Use the infra repository blank-infra to deploy with K8s

📚Contents

🚀 Run locally

You can ...

Using makefile

Start with infrastructure

😀 To start the Kafka Cluster and Postgres.

make docker-up

⛔️ To the Kafka Cluster and Postgres stop or destroy:

make docker-down

Run APP

😀 To start the blank Service.

make run-app

blank API 1.0.0-alpha

👋 blank API, Port:8181

Username: None
Password: None

Database UI

👋 PgAdmin, Port:5013

Username: blanksystem@db.com
Password: blanksystem-db

Kafka UI

👋 Kafka UI, Port:9080

Username: None
Password: None

Contracts

  1. Open API
  2. Async API

AVRO MODELS from Avro Model definition

If you add a new Avro model, REMEMBER execute avro model again.

make run-avro-model

Logger & ELK

This project is prepared to send log files and process visualization with filebeat. You can specify the directory for stored the *.log files. Now, genera two file logs.

Simple log * [log.path]/[application_name]-simple.log

Complex log * [log.path]/[application_name]-complex.log

  • Specify the directory with log.path property.

Simple: Simple details about application logs. Complex: More details about application logs.

🧪 Testing Project

Sonar Results

✅ Checkstyle ¼: configuration that checks the Google coding conventions from Google Java Style.

make run-checkstyle 

🧪 Running Unit Test 2/4: Using JUnit 5.

make run-unit-test 

🌾 Running Integration Test ¾: Using Test Containers, JUnit 5 and Rest-Assured.

make run-integration-test 

🥒Running Acceptance Test 4/4: Using Cucumber, Test Containers, JUnit 5 and Rest-Assured.

make run-acceptance-test

Interaction with tests one-to-one

🧪 Run a Unit Test

make run-ut-spec TEST_NAME=BlankMessageListenerImplTest
Details: make run-ut-spec TEST_NAME=[TestNameTest]

🌾Run an Integration Test

make run-it-spec TEST_NAME=OtherRepositoryIT
Details: make run-it-spec TEST_NAME=[TestNameTest|TestNameIT]

🥒 Run an Acceptance Test

make run-at-spec TEST_NAME=StartAcceptanceT
Details: make run-at-spec TEST_NAME=[TestNameAcceptanceT]

⚠️ Any Test: Be careful, this option is slower.

make run-test-spec TEST_NAME=BlankMessageListenerImplTest
Details: make run-test-spec TEST_NAME=[TestNameTest|TestNameIT|TestNameAcceptanceT]

🥒 Acceptance Test Report

You can show the Acceptance Test Report Online.

⚖️ License

The MIT License (MIT). Please see License for more information.