First tagged release of the go-ddd template.
Highlights
- Domain layer: aggregates with factory methods,
Moneyvalue object (integer cents + ISO currency — no floats for money), validated-entity pattern, domain events - Race-safe idempotency: atomic key reservation via
INSERT ... ON CONFLICT DO NOTHING, cached replay, payload-mismatch rejection (422), crash-TTL takeover - Transactional outbox: domain events persisted in the same transaction as the aggregate, polling relay with at-least-once delivery
- CQRS foundation: explicit command/query flows with per-use-case DTOs
- Modern stack: Go 1.26, Echo v4, pgx/v5 + sqlc, golang-migrate, testcontainers integration tests
- Ops-ready:
/healthz+/readyzprobes, OpenAPI spec, structured slog logging, graceful shutdown, distroless Docker image, one-commandmake docker-up
Container image
docker pull ghcr.io/sklinkert/go-ddd:v1.0.0
See the README for a 30-second API walkthrough and DDD_CQRS_PRINCIPLES.md for the full pattern guide.