finds.dev← search

// the find

meysamhadeli/shop-golang-microservices

★ 566 · Go · MIT · updated Oct 2025

Practical microservices based on different software architecture and technologies like Golang, CQRS, Vertical Slice Architecture, Docker, RabbitMQ, OpenTelemetry and Postgresql.

A reference implementation of Go microservices using vertical slice architecture, CQRS with a mediator pattern, RabbitMQ for async messaging, and gRPC for inter-service calls. It's aimed at Go developers coming from .NET/Java backgrounds who want to see these patterns translated into idiomatic-ish Go. The domain is a toy shop with product, inventory, and identity services.

The vertical slice structure is well-executed — each feature owns its command/query, handler, endpoint, and DTOs in one folder, which makes adding features without touching shared code genuinely easy. Testcontainers usage for integration tests is the right call; spinning up real Postgres and RabbitMQ instances means the tests actually catch integration bugs. The uber-fx wiring and OpenTelemetry tracing with Jaeger are properly integrated, not bolted on as an afterthought. The problem-details error handler gives consistent RFC 7807 error payloads across all services.

The mediator pattern is a C#/Java import that fights Go's conventions — Go's interface-based dispatch is simpler and more idiomatic than a generic mediator bus, and the added indirection here mostly obscures the call graph without buying much. The outbox and inbox patterns are listed as TODO, which means at-least-once delivery for RabbitMQ messages isn't actually guaranteed — if a service crashes after writing to the DB but before publishing, the event is lost. There's no docker-compose for the full application stack, only infrastructure, so you can't actually run the whole thing with one command as the README implies. The OAuth2 implementation uses go-oauth2/oauth2, a relatively obscure library, rather than a standard JWT approach that integrates more naturally with the Echo middleware ecosystem.

View on GitHub →

// 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 →