System architecture PoC tuned for Go. The name Hexago was taken from Hexagonal Architecture.
- Hexagonal Architecture
pkg/controller
: Driving adapterspkg/infrastructure
: Driven adapterspkg/core
: Business logics
- Domain Driven Design
- Dependency Injection
- CQRS with Event Sourcing
- Go Standard Layout
API gateway module for hexago service.
Payment module for hexago service.
Includes common libraries of hexago modules.
- Run infrastructures using docker compose.
make infra
# 1) up
# 2) down
# 3) ps
# 4) logs
# 5) quit
# Please enter your choice: 1
- Add local dns to each insfrastructure for local development. Optional for docker environment.
sudo tee -a /etc/hosts > /dev/null <<EOT
127.0.0.1 mongodb
127.0.0.1 kafka1
127.0.0.1 kafka2
EOT
- Create kafka topics using kafka-ui.
donation-request
-
Prepare infrastructures above.
-
Build hexago modules.
make image-gateway
make image-payment
- Run hexago modules.
make run-gateway
make run-payment
-
Test scenarios.
-
Stop hexago modules.
make stop-gateway
make stop-payment