A learning project built while following the «Микросервисы, как в BigTech 2.0» course by Oleg Kozyrev.
It implements a small "rocket factory" domain as a set of Go microservices that communicate over gRPC, expose HTTP APIs via grpc-gateway, and persist data in PostgreSQL and MongoDB.
The repository is a Go workspace (go.work) composed of several modules:
| Module | Responsibility | Storage |
|---|---|---|
order |
Order lifecycle: create, pay, cancel, get | PostgreSQL |
inventory |
Parts catalog and availability | MongoDB |
payment |
Payment processing | — |
platform |
Shared infrastructure (logger, closer, gRPC, middleware) | — |
shared |
Generated API code and protobuf/OpenAPI contracts | — |
Services follow a layered architecture (api → service → repository →
client) with generated mocks for unit testing.
order ──gRPC──> inventory (check part availability)
order ──gRPC──> payment (process payment)
client ──HTTP──> order (via grpc-gateway)
- Go 1.24 with a multi-module workspace
- gRPC + grpc-gateway (HTTP/JSON) and protoc-gen-validate
- buf for protobuf management; ogen for OpenAPI
- PostgreSQL (order) and MongoDB (inventory)
- goose for SQL migrations
- mockery for test mocks
- Docker Compose for local infrastructure
- Task (Taskfile) for automation
- golangci-lint, gofumpt, gci for formatting and linting
- GitHub Actions for CI and test-coverage reporting
- Go 1.24+
- Docker & Docker Compose
- Task:
brew install go-task
The pinned CLI tools (buf, ogen, mockery, goose, linters, …) are installed
automatically into ./bin the first time a task that needs them runs.
Environment files are generated from the templates in deploy/env:
task env:generateThe committed *.env.template files contain local development defaults only
(localhost hosts and placeholder credentials) — replace them before any real
deployment.
# start infrastructure + services via Docker Compose (runs migrations)
task up-all
# ...or run a single service locally
go run ./order/cmd
# stop everything
task down-alltask format # gofumpt + gci
task lint # golangci-lint
task test # run tests
task test-coverage # run tests with coverage report
task gen # regenerate protobuf / OpenAPI / mocksSee Taskfile.yml for the full list of available commands.
MIT © Matvey Kolodin