{"id":13461329,"url":"https://github.com/thangchung/go-coffeeshop","last_synced_at":"2025-05-15T01:07:51.863Z","repository":{"id":64019050,"uuid":"538130130","full_name":"thangchung/go-coffeeshop","owner":"thangchung","description":"☕ A practical event-driven microservices demo built with Golang. Nomad, Consul Connect, Vault, and Terraform for deployment","archived":false,"fork":false,"pushed_at":"2023-05-10T01:17:45.000Z","size":2510,"stargazers_count":4220,"open_issues_count":13,"forks_count":438,"subscribers_count":42,"default_branch":"main","last_synced_at":"2025-04-13T22:39:39.772Z","etag":null,"topics":["alpinejs","clean-architecture","consul-connect","ddd","dependency-injection","echo-framework","event-driven-architecture","event-driven-microservices","golang","grpc-gateway","microservices","nomad","postgresql","rabbitmq","sqlc","terraform","vertical-slice-architecture","wire"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thangchung.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2022-09-18T14:10:42.000Z","updated_at":"2025-04-13T11:03:57.000Z","dependencies_parsed_at":"2024-01-06T14:03:50.867Z","dependency_job_id":null,"html_url":"https://github.com/thangchung/go-coffeeshop","commit_stats":{"total_commits":60,"total_committers":1,"mean_commits":60.0,"dds":0.0,"last_synced_commit":"22d33190a0cf81630878e47bafae2de7c0abb783"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thangchung%2Fgo-coffeeshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thangchung%2Fgo-coffeeshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thangchung%2Fgo-coffeeshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thangchung%2Fgo-coffeeshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thangchung","download_url":"https://codeload.github.com/thangchung/go-coffeeshop/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254254041,"owners_count":22039792,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alpinejs","clean-architecture","consul-connect","ddd","dependency-injection","echo-framework","event-driven-architecture","event-driven-microservices","golang","grpc-gateway","microservices","nomad","postgresql","rabbitmq","sqlc","terraform","vertical-slice-architecture","wire"],"created_at":"2024-07-31T11:00:34.611Z","updated_at":"2025-05-15T01:07:46.851Z","avatar_url":"https://github.com/thangchung.png","language":"Go","funding_links":[],"categories":["Go","git repos","Demo and Learning Resources"],"sub_categories":["Benchmarks"],"readme":"# go-coffeeshop\n\nAn event-driven microservices coffee shop application has been written in Golang and deployed using Nomad, Consul Connect, Vault, and Terraform.\n\nOther versions in .NET/C# can be found at:\n\n- [.NET CoffeeShop with Microservices approach](https://github.com/thangchung/coffeeshop-on-nomad)\n- [.NET CoffeeShop with Modular Monolith approach](https://github.com/thangchung/coffeeshop-modular)\n\n## Technical stack\n\n- Backend building blocks\n  - [grpc-ecosystem/grpc-gateway/v2](https://github.com/grpc-ecosystem/grpc-gateway)\n  - [labstack/echo/v4](https://github.com/labstack/echo)\n  - [rabbitmq/amqp091-go](https://github.com/rabbitmq/amqp091-go)\n  - [kyleconroy/sqlc](https://github.com/kyleconroy/sqlc)\n    - [pq](github.com/lib/pq)\n  - [golang-migrate/migrate/v4](https://github.com/golang-migrate/migrate)\n  - Utils\n    - [google/wire](github.com/google/wire)\n    - [ilyakaznacheev/cleanenv](https://github.com/ilyakaznacheev/cleanenv)\n    - golang.org/x/exp/slog\n      - [sirupsen/logrus](https://github.com/sirupsen/logrus)\n    - [samber/lo](https://github.com/samber/lo)\n    - [automaxprocs/maxprocs](go.uber.org/automaxprocs/maxprocs)\n    - [stretchr/testify](github.com/stretchr/testify)\n    - golang/glog\n    - google/uuid\n    - google.golang.org/genproto\n    - google.golang.org/grpc\n    - google.golang.org/protobuf\n- Infrastructure\n  - Postgres, RabbitMQ\n  - Hashicorp Nomad, Consul (Connect), Vault, Terraform\n  - docker and docker-compose\n  - devcontainer for reproducible development environment\n\n## CoffeeShop - Choreography Saga\n\n![coffeeshop](docs/coffeeshop.svg)\n\n## Services\n\nNo. | Service | URI\n--- | --- | ---\n1 | grpc-gateway | [http://localhost:5000](http://localhost:5000)\n2 | product service | [http://localhost:5001](http://localhost:5001)\n3 | counter service | [http://localhost:5002](http://localhost:5002)\n4 | barista service | worker only\n5 | kitchen service | worker only\n6 | web | [http://localhost:8888](http://localhost:8888)\n\n## Starting project\n\nJump into [`.devcontainer`](https://code.visualstudio.com/docs/devcontainers/containers), then\n\n```bash\n\u003e make docker-compose\n```\n\nFrom `vscode` =\u003e Press F1 =\u003e Type `Simple Browser View` =\u003e Choose it and enter [http://localhost:8888](http://localhost:8888).\nEnjoy!!!\n\n## Screenshots\n\n### Home screen\n\n![home_screen](docs/home_screen.png)\n\n### Payment screen\n\n![payment_screen](docs/payment_screen.png)\n\n### Order list screen\n\n![order_list_screen](docs/order_list_screen.png)\n\n## HashiCorp stack deployment\n\n![coffeeshop_hashicorp](docs/coffeeshop_hashicorp.svg)\n\nThe details of how to run it can be find at [deployment with Nomad, Consult Connect and Vault](build/README.md).\n\n## Development\n\n### Clean Domain-driven Design\n\n![clean_ddd](docs/clean_ddd.svg)\n\n### Generate dependency injection instances with wire\n\n```bash\n\u003e make wire\n```\n\n### Generate code with sqlc\n\n```bash\n\u003e make sqlc\n```\n\n### Debug Apps\n\n[Debug golang app in monorepo](https://github.com/thangchung/go-coffeeshop/wiki/Golang#debug-app-in-monorepo)\n\n### Trouble shooting\n\n[Development project trouble shooting](https://github.com/thangchung/go-coffeeshop/wiki#trouble-shooting)\n\n## Roadmap\n\n- ✅ Enhance project structure with DDD patterns\n- Add testing\n- Add and integrate with observability libs and tools\n- Add user identity management (authentication and authorization)\n- Add resiliency\n\n## Credits\n\n- [project-layout](https://github.com/golang-standards/project-layout)\n- [repository-structure](https://peter.bourgon.org/go-best-practices-2016/#repository-structure)\n- [go-build-template](https://github.com/thockin/go-build-template)\n- [go-clean-template](https://github.com/evrone/go-clean-template)\n- [emsifa/tailwind-pos](https://github.com/emsifa/tailwind-pos)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthangchung%2Fgo-coffeeshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthangchung%2Fgo-coffeeshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthangchung%2Fgo-coffeeshop/lists"}