MCPcopy Index your code
hub / github.com/thangchung/go-coffeeshop

github.com/thangchung/go-coffeeshop @v0.1.0 sqlite

repository ↗ · DeepWiki ↗ · release v0.1.0 ↗
406 symbols 874 edges 58 files 39 documented · 10%
README

go-coffeeshop

A coffee shop application with event-driven microservices has been written in Golang. Nomad, Consul Connect, Vault, and Terraform for deployment

Other version can be found at:

Technical stack

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 http://localhost:5003
5 kitchen service http://localhost:5004
6 web http://localhost:8080

Starting project

Jump into .devcontainer, then

> docker-compose -f docker-compose-full.yaml build
> docker-compose -f docker-compose-full.yaml up

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

Screenshots

Home screen

home_screen

Payment screen

payment_screen

Order list 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.

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

Extension points exported contracts — how you extend this code

ProductDomainService (Interface)
(no doc) [4 implementers]
internal/counter/domain/interfaces.go
KitchenOrderedEventHandler (Interface)
(no doc) [3 implementers]
internal/kitchen/features/orders/eventhandlers/kitchen_ordered.go
BaristaOrderedEventHandler (Interface)
(no doc) [3 implementers]
internal/barista/features/orders/eventhandlers/barista_ordered.go
Interface (Interface)
(no doc) [1 implementers]
pkg/logger/logger.go
ProductRepo (Interface)
(no doc) [1 implementers]
internal/product/domain/interfaces.go
Option (FuncType)
(no doc)
pkg/postgres/options.go
Option (FuncType)
(no doc)
pkg/rabbitmq/publisher/options.go
BaristaOrderUpdatedEventHandler (Interface)
(no doc) [3 implementers]
internal/counter/domain/interfaces.go

Core symbols most depended-on inside this repo

Error
called by 33
pkg/logger/logger.go
Info
called by 32
pkg/logger/logger.go
Fatal
called by 26
pkg/logger/logger.go
Close
called by 22
pkg/postgres/postgres.go
Handle
called by 10
internal/counter/domain/interfaces.go
LogError
called by 4
pkg/logger/logger.go
NewPublisher
called by 4
pkg/rabbitmq/publisher/publisher.go
CloseChan
called by 4
pkg/rabbitmq/publisher/publisher.go

Shape

Method 198
Function 119
Struct 65
Interface 15
TypeAlias 5
FuncType 4

Languages

Go93%
TypeScript7%

Modules by API surface

proto/gen/counter.pb.go67 symbols
proto/gen/product.pb.go49 symbols
proto/gen/common.pb.go39 symbols
cmd/web/app/js/script.js28 symbols
proto/gen/product_grpc.pb.go18 symbols
proto/gen/counter_grpc.pb.go18 symbols
pkg/logger/logger.go15 symbols
internal/counter/domain/interfaces.go9 symbols
proto/gen/product.pb.gw.go8 symbols
proto/gen/counter.pb.gw.go8 symbols
internal/counter/features/orders/repo/orders_postgres.go8 symbols
pkg/rabbitmq/consumer/options.go6 symbols

Dependencies from manifests, versioned

github.com/georgysavva/scanyv1.2.1 · 1×
github.com/hashicorp/errwrapv1.1.0 · 1×
github.com/ilyakaznacheev/cleanenvv1.3.0 · 1×
github.com/jackc/chunkreader/v2v2.0.1 · 1×

Datastores touched

postgresDatabase · 1 repos

For agents

$ claude mcp add go-coffeeshop \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact