跳至主内容
版本:11.x

示例应用

非官方测试版翻译

本页面由 PageTurner AI 翻译(测试版)。未经项目官方认可。 发现错误? 报告问题 →

官方

Node.js

ExampleDescriptionLinks
MinimalHello world server and clientSource · CodeSandbox
Standalone ServerCustom HTTP server with WebSocket supportSource · CodeSandbox
Content TypesBinary, text, and JSON content type handlingSource · CodeSandbox
Lazy LoadingLazy-loading routes with dynamic importsSource · CodeSandbox
SOAService-oriented architecture with multiple tRPC servicesSource · CodeSandbox
OpenAPI CodegenGenerate a typed REST client from a tRPC router via OpenAPISource
Kitchen SinkComprehensive examples covering many featuresSource · CodeSandbox

React

ExampleDescriptionLinks
Minimal ReactNode.js server + Vite React client monorepoSource · CodeSandbox
Express + ReactExpress server with React client using React QuerySource · CodeSandbox

Next.js

ExampleDescriptionLinks
Prisma StarterFull-stack with Prisma, E2E testing, ESLint, and Tailwind CSSSource · Demo · CodeSandbox
Minimal StarterBare-bones Next.js + tRPC setupSource · CodeSandbox
TodoMVCTodoMVC with SSG and PrismaSource · Demo · CodeSandbox
WebSocketsPrisma, WebSockets, NextAuth, and subscriptionsSource · Demo · CodeSandbox
SSE ChatStreaming chat with Server-Sent Events and Drizzle ORMSource · CodeSandbox
Big RouterLarge router with code generationSource · CodeSandbox
Edge RuntimetRPC on Next.js Edge RuntimeSource · CodeSandbox
FormDataForm handling with React Hook Form and ZodSource · CodeSandbox
WebSocket EncoderWebSockets with MessagePack binary encodingSource · CodeSandbox

Serverless

ExampleDescriptionLinks
Lambda + API GatewayAWS Lambda with API GatewaySource · CodeSandbox
Lambda StreamingAWS Lambda + API Gateway with streaming responsesSource · CodeSandbox
Lambda Function URLsAWS Lambda with Function URLsSource · CodeSandbox
Cloudflare WorkerstRPC on Cloudflare WorkersSource · CodeSandbox
Vercel Edge RuntimetRPC on Vercel Edge RuntimeSource · CodeSandbox
Deno DeploytRPC client on Deno DeploySource · CodeSandbox

其他生态系统

ExampleDescriptionLinks
ExpressMinimal Express + tRPC setupSource · CodeSandbox
FastifyFastify with WebSocket supportSource · CodeSandbox
BuntRPC server and client on BunSource · CodeSandbox
Nuxt 3Nuxt 3 integration with trpc-nuxtSource · CodeSandbox

社区

备注

社区示例由各自作者维护,可能未更新至最新的 tRPC 版本。请查看每个项目的 README 文件以确认版本兼容性。

框架

ExampleDescriptionLinks
create-t3-turboT3 Stack with Expo and TurborepoSource · CodeSandbox
SvelteKit + PrismaSvelteKit integration with PrismaSource · CodeSandbox

集成

ExampleDescriptionLinks
Separate BE/FESeparate backend and frontend repositoriesBackend (Express) · Frontend (Vite)