name, description
| name |
description |
| nextjs-fullstack |
Next.js full-stack template principles. App Router, Prisma, Tailwind. |
Next.js Full-Stack Template
Tech Stack
| Component |
Technology |
| Framework |
Next.js 14 (App Router) |
| Language |
TypeScript |
| Database |
PostgreSQL + Prisma |
| Styling |
Tailwind CSS |
| Auth |
Clerk (optional) |
| Validation |
Zod |
Directory Structure
Key Concepts
| Concept |
Description |
| Server Components |
Default, fetch data |
| Server Actions |
Form mutations |
| Route Handlers |
API endpoints |
| Prisma |
Type-safe ORM |
Environment Variables
| Variable |
Purpose |
| DATABASE_URL |
Prisma connection |
| NEXT_PUBLIC_APP_URL |
Public URL |
Setup Steps
npx create-next-app {{name}} --typescript --tailwind --app
npm install prisma @prisma/client zod
npx prisma init
- Configure schema
npm run db:push
npm run dev
Best Practices
- Server Components by default
- Server Actions for mutations
- Prisma for type-safe DB
- Zod for validation
- Edge runtime where possible