Index Benjamin Fabri.

trpcgo.

A Go implementation of the tRPC protocol enabling end-to-end type safety between a Go backend and a TypeScript frontend.

Year
2026
Role
Open-source · sole maintainer
Stack
Go · TypeScript · tRPC · Code Generation · Zod
trpcgo. Fig. 01

More links

Key features

  • Support for queries, mutations, and subscriptions (SSE streaming) with typed input/output.
  • Automatic TypeScript type and Zod schema generation from Go code via static analysis and reflection.
  • Global and per-procedure middleware, with composition through base procedures.
  • CLI with watch mode for live regeneration during development.
  • No framework dependency, built on standard net/http.
  • Input validation compatible with go-playground/validator.
  • Error handling compliant with the tRPC protocol.
  • Batch request support.

Details

trpcgo is a Go library implementing the tRPC protocol that brings end-to-end type safety to full-stack applications. Define your API types once in Go, and trpcgo automatically generates a fully-typed TypeScript AppRouter. The frontend uses standard @trpc/client and @trpc/react-query without any modification. The Go backend stays fully transparent and interchangeable with a classic TypeScript tRPC backend.

Toolbelt

Go
Library + CLI
TypeScript
Generated client
tRPC
Protocol
Code Generation
AppRouter
Zod
Schema validation
Next project
Clash of Dev