Newsletter
Join the Community
Subscribe to our newsletter for the latest news and updates
tRPC starter repo with E2E-testing
Prisma + tRPC is a starter repository (boilerplate) that combines Next.js, tRPC, and Prisma for building full-stack React applications with end-to-end type safety.
This is a starter repository from the official tRPC examples, created by @alexdotjs, for full-stack React development. It uses Next.js as the framework, tRPC for end-to-end typesafe APIs, Prisma as the ORM with a Postgres database, and includes a full testing setup with Playwright for E2E and Vitest for unit tests. The starter takes your Prisma schema and tRPC routers as input and produces a production-ready app with CI, environment validation, and Render deployment configuration.
src/pages/api/trpc/[trpc].ts as the tRPC response handler.prisma/schema.prisma; the pnpm dx command starts Postgres, applies migrations, and seeds the database.next build and when the app starts.render.yaml Blueprint lets you deploy the app and database automatically from the Render dashboard.pnpm build runs prisma generate, prisma migrate, then next build; separate scripts run unit (test-unit), E2E (test-e2e), and complete tests (test-start).prisma/schema.prisma, expose queries and mutations in src/server/routers, and call them from React components with full type inference.render.yaml.pnpm create next-app --example https://github.com/trpc/trpc --example-path examples/next-prisma-starter.pnpm dx to start Postgres, run migrations, seed, and start the Next.js dev server.pnpm build) or test (pnpm test-e2e) your changes.You need Node.js 18.0.0 or higher and a Postgres database. The dx script can start a local Postgres instance for development.
No. The starter focuses on the API layer with tRPC and Prisma and does not include Tailwind, styled-components, or any other CSS framework.
Run pnpm db-reset to reset the local database to a clean state.
Yes, it's an open-source example from the tRPC repository, so you can freely use and modify it.
