# Feature catalog — trpc/trpc

> Canonical page: https://codevetter.com/unpack/trpc/feature-catalog

# Feature catalog — trpc/trpc

Scanned commit 8b649ad874a8fe97c73962d4617912231b975736 (2026-09-17). Generated by codevetter codevetter 1.12.0 on 2026-09-22.

User-facing surface area is the procedure builder (query, mutation, subscription), a middleware pipeline with pluggable validators, several HTTP and WebSocket client links, React Query hook and options-object integrations, Next.js SSR helpers, and framework adapters. Examples demonstrate the same API on Next pages, the Next app router, Cloudflare Workers, Express, Fastify, AWS Lambda, Bun, Deno, and Nuxt. Ancillary products are an OpenAPI generator CLI, a codemod upgrade CLI, and TanStack Intent skills shipped inside the packages.
- ProcedureBuilder.input(), .output(), .use(), .query(), .mutation(), and .subscription() are the authoring API. createResolver appends a final middleware that awaits the user resolver. experimental_caller can wrap invoke. Calling the resulting procedure without a getRawInput option throws and points at server-side calls. — [packages/server/src/unstable-core-do-not-import/procedureBuilder.ts#L505-L610](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/procedureBuilder.ts#L505-L610) [packages/server/src/unstable-core-do-not-import/procedureBuilder.ts#L674-L703](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/procedureBuilder.ts#L674-L703)
- getParseFn accepts Standard Schema (~standard), Zod parseAsync/parse, Valibot functions, Yup validateSync, Superstruct create, ArkType assert, and custom functions. Input and output parsers are installed as middlewares by createInputMiddleware and createOutputMiddleware. — [packages/server/src/unstable-core-do-not-import/parser.ts#L84-L120](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/parser.ts#L84-L120) [packages/server/src/unstable-core-do-not-import/procedureBuilder.ts#L507-L519](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/procedureBuilder.ts#L507-L519)
- Routers are plain records. createRouterFactory flattens nested routers into _def.procedures keyed by dotted path, supports lazy() dynamic imports, and rejects duplicate keys and the reserved names then, call, and apply. mergeRouters concatenates records. — [packages/server/src/unstable-core-do-not-import/router.ts#L105-L135](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/router.ts#L105-L135) [packages/server/src/unstable-core-do-not-import/router.ts#L208-L221](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/router.ts#L208-L221) [packages/server/src/unstable-core-do-not-import/router.ts#L249-L356](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/router.ts#L249-L356) [packages/server/src/unstable-core-do-not-import/router.ts#L509-L511](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/router.ts#L509-L511)
- createCallerFactory returns a proxy caller that resolves ctx (value or function), looks up the procedure with getProcedureAtPath, and invokes it in-process. This is the server-side call path and is re-exported on the router as createCaller. — [packages/server/src/unstable-core-do-not-import/router.ts#L440-L494](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/router.ts#L440-L494) [packages/server/src/unstable-core-do-not-import/initTRPC.ts#L110-L114](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/initTRPC.ts#L110-L114)
- Client links implemented in packages/client include httpLink, httpBatchLink (default batching link), httpBatchStreamLink, httpSubscriptionLink, wsLink plus createWSClient, splitLink, loggerLink, retryLink, and unstable_localLink, which calls callProcedure in-process and never hits HTTP. — [packages/client/src/links/httpBatchLink.ts#L21-L28](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/client/src/links/httpBatchLink.ts#L21-L28) [packages/client/src/links/httpLink.ts#L76](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/client/src/links/httpLink.ts#L76) [packages/client/src/links/httpBatchStreamLink.ts#L35](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/client/src/links/httpBatchStreamLink.ts#L35) [packages/client/src/links/httpSubscriptionLink.ts#L65](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/client/src/links/httpSubscriptionLink.ts#L65) [packages/client/src/links/wsLink/wsLink.ts#L20](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/client/src/links/wsLink/wsLink.ts#L20) [packages/client/src/links/localLink.ts#L35-L42](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/client/src/links/localLink.ts#L35-L42) [packages/client/package.json#L43-L92](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/client/package.json#L43-L92)
- @trpc/react-query exports createTRPCReact, getQueryKey, getMutationKey, and createTRPCQueryUtils, and re-exports @trpc/client. It also ships ./rsc and ./server (ssgProxy) entry points for RSC and static helpers. — [packages/react-query/src/index.ts#L1-L10](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/react-query/src/index.ts#L1-L10) [packages/react-query/package.json#L35-L64](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/react-query/package.json#L35-L64)
- @trpc/tanstack-react-query exports createTRPCContext, createTRPCOptionsProxy, and useSubscription. The upgrade CLI's first transform is 'Migrate Hooks to xxxOptions API' and the second is 'Migrate context provider setup', optionally installing this package unless --skipTanstackQuery. — [packages/tanstack-react-query/src/index.ts#L1-L26](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/tanstack-react-query/src/index.ts#L1-L26) [packages/upgrade/src/bin/index.ts#L10-L62](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/upgrade/src/bin/index.ts#L10-L62)
- @trpc/next's package entry re-exports withTRPC and createTRPCNext for the Pages Router. App Router helpers are experimental and live in packages/server/src/adapters/next-app-dir.ts as experimental_nextAppDirCaller, experimental_redirect, and experimental_notFound. — [packages/next/src/index.ts#L1-L2](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/next/src/index.ts#L1-L2) [packages/server/src/adapters/next-app-dir.ts#L1-L7](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/adapters/next-app-dir.ts#L1-L7) [CONTRIBUTING.md#L105-L113](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/CONTRIBUTING.md#L105-L113)
- Subscriptions over HTTP are async iterables served as SSE. RootConfig.sse defaults enabled to true and accepts ping, maxDurationMs, emitAndEndImmediately, and client reconnect options. jsonl options configure httpBatchStreamLink. tracked() marks resumable events. The legacy sse() helper is deprecated in favor of tracked. — [packages/server/src/unstable-core-do-not-import/rootConfig.ts#L69-L88](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/rootConfig.ts#L69-L88) [packages/server/src/@trpc/server/index.ts#L62-L68](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/%40trpc/server/index.ts#L62-L68) [packages/server/src/unstable-core-do-not-import/http/resolveResponse.ts#L300-L368](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/http/resolveResponse.ts#L300-L368)
- Non-JSON bodies are first-class for octet streams: octetInputParser accepts Blob, Uint8Array, or File-like values and requires the parsed value to already be a ReadableStream. Batch JSON uses content-type application/json and a batch=1 query flag. — [packages/server/src/unstable-core-do-not-import/http/contentTypeParsers.ts#L10-L38](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/http/contentTypeParsers.ts#L10-L38) [packages/server/src/unstable-core-do-not-import/http/contentType.ts#L78-L86](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/src/unstable-core-do-not-import/http/contentType.ts#L78-L86)
- @trpc/openapi exports generateOpenAPIDocument(GenerateOptions) where exportName defaults to AppRouter, and paths such as /user.create are relative to an optional servers URL. The package bin is trpc-openapi. It also ships an intent bin, as do server, client, and next. — [packages/openapi/src/index.ts#L1-L3](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/openapi/src/index.ts#L1-L3) [packages/openapi/src/generate.ts#L33-L50](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/openapi/src/generate.ts#L33-L50) [packages/openapi/package.json#L8-L12](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/openapi/package.json#L8-L12)
- examples/next-prisma-starter exposes healthcheck plus post.list, post.byId, and post.add through pages/api/trpc/[trpc].ts via createNextApiHandler. The React client entry used by the minimal example is examples/minimal-react/client/src/main.tsx, and Playwright asserts the text 'tRPC user'. — [examples/next-prisma-starter/src/server/routers/_app.ts#L7-L15](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/next-prisma-starter/src/server/routers/_app.ts#L7-L15) [examples/next-prisma-starter/src/server/routers/post.ts#L24-L103](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/next-prisma-starter/src/server/routers/post.ts#L24-L103) [examples/next-prisma-starter/src/pages/api/trpc/[trpc].ts#L8-L22](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/next-prisma-starter/src/pages/api/trpc/%5Btrpc%5D.ts#L8-L22) [examples/minimal-react/client/src/main.tsx#L1-L9](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/minimal-react/client/src/main.tsx#L1-L9) [examples/minimal-react/test/smoke.test.ts#L1-L8](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/minimal-react/test/smoke.test.ts#L1-L8)
- examples/next-sse-chat is an app-router chat: GET and POST /api/trpc/[trpc] use fetchRequestHandler, NextAuth (GitHub or a mocked Credentials provider), Drizzle posts, and procedures post.add (authed), post.infinite, and post.onAdd (SSE subscription with tracked event ids). — [examples/next-sse-chat/src/app/api/trpc/[trpc]/route.ts#L8-L29](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/next-sse-chat/src/app/api/trpc/%5Btrpc%5D/route.ts#L8-L29) [examples/next-sse-chat/src/server/auth.tsx#L8-L69](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/next-sse-chat/src/server/auth.tsx#L8-L69) [examples/next-sse-chat/src/server/routers/post.ts#L8-L141](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/next-sse-chat/src/server/routers/post.ts#L8-L141) [examples/next-sse-chat/src/server/trpc.ts#L81-L96](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/examples/next-sse-chat/src/server/trpc.ts#L81-L96)
- README documents the product promise (typesafe APIs, no codegen, batching, subscriptions, React/Next/Express/Fastify adapters) and tells AI agents to install skills with npx @tanstack/intent@latest install. Package keywords include tanstack-intent and files lists include a skills directory. — [README.md#L41-L88](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/README.md#L41-L88) [packages/server/package.json#L191-L193](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/package.json#L191-L193) [packages/server/package.json#L235-L239](https://github.com/trpc/trpc/blob/8b649ad874a8fe97c73962d4617912231b975736/packages/server/package.json#L235-L239)

Every claim links to its cited files at the pinned commit. Citations identify source evidence; they do not establish runtime correctness. Independent CodeVetter scan — not reviewed by upstream maintainers.

## Public product links

- [CodeVetter](https://codevetter.com/)
- [Download](https://codevetter.com/download)
- [Documentation](https://codevetter.com/docs/)
- [Source](https://github.com/Codevetter/codevetter)
