create-t3-app README

The project's README from github.com/t3-oss/create-t3-app. As one markdown file: README.md.

Logo for T3

create-t3-app

Interactive CLI to start a full-stack, typesafe Next.js app.

Get started with the T3 Stack by running npm create t3-app@latest

PRs-Welcome Discord NPM version Downloads

Video thumbnail of Theo with an indecipherable expression on his face

Watch Theo's overview on Youtube here

Table of contents

The T3 Stack

The "T3 Stack" is a web development stack made by Theo focused on simplicity, modularity, and full-stack typesafety. It consists of:

So... what is create-t3-app? A template?

Kind of? create-t3-app is a CLI built by seasoned T3 Stack devs to streamline the setup of a modular T3 Stack app. This means each piece is optional, and the "template" is generated based on your specific needs.

After countless projects and many years on this tech, we have lots of opinions and insights. We’ve done our best to encode them into this CLI.

This is NOT an all-inclusive template. We expect you to bring your own libraries that solve the needs of YOUR application. While we don’t want to prescribe solutions to more specific problems like state management and deployment, we do have some recommendations listed here.

T3 Axioms

We'll be frank - this is an opinionated project. We share a handful of core beliefs around building and we treat them as the basis for our decisions.

1. Solve Problems

It's easy to fall into the trap of "adding everything" - we explicitly don't want to do that. Everything added to create-t3-app should solve a specific problem that exists within the core technologies included. This means we won't add things like state libraries (zustand, redux) but we will add things like NextAuth.js and integrate Prisma and tRPC for you.

2. Bleed Responsibly

We love our bleeding edge tech. The amount of speed and, honestly, fun that comes out of new shit is really cool. We think it's important to bleed responsibly, using riskier tech in the less risky parts. This means we wouldn't ⛔️ bet on risky new database tech (SQL is great!). But we happily ✅ bet on tRPC since it's just functions that are trivial to move off.

3. Typesafety Isn't Optional

The stated goal of create-t3-app is to provide the quickest way to start a new full-stack, typesafe web application. We take typesafety seriously in these parts as it improves our productivity and helps us ship fewer bugs. Any decision that compromises the typesafe nature of create-t3-app is a decision that should be made in a different project.

Getting Started

To scaffold an app using create-t3-app, run any of the following four commands and answer the command prompt questions:

npm

npm create t3-app@latest

yarn

yarn create t3-app

pnpm

pnpm create t3-app@latest

bun

bun create t3-app@latest

For more advanced usage, check out the CLI docs.

Community

For help, discussion about best practices, or any other conversation that would benefit create-t3-app:

Join the T3 Discord Server

Contributors

We 💖 contributors! Feel free to contribute to this project but please read the Contributing Guidelines before opening an issue or PR so you understand the branching strategy and local development environment. We also welcome you to join our Discord community for either support or contributing guidance.

A table of avatars from the project's contributors

Made with contrib.rocks

Powered by vercel

create-t3-app (t3-oss/create-t3-app)

Searching Database…

这是什么?create-t3-app 是一个交互式命令行工具,用来搭建一个基于 T3 Stack 的全栈、类型安全的 Next.js 应用。T3 Stack 是一套注重简洁、模块化和全栈类型安全的 Web 开发技术栈。
它是现成的模板,还是我要运行的命令行工具?它是一个命令行工具,不是固定模板:技术栈的每个部分都是可选的,你按照它的提示回答问题,应用就会根据你的具体需求生成。
我该怎么用它创建一个新应用?运行 npm create t3-app@latest —— 也支持 yarn、pnpm 和 bun 的写法 —— 然后回答命令行里的问题就行。
运行之前我需要先装好什么?需要 Node.js 20 或更高版本(这是代码仓库的 engines 要求),以及任意一种包管理器:npm、yarn、pnpm 或 bun。
它有什么限制——会不会把我锁定在它的选择上?它毫不掩饰自己的技术倾向:不会什么都帮你加好——没有 zustand、redux 这类状态管理库——而且它只是一个起点,不是大而全的模板;其余的库需要你自己按需添加。
我用 macOS、Windows 还是 Linux 有影响吗?没有——它是命令行工具,只要能跑 Node.js 的地方都能用,所以 macOS、Windows 和 Linux 都没问题。
生成的应用里到底包含哪些东西?包含你选择启用的那些 T3 Stack 部分:Next.js、tRPC、Tailwind CSS、TypeScript,数据库用 Prisma 或 Drizzle,认证用 NextAuth.js。
为什么不含 Redux 这类状态管理库?这是刻意的设计。T3 的原则是:凡是要加进来的东西,必须能在核心技术范围内解决某个实际问题——zustand、redux 这类状态管理库被明确排除在外,而 NextAuth.js 以及 Prisma/tRPC 的集成则符合原则被纳入。
它对新技术前沿是什么态度?它'负责任地尝鲜':不会押注有风险的新数据库技术——用 Prisma 或 Drizzle 走 SQL 是稳妥的选择——但乐于采用 tRPC,因为它本质上就是函数,以后想换掉也毫不费力。
它会告诉我怎么部署做好的应用吗?不会硬性规定。和状态管理一样,部署也交给你自己决定,不过 README 里附了团队推荐方案的链接。
Creator
t3-oss
Size
8.3 MB
Stars
29.2K
Age
4y
Commits · 90 Days