# Example Apps

> Example apps built with tRPC

## Official

### Node.js

| Example               | Description                                                 | Links                                                                                                                                                                               |
| --------------------- | ----------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Minimal**           | Hello world server and client                               | [Source](https://github.com/trpc/trpc/tree/main/examples/minimal) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/minimal)                             |
| **Standalone Server** | Custom HTTP server with WebSocket support                   | [Source](https://github.com/trpc/trpc/tree/main/examples/standalone-server) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/standalone-server)         |
| **Content Types**     | Binary, text, and JSON content type handling                | [Source](https://github.com/trpc/trpc/tree/main/examples/minimal-content-types) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/minimal-content-types) |
| **Lazy Loading**      | Lazy-loading routes with dynamic imports                    | [Source](https://github.com/trpc/trpc/tree/main/examples/lazy-load) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/lazy-load)                         |
| **SOA**               | Service-oriented architecture with multiple tRPC services   | [Source](https://github.com/trpc/trpc/tree/main/examples/soa) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/soa)                                     |
| **OpenAPI Codegen**   | Generate a typed REST client from a tRPC router via OpenAPI | [Source](https://github.com/trpc/trpc/tree/main/examples/openapi-codegen)                                                                                                           |
| **Kitchen Sink**      | Comprehensive examples covering many features               | [Source](https://github.com/trpc/examples-kitchen-sink) · [CodeSandbox](https://codesandbox.io/s/github/trpc/examples-kitchen-sink)                                                 |

### React

| Example             | Description                                        | Links                                                                                                                                                                 |
| ------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Minimal React**   | Node.js server + Vite React client monorepo        | [Source](https://github.com/trpc/trpc/tree/main/examples/minimal-react) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/minimal-react)   |
| **Express + React** | Express server with React client using React Query | [Source](https://github.com/trpc/trpc/tree/main/examples/express-server) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/express-server) |

### Next.js

| Example               | Description                                                   | Links                                                                                                                                                                                                        |
| --------------------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| **Prisma Starter**    | Full-stack with Prisma, E2E testing, ESLint, and Tailwind CSS | [Source](https://github.com/trpc/examples-next-prisma-starter) · [Demo](https://nextjs.trpc.io) · [CodeSandbox](https://codesandbox.io/s/github/trpc/examples-next-prisma-starter)                           |
| **Minimal Starter**   | Bare-bones Next.js + tRPC setup                               | [Source](https://github.com/trpc/examples-next-minimal-starter) · [CodeSandbox](https://codesandbox.io/s/github/trpc/examples-next-minimal-starter)                            |
| **TodoMVC**           | TodoMVC with SSG and Prisma                                   | [Source](https://github.com/trpc/examples-next-prisma-todomvc) · [Demo](https://todomvc.trpc.io) · [CodeSandbox](https://codesandbox.io/s/github/trpc/examples-next-prisma-todomvc)                          |
| **WebSockets**        | Prisma, WebSockets, NextAuth, and subscriptions               | [Source](https://github.com/trpc/examples-next-prisma-websockets-starter) · [Demo](https://websockets.trpc.io) · [CodeSandbox](https://codesandbox.io/s/github/trpc/examples-next-prisma-websockets-starter) |
| **SSE Chat**          | Streaming chat with Server-Sent Events and Drizzle ORM        | [Source](https://github.com/trpc/trpc/tree/main/examples/tanstack-start-sse-chat) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/tanstack-start-sse-chat)                      |
| **Big Router**        | Large router with code generation                             | [Source](https://github.com/trpc/trpc/tree/main/examples/next-big-router) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/next-big-router)                                      |
| **Edge Runtime**      | tRPC on Next.js Edge Runtime                                  | [Source](https://github.com/trpc/trpc/tree/main/examples/next-edge-runtime) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/next-edge-runtime)                                  |
| **FormData**          | Form handling with React Hook Form and Zod                    | [Source](https://github.com/trpc/trpc/tree/main/examples/next-formdata) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/next-formdata)                                          |
| **WebSocket Encoder** | WebSockets with MessagePack binary encoding                   | [Source](https://github.com/trpc/trpc/tree/main/examples/next-websockets-encoder) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/next-websockets-encoder)                      |

### Serverless

| Example                  | Description                                       | Links                                                                                                                                                                                             |
| ------------------------ | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Lambda + API Gateway** | AWS Lambda with API Gateway                       | [Source](https://github.com/trpc/trpc/tree/main/examples/lambda-api-gateway) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/lambda-api-gateway)                     |
| **Lambda Streaming**     | AWS Lambda + API Gateway with streaming responses | [Source](https://github.com/trpc/trpc/tree/main/examples/lambda-api-gateway-streaming) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/lambda-api-gateway-streaming) |
| **Lambda Function URLs** | AWS Lambda with Function URLs                     | [Source](https://github.com/trpc/trpc/tree/main/examples/lambda-url) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/lambda-url)                                     |
| **Cloudflare Workers**   | tRPC on Cloudflare Workers                        | [Source](https://github.com/trpc/trpc/tree/main/examples/cloudflare-workers) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/cloudflare-workers)                     |
| **Vercel Edge Runtime**  | tRPC on Vercel Edge Runtime                       | [Source](https://github.com/trpc/trpc/tree/main/examples/vercel-edge-runtime) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/vercel-edge-runtime)                   |
| **Deno Deploy**          | tRPC client on Deno Deploy                        | [Source](https://github.com/trpc/trpc/tree/main/examples/deno-deploy) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/deno-deploy)                                   |

### Other Ecosystems

| Example     | Description                       | Links                                                                                                                                                                   |
| ----------- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Express** | Minimal Express + tRPC setup      | [Source](https://github.com/trpc/trpc/tree/main/examples/express-minimal) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/express-minimal) |
| **Fastify** | Fastify with WebSocket support    | [Source](https://github.com/trpc/trpc/tree/main/examples/fastify-server) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/fastify-server)   |
| **Bun**     | tRPC server and client on Bun     | [Source](https://github.com/trpc/trpc/tree/main/examples/bun) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/bun)                         |
| **Nuxt 3**  | Nuxt 3 integration with trpc-nuxt | [Source](https://github.com/trpc/trpc/tree/main/examples/nuxt) · [CodeSandbox](https://codesandbox.io/s/github/trpc/trpc/tree/main/examples/nuxt)                       |

## Community

> [!NOTE]
> Community examples are maintained by their respective authors and may not be updated for the latest tRPC version. Check each project's README for version compatibility.


### Frameworks

| Example                | Description                       | Links                                                                                                                                             |
| ---------------------- | --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| **create-t3-turbo**    | T3 Stack with Expo and Turborepo  | [Source](https://github.com/t3-oss/create-t3-turbo) · [CodeSandbox](https://codesandbox.io/s/github/t3-oss/create-t3-turbo)                       |
| **SvelteKit + Prisma** | SvelteKit integration with Prisma | [Source](https://github.com/icflorescu/trpc-sveltekit-example) · [CodeSandbox](https://codesandbox.io/s/github/icflorescu/trpc-sveltekit-example) |

### Integrations

| Example            | Description                                | Links                                                                                                                                       |
| ------------------ | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------- |
| **Separate BE/FE** | Separate backend and frontend repositories | [Backend (Express)](https://github.com/mkosir/trpc-api-boilerplate) · [Frontend (Vite)](https://github.com/mkosir/trpc-fe-boilerplate-vite) |
