The client/server contract shape decision for a TypeScript app — tRPC vs REST route handlers (Next.js `app/api/*/route.ts` or a separate Nest.js/Express backend). tRPC gives end-to-end type safety with zero codegen when client and server are both TypeScript in the same monorepo; REST is required the moment a non-TS client, a public API, or a versioned/OpenAPI contract enters the picture. Covers procedure design, Zod input validation, and the error-handling shape for both.