# Create T3 App — The Best Way to Start a Type-Safe Next.js App > CLI scaffold that generates a full-stack Next.js project pre-wired with tRPC, Prisma, NextAuth.js, and Tailwind CSS. Designed to maximize type safety from database to frontend with zero boilerplate. ## Install Save in your project root: # Create T3 App — The Best Way to Start a Type-Safe Next.js App ## Quick Use ```bash npm create t3-app@latest my-app cd my-app && npm run dev ``` ## Introduction Create T3 App is the official CLI for the T3 Stack, a curated set of technologies chosen for end-to-end type safety in modern web applications. It eliminates the tedious setup of wiring Next.js with tRPC, Prisma, NextAuth.js, and Tailwind CSS so developers can ship features from minute one. ## What Create T3 App Does - Scaffolds a Next.js project with an interactive CLI that lets you pick your stack - Pre-configures tRPC for fully type-safe API routes without code generation - Sets up Prisma with a starter schema and database connection - Integrates NextAuth.js for authentication with provider configuration - Includes Tailwind CSS with a sensible default config and prettier plugin ## Architecture Overview The generated project uses the Next.js App Router with tRPC providing a type-safe RPC layer between client and server. Prisma acts as the ORM with its schema serving as the single source of truth for the database. NextAuth.js handles session management via JWT or database sessions. The CLI itself is built with commander and inquirer, and each optional package is a modular installer that injects only the files and dependencies it needs. ## Self-Hosting & Configuration - Run `npx prisma db push` to sync the schema to your database - Set `DATABASE_URL`, `NEXTAUTH_SECRET`, and provider keys in `.env` - Deploy to Vercel with zero config or self-host with `npm run build && npm start` - Customize the tRPC router in `src/server/api/routers/` - Add new auth providers by editing `src/server/auth.ts` ## Key Features - End-to-end type safety from database schema through API to React components - Modular CLI that only installs what you select - First-class TypeScript support with strict mode enabled by default - Active community with the T3 Stack documentation and Discord - Minimal opinionation beyond the core integrations ## Comparison with Similar Tools - **create-next-app** — generates a basic Next.js project; T3 adds tRPC, Prisma, and auth pre-wired - **Blitz.js** — offers a zero-API approach built into the framework; T3 uses tRPC which is framework-agnostic - **RedwoodJS** — full-stack React framework with GraphQL; T3 uses tRPC for simpler type-safe RPCs - **Wasp** — declarative full-stack DSL; T3 stays closer to standard Next.js conventions ## FAQ **Q: Can I add packages after scaffolding?** A: Yes, the generated project is standard Next.js. Add any npm package as you normally would. **Q: Does it support databases other than PostgreSQL?** A: Prisma supports PostgreSQL, MySQL, SQLite, SQL Server, MongoDB, and CockroachDB. Change the provider in `schema.prisma`. **Q: Is tRPC required or can I use REST APIs?** A: tRPC is optional during scaffolding. You can deselect it and add your own API routes. **Q: How do I deploy to a non-Vercel host?** A: Run `npm run build` for a production build and serve with `npm start` on any Node.js host. ## Sources - https://github.com/t3-oss/create-t3-app - https://create.t3.gg --- Source: https://tokrepo.com/en/workflows/asset-9720bd5b Author: AI Open Source