百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

go-coffeeshop

> 数据库
开源

☕ 一个基于 Golang 构建的实用的事件驱动微服务演示。部署时使用 Nomad、Consul Connect、Vault 和 Terraform

4.4K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

☕ 一个基于 Golang 构建的实用的事件驱动微服务演示。部署时使用 Nomad、Consul Connect、Vault 和 Terraform

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

> 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

> make wire

Generate code with sqlc

> 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 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Goalpinejsclean-architectureconsul-connectddd

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类数据库
定价开源

> 相关工具

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