// the find
vardius/go-api-boilerplate
Go Server/API boilerplate using best practices DDD CQRS ES gRPC
A Go microservices boilerplate wiring together DDD, CQRS, and event sourcing with gRPC inter-service communication, Kubernetes deployment via Helm/Terraform, and OAuth2 authentication. It's aimed at Go developers who want a running example of these patterns rather than a blank template. Last meaningful commit was early 2023, so treat it as a learning reference, not a foundation for new production work.
The layered package structure (domain / application / infrastructure / interfaces) is genuinely clean and follows hexagonal architecture without being overengineered. The pluggable persistence layer using build tags (mysql/mongo/memory) is a practical pattern that's easy to follow. The Terraform + Helm setup covers the full Kubernetes deployment story end-to-end, not just the app code. The event sourcing implementation in pkg/domain and pkg/eventstore is small enough to actually read and understand, which is rare for boilerplates of this type.
Abandoned since February 2023 — Go 1.21+ generics could simplify a lot of the repetitive repository code, and the dependency tree is likely stale with known CVEs unfixed. The auth token is passed as a query parameter (`?authToken=...`) in the example, which is a textbook mistake — tokens in URLs land in server logs and browser history. The in-memory event bus means there's no durability or replay capability without wiring in a real broker, and that wiring isn't provided. MySQL as the default persistence choice for event sourcing is an odd call given how poorly relational databases handle append-only event streams at scale.