Worked example · API & Backend
One typed API contract, two teams that stop breaking each other
How we make a Protobuf + buf contract the single source of truth between a Go backend and a TypeScript frontend, so API drift becomes a compile error instead of a production incident.
- End-to-end type safety from the Go server to the browser
- API drift caught at compile time, not in production
- Front and back end shipping on independent cadences
A representative example: the kind of problem we solve and how we approach it, not a specific client engagement.
The problem
It's a common split: a Go backend and a TypeScript frontend, each with its own idea of what the API looks like. The contract lives in a wiki page and a lot of tribal knowledge. Every other sprint a renamed field or a changed shape breaks the frontend in production, and the two teams drift into a slow, defensive release train to avoid surprising each other.
How we approach it
We make the API contract the source of truth with Protobuf and buf, and generate both sides from it: a Connect server interface in Go and a typed Connect-ES client in TypeScript. A breaking-change check in CI makes an incompatible change impossible to merge by accident.
Because the client is generated, a renamed field becomes a compile error in the frontend, caught in seconds, not in production a week later.
Why it holds up
API drift stops reaching production, because the compiler catches it first. With the contract enforced rather than documented, the teams can dismantle the release train and ship independently, each confident the other can't silently break them.