finds.dev

meysamhadeli/shop-golang-microservices

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

View on GitHub

★ 566GoMITupdated Oct 2025

// the take

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.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
566
Forks
90
Language
Go
License
MIT
Last commit
9 Oct 2025

// nearby

If shop-golang-microservices isn't quite it.

All repos →