finds.dev← search

// the find

ThreeDotsLabs/wild-workouts-go-ddd-example

★ 6,368 · Go · MIT · updated Nov 2025

Go DDD example application. Complete project to show how to apply DDD, Clean Architecture, and CQRS by practical refactoring.

A Go fitness booking app used as a teaching vehicle for applying DDD, Clean Architecture, and CQRS incrementally through a series of refactoring articles. Each article corresponds to a tagged release, so you can literally diff your way through the architecture evolution. Aimed at Go developers who learn better from working code than from abstract diagrams.

The versioned-release approach is genuinely useful — you can checkout v1.0 vs v2.5 and see exactly what changed when CQRS was introduced, not just read about it. The domain layer for the trainer service is well-structured: `internal/trainer/domain/hour/` keeps business rules separate from persistence with a clean repository interface. The decorator pattern in `internal/common/decorator/` for logging and metrics wrapping commands and queries is a practical pattern most codebases never bother to extract. Full local stack via docker-compose with a Firestore emulator means you can actually run it without a GCP account.

Firestore as the primary database is a weird choice for illustrating DDD — document stores with their denormalization requirements actively fight against aggregate-driven design, and the MySQL repository in `adapters/hour_mysql_repository.go` feels like an afterthought that was never finished. The series is incomplete; the README says 'more articles are on the way' but the last commit was late 2025 and several articles trail off mid-thought. The users service (`internal/users/`) didn't get the DDD refactor treatment — it's still a flat struct dump compared to trainer and trainings, which makes the codebase inconsistent as a reference. No event sourcing or event bus despite the CQRS framing, so the C in CQRS is really just 'put commands in a struct' rather than a full async command pipeline.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →