Back to blog
Jul 2024·9 min read

gRPC in Go — Connect-ES, buf, and the Polyrepo Setup

My full setup for gRPC services in Go — the toolchain, proto management, and polyrepo code generation.

Building gRPC services in Go is pleasant once you have the right toolchain. Here's my setup.

The buf toolchain

buf replaces protoc entirely. One buf.gen.yaml generates Go server stubs, client code, and connect-go handlers. buf lint and buf breaking enforce proto quality in CI.

Polyrepo proto management

Each service owns its protos in a central proto directory with buf managed by a Makefile. Versioned proto modules avoid breaking changes across service boundaries.

Connect-ES

Connect-ES generates TypeScript client code from the same protos. One proto definition powers both Go backends and TypeScript frontends. No duplication, no drift.