Exemples d'applications
Traduction Bêta Non Officielle
Cette page a été traduite par PageTurner AI (bêta). Non approuvée officiellement par le projet. Vous avez trouvé une erreur ? Signaler un problème →
Officiels
Node.js
| Example | Description | Links |
|---|---|---|
| Minimal | Hello world server and client | Source · CodeSandbox |
| Standalone Server | Custom HTTP server with WebSocket support | Source · CodeSandbox |
| Content Types | Binary, text, and JSON content type handling | Source · CodeSandbox |
| Lazy Loading | Lazy-loading routes with dynamic imports | Source · CodeSandbox |
| SOA | Service-oriented architecture with multiple tRPC services | Source · CodeSandbox |
| OpenAPI Codegen | Generate a typed REST client from a tRPC router via OpenAPI | Source |
| Kitchen Sink | Comprehensive examples covering many features | Source · CodeSandbox |
React
| Example | Description | Links |
|---|---|---|
| Minimal React | Node.js server + Vite React client monorepo | Source · CodeSandbox |
| Express + React | Express server with React client using React Query | Source · CodeSandbox |
Next.js
| Example | Description | Links |
|---|---|---|
| Prisma Starter | Full-stack with Prisma, E2E testing, ESLint, and Tailwind CSS | Source · Demo · CodeSandbox |
| Minimal Starter | Bare-bones Next.js + tRPC setup | Source · CodeSandbox |
| TodoMVC | TodoMVC with SSG and Prisma | Source · Demo · CodeSandbox |
| WebSockets | Prisma, WebSockets, NextAuth, and subscriptions | Source · Demo · CodeSandbox |
| SSE Chat | Streaming chat with Server-Sent Events and Drizzle ORM | Source · CodeSandbox |
| Big Router | Large router with code generation | Source · CodeSandbox |
| Edge Runtime | tRPC on Next.js Edge Runtime | Source · CodeSandbox |
| FormData | Form handling with React Hook Form and Zod | Source · CodeSandbox |
| WebSocket Encoder | WebSockets with MessagePack binary encoding | Source · CodeSandbox |
Serverless
| Example | Description | Links |
|---|---|---|
| Lambda + API Gateway | AWS Lambda with API Gateway | Source · CodeSandbox |
| Lambda Streaming | AWS Lambda + API Gateway with streaming responses | Source · CodeSandbox |
| Lambda Function URLs | AWS Lambda with Function URLs | Source · CodeSandbox |
| Cloudflare Workers | tRPC on Cloudflare Workers | Source · CodeSandbox |
| Vercel Edge Runtime | tRPC on Vercel Edge Runtime | Source · CodeSandbox |
| Deno Deploy | tRPC client on Deno Deploy | Source · CodeSandbox |
Autres écosystèmes
| Example | Description | Links |
|---|---|---|
| Express | Minimal Express + tRPC setup | Source · CodeSandbox |
| Fastify | Fastify with WebSocket support | Source · CodeSandbox |
| Bun | tRPC server and client on Bun | Source · CodeSandbox |
| Nuxt 3 | Nuxt 3 integration with trpc-nuxt | Source · CodeSandbox |
Communauté
note
Les exemples de la communauté sont maintenus par leurs auteurs respectifs et peuvent ne pas être mis à jour pour la dernière version de tRPC. Vérifiez la compatibilité des versions dans le README de chaque projet.
Frameworks
| Example | Description | Links |
|---|---|---|
| create-t3-turbo | T3 Stack with Expo and Turborepo | Source · CodeSandbox |
| SvelteKit + Prisma | SvelteKit integration with Prisma | Source · CodeSandbox |
Intégrations
| Example | Description | Links |
|---|---|---|
| Separate BE/FE | Separate backend and frontend repositories | Backend (Express) · Frontend (Vite) |