Cette page est affichée en anglais. Une traduction française est en cours.
ConfigsApr 24, 2026·3 min de lecture

Create T3 App — Full-Stack Typesafe Next.js Starter

Create T3 App is the fastest way to scaffold a full-stack, typesafe Next.js application using the T3 Stack: Next.js, TypeScript, tRPC, Prisma, Tailwind CSS, and NextAuth.js.

assetLangBanner.body

Introduction

Create T3 App is a CLI tool that scaffolds a production-ready Next.js project with a carefully curated set of libraries known as the T3 Stack. The stack prioritizes end-to-end type safety, combining tRPC for API calls, Prisma for database access, and TypeScript throughout. It lets you start building features immediately with sensible defaults.

What Create T3 App Does

  • Scaffolds a Next.js project with interactive prompts to select your preferred stack components
  • Configures tRPC for type-safe API routes with automatic client-server type inference
  • Sets up Prisma ORM with a ready-to-use schema and database connection
  • Integrates NextAuth.js for authentication with providers like GitHub, Google, and Discord
  • Applies Tailwind CSS with PostCSS configuration and a base utility setup

Architecture Overview

The T3 Stack uses Next.js as the application framework with TypeScript everywhere. tRPC creates a type-safe bridge between the client and server: you define procedures on the server and call them from the client with full autocompletion and type checking, no code generation needed. Prisma provides the database layer with a typed client generated from your schema. NextAuth.js handles sessions and OAuth flows. All pieces share TypeScript types, so a change in the database schema propagates type errors through the API layer to the UI.

Self-Hosting & Configuration

  • Run npm create t3-app@latest and follow prompts to select tRPC, Prisma, NextAuth, and Tailwind
  • Configure the database connection string in .env (supports PostgreSQL, MySQL, SQLite via Prisma)
  • Edit prisma/schema.prisma to define your data models, then run npx prisma db push
  • Add tRPC routers in src/server/api/routers/ and register them in src/server/api/root.ts
  • Deploy to Vercel, Railway, or any Node.js host; set environment variables for database and auth providers

Key Features

  • End-to-end type safety from database schema through API layer to React components
  • Interactive CLI with modular opt-in for each stack piece (skip what you do not need)
  • Zero code generation for API types: tRPC infers types directly from server procedure definitions
  • Preconfigured ESLint, TypeScript strict mode, and path aliases for clean project structure
  • Active community with extensive documentation, tutorials, and example projects

Comparison with Similar Tools

  • create-next-app — official Next.js scaffolder with minimal setup; T3 adds tRPC, Prisma, and auth
  • Blitz.js — full-stack Next.js framework with its own RPC layer; T3 uses standard tRPC and is less opinionated
  • RedwoodJS — React + GraphQL full-stack framework; T3 uses tRPC instead of GraphQL for simpler type inference
  • SvelteKit — Svelte full-stack framework; T3 is React/Next.js-specific with TypeScript-first tooling
  • Wasp — DSL-driven full-stack framework; T3 stays closer to standard Next.js patterns

FAQ

Q: Do I have to use all T3 Stack components? A: No. The CLI lets you opt in or out of each library. You can scaffold a project with just Next.js and Tailwind if you prefer.

Q: What databases work with the T3 Stack? A: Any database Prisma supports, including PostgreSQL, MySQL, SQLite, CockroachDB, and MongoDB.

Q: Is tRPC hard to learn? A: tRPC is straightforward if you know TypeScript. You define server functions and call them from the client with full type inference, no schemas or code generation required.

Q: Can I add GraphQL instead of tRPC? A: Yes. The scaffolded project is a standard Next.js app, so you can replace or supplement tRPC with any API approach.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires