Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
G

go-coffeeshop

> 数据库
Open source

☕ A practical event-driven microservices demo built with Golang. Nomad, Consul Connect, Vault, and Terraform for deployment

4.4K stars0 likes3 views
WebsiteGitHub

About

☕ A practical event-driven microservices demo built with Golang. Nomad, Consul Connect, Vault, and Terraform for deployment

go-coffeeshop

An event-driven microservices coffee shop application has been written in Golang and deployed using Nomad, Consul Connect, Vault, and Terraform.

Other versions in .NET/C# can be found at:

  • .NET CoffeeShop with Microservices approach
  • .NET CoffeeShop with Modular Monolith approach

Technical stack

  • Backend building blocks
    • grpc-ecosystem/grpc-gateway/v2
    • labstack/echo/v4
    • rabbitmq/amqp091-go
    • kyleconroy/sqlc
      • pq
    • golang-migrate/migrate/v4
    • Utils
      • google/wire
      • ilyakaznacheev/cleanenv
      • golang.org/x/exp/slog
        • sirupsen/logrus
      • samber/lo
      • automaxprocs/maxprocs
      • stretchr/testify
      • golang/glog
      • google/uuid
      • google.golang.org/genproto
      • google.golang.org/grpc
      • google.golang.org/protobuf
  • Infrastructure
    • Postgres, RabbitMQ
    • Hashicorp Nomad, Consul (Connect), Vault, Terraform
    • docker and docker-compose
    • devcontainer for reproducible development environment

CoffeeShop - Choreography Saga

Services

No. Service URI
1 grpc-gateway http://localhost:5000
2 product service http://localhost:5001
3 counter service http://localhost:5002
4 barista service worker only
5 kitchen service worker only
6 web http://localhost:8888

Starting project

Jump into .devcontainer, then

bash
> make docker-compose

From vscode => Press F1 => Type Simple Browser View => Choose it and enter http://localhost:8888. Enjoy!!!

Screenshots

Home screen

Payment screen

Order list screen

HashiCorp stack deployment

The details of how to run it can be find at deployment with Nomad, Consult Connect and Vault.

Development

Clean Domain-driven Design

Generate dependency injection instances with wire

bash
> make wire

Generate code with sqlc

bash
> make sqlc

Debug Apps

Debug golang app in monorepo

Trouble shooting

Development project trouble shooting

Roadmap

  • ✅ Enhance project structure with DDD patterns
  • Add testing
  • Add and integrate with observability libs and tools
  • Add user identity management (authentication and authorization)
  • Add resiliency

Credits

  • project-layout
  • repository-structure
  • go-build-template
  • go-clean-template
  • emsifa/tailwind-pos

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Goalpinejsclean-architectureconsul-connectddd

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category数据库
PricingOpen source

> Related tools

P
PostgreSQL
功能强大的开源关系型数据库
R
Redis
内存数据结构存储,常用作缓存与队列
M
MySQL
广泛使用的开源关系型数据库