---
description: Guidelines for writing Next.js apps with tRPC
globs: "**/*.ts, **/*.tsx, **/*.js, **/*.jsx"
---
## Overview
[tRPC](https://trpc.io/) enables end-to-end typesafe APIs, allowing you to build and consume APIs without schemas, code generation, or runtime errors. These rules will help you follow best practices for tRPC v11.
## Project Structure
For a clean tRPC setup, follow this recommended structure:
```
.
├── src
│ ├── pages
│ │ ├── _app.tsx # add `createTRPCNext` setup...