Use when building full-stack TypeScript applications - Create T3 App with Next.js, tRPC, Prisma, Tailwind CSS, and NextAuth
This skill provides expertise in using Create T3 App, a full-stack TypeScript boilerplate featuring Next.js, tRPC, Prisma, Tailwind CSS, and NextAuth.js for building type-safe web applications.
Use this skill when:
| Layer | Technology |
|---|---|
| Framework | Next.js (App Router) |
| Language | TypeScript |
| API | tRPC (end-to-end typesafe) |
| Database | PostgreSQL/MySQL, Prisma |
| Auth | NextAuth.js |
| Styling | Tailwind CSS |
| Validation | Zod |
| Deployment | Vercel, Railway |
| Feature | Description |
|---|---|
| TypeScript | Full type safety throughout |
| tRPC | End-to-end typesafe API |
| Prisma | Type-safe database ORM |
| NextAuth | Multi-provider authentication |
| Tailwind | Utility-first CSS |
| Zod | Runtime validation |
| App Router | Next.js 14+ patterns |
# Create new T3 app
npx create-t3-app@latest
# Or use existing boilerplate
cd t3-app-boilerplate
npm install
# Setup environment
cp .env.example .env
# Run migrations
npx prisma migrate dev
# Start development
npm run dev
t3-app/
├── src/
│ ├── app/ # Next.js App Router
│ ├── server/
│ │ ├── api/ # tRPC routers
│ │ ├── db/ # Prisma client
│ │ └── auth/ # NextAuth config
│ ├── components/ # React components
│ ├── styles/ # Global styles
│ └── utils/ # Utilities
├── prisma/
│ └── schema.prisma # Database schema
└── package.json
// server/api/routers/posts.ts
import { router, publicProcedure } from '../trpc';
export const postsRouter = router({
all: publicProcedure.query(async ({ ctx }) => {
return ctx.db.post.findMany();
}),
byId: publicProcedure
.input(z.object({ id: z.string() }))
.query(async ({ ctx, input }) => {
return ctx.db.post.findUnique({
where: { id: input.id }
});
}),
});
// Using tRPC hook
const { data: posts } = api.posts.all.useQuery();
// Mutation
const createPost = api.posts.create.useMutation({
onSuccess: () => {
utils.posts.all.invalidate();
}
});
model Post {
id String @id @default(cuid())
title String
content String?
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
author User @relation(fields: [authorId], references: [id])
authorId String
}
When helping with T3 projects:
saas-boilerplate-ixartz - Alternative SaaS starterawesome-python - Python backend alternativesst - Serverless deploymentC:\Users\user\.qwen\skills\t3-app-boilerplate