Skip to Content
Docs09 tRPC

tRPC overview (in our stack)

tRPC is our internal API layer between the browser UI and server-side logic. It provides:

  • end-to-end typing (client ↔ server)
  • a single place to enforce validation (Zod) + auth (middleware)
  • a clean boundary for calling internal microservices (server-side)

Mental model

Key concepts to learn (with docs)

Standard approach (what we’ll converge on)

  • Every procedure has:
    • input schema (Zod)
    • clear auth requirements (public vs protected)
    • consistent error mapping (developer logs vs user message)
  • Microservice calls happen inside procedures (or server-only helper modules called by procedures).

Exercises

  • content/exercises/04-trpc/01-protected-procedure.mdx
Last updated on