StealThis .dev

T3 Stack Starter (Next.js + tRPC + Prisma)

The T3 Stack — fully type-safe full-stack starter with Next.js, tRPC, Prisma/Drizzle, NextAuth, Tailwind, and validated environment variables.

Open in Lab
nextjs trpc prisma typescript tailwindcss
Targets: HTML

Code

The T3 Stack is an opinionated full-stack starter built on the principle that typesafety is not optional. It wires together Next.js, tRPC, Prisma (or Drizzle), NextAuth.js, and Tailwind CSS into a cohesive, fully typed development experience.

Philosophy

T3 focuses on three axioms:

  1. Solve problems — every included library addresses a specific full-stack pain point
  2. Bleed responsibly — push the edge on new tech, but keep the core stable
  3. Typesafety is not optional — end-to-end types from database to UI, enforced at build time

The Modular CLI

npm create t3-app@latest

The interactive CLI lets you pick only what you need. Every option is independently toggleable:

  • tRPC — end-to-end typesafe API layer (no codegen)
  • Prisma or Drizzle — typed ORM/query builder
  • NextAuth.js — authentication with session management
  • Tailwind CSS — utility-first styling

End-to-End Type Flow

The defining feature of T3 is that types flow automatically from your database schema through your API to your React components. When you change a Prisma model, the tRPC router types update, and any component consuming that data gets compile-time errors if the shape changed. No manual syncing. No runtime validation gaps.

The env.js module validates all environment variables at build time using Zod, so missing or malformed config is caught before deployment — not in production.

References