Next.js Complete Stack
Master skill combining all framework documentation for modern Next.js development.
Agent Workflow (MANDATORY)
Before ANY implementation, use TeamCreate to spawn 3 agents:
- fuse-ai-pilot:explore-codebase - Analyze project structure and existing patterns
- fuse-ai-pilot:research-expert - Verify latest docs for all stack technologies
- mcp__context7__query-docs - Check integration compatibility
After implementation, run fuse-ai-pilot:sniper for validation.
Overview
When to Use
- Starting a new Next.js 16 project from scratch
- Need the complete recommended technology stack
- Building production applications with authentication
- Implementing forms, state management, and UI components
- Understanding how all parts fit together
Technology Stack
| Layer |
Technology |
Skill Reference |
| Framework |
Next.js 16 (App Router) |
nextjs-16 |
| Database ORM |
Prisma 7 |
prisma-7 |
| Authentication |
Better Auth 1.2 |
better-auth |
| UI Components |
shadcn/ui 3.8.0 |
nextjs-shadcn |
| Forms |
TanStack Form |
nextjs-tanstack-form |
| State |
Zustand |
nextjs-zustand |
| Styling |
Tailwind CSS 4 |
tailwindcss |
| i18n |
next-intl 4.0 |
nextjs-i18n |
Stack Decisions
Why These Technologies
| Choice |
Reason |
| Better Auth over NextAuth.js |
TypeScript-first, plugin system, self-hosted |
| Prisma 7 over Drizzle |
Mature ecosystem, migrations, studio |
| TanStack Form over React Hook Form |
Modern API, server actions, type safety |
| Zustand over Redux/Context |
Minimal boilerplate, SSR-friendly |
| shadcn/ui over MUI/Chakra |
Copy/paste ownership, Radix primitives |
Forbidden Patterns
- NextAuth.js - Use Better Auth instead
- Pages Router - Use App Router for new projects
- React Hook Form - Use TanStack Form
- Client Components by default - Server Components first
SOLID Architecture
Project Structure
src/
├── app/ # Route handlers only
│ ├── [locale]/ # i18n routing
│ ├── api/ # API routes
│ └── layout.tsx # Root layout
├── modules/
│ ├── cores/ # Shared infrastructure
│ │ ├── i18n/ # Internationalization
│ │ ├── shadcn/ # UI components
│ │ ├── lib/ # Utilities (cn, etc.)
│ │ └── db/ # Prisma client
│ ├── auth/ # Authentication module
│ └── [feature]/ # Feature modules
└── proxy.ts # Route protection
Module Pattern
Each feature module contains:
- src/services/ - Business logic
- src/hooks/ - React hooks
- src/components/ - UI components
- src/interfaces/ - TypeScript types
Integration Points
Authentication + Database
Better Auth integrates with Prisma adapter for user storage. Schema in prisma/schema.prisma includes User, Session, Account, Verification tables.
Forms + UI + Validation
TanStack Form with Zod validation using shadcn/ui Field components. Server Actions for form submission.
State + Server Components
Zustand stores for client state only. Server Components fetch data directly. No global state for server data.
i18n + Routing
next-intl with [locale] segment. proxy.ts handles locale detection and redirects.
Quick Reference
Next.js 16
| Feature |
Reference |
| App Router |
nextjs-16/app-router.md |
| Server Components |
nextjs-16/server-components.md |
| Caching |
nextjs-16/caching.md, cache-components.md |
| proxy.ts |
nextjs-16/proxy.md |
Prisma 7
| Feature |
Reference |
| Schema |
prisma-7/schema.md |
| Client |
prisma-7/client.md |
| Migrations |
prisma-7/migrations.md |
| TypedSQL |
prisma-7/typed-sql.md |
Better Auth
| Feature |
Reference |
| Setup |
better-auth/installation.md |
| OAuth |
better-auth/providers/ |
| Plugins |
better-auth/plugins/ |
| Prisma adapter |
better-auth/adapters/prisma.md |
Best Practices
- Server Components default - Add
'use client' only when needed
- Colocate code - Keep related code in feature modules
- Type everything - Full TypeScript, no any
- Fetch where used - No prop drilling for data
- Validate at boundary - Zod schemas for all inputs
- Cache explicitly - Use
use cache directive
Getting Started
- Review
nextjs-16 for App Router fundamentals
- Set up
prisma-7 for database
- Add
better-auth for authentication
- Install
nextjs-shadcn components
- Configure
nextjs-i18n if multilingual
- Add
nextjs-zustand for client state
1---2name: nextjs-stack3description: Next.js 16+ complete stack with App Router, Prisma 7, Better Auth, shadcn/ui, TanStack Form, Zustand. Use as the master reference combining all framework skills.4versions:5 nextjs: 166 react: 197 prisma: 78 better-auth: 1.29 shadcn-ui: 3.8.010 tailwindcss: 411user-invocable: true12related-skills: nextjs-16, prisma-7, better-auth, nextjs-shadcn, nextjs-tanstack-form, nextjs-zustand, nextjs-i18n, solid-nextjs13metadata:14 source: https://skillmd.com/skills/aibot88/nextjs-stack15---1617# Next.js Complete Stack1819Master skill combining all framework documentation for modern Next.js development.2021## Agent Workflow (MANDATORY)2223Before ANY implementation, use `TeamCreate` to spawn 3 agents:24251. **fuse-ai-pilot:explore-codebase** - Analyze project structure and existing patterns262. **fuse-ai-pilot:research-expert** - Verify latest docs for all stack technologies273. **mcp__context7__query-docs** - Check integration compatibility2829After implementation, run **fuse-ai-pilot:sniper** for validation.3031---3233## Overview3435### When to Use3637- Starting a new Next.js 16 project from scratch38- Need the complete recommended technology stack39- Building production applications with authentication40- Implementing forms, state management, and UI components41- Understanding how all parts fit together4243### Technology Stack4445| Layer | Technology | Skill Reference |46|-------|------------|-----------------|47| Framework | Next.js 16 (App Router) | `nextjs-16` |48| Database ORM | Prisma 7 | `prisma-7` |49| Authentication | Better Auth 1.2 | `better-auth` |50| UI Components | shadcn/ui 3.8.0 | `nextjs-shadcn` |51| Forms | TanStack Form | `nextjs-tanstack-form` |52| State | Zustand | `nextjs-zustand` |53| Styling | Tailwind CSS 4 | `tailwindcss` |54| i18n | next-intl 4.0 | `nextjs-i18n` |5556---5758## Stack Decisions5960### Why These Technologies6162| Choice | Reason |63|--------|--------|64| **Better Auth** over NextAuth.js | TypeScript-first, plugin system, self-hosted |65| **Prisma 7** over Drizzle | Mature ecosystem, migrations, studio |66| **TanStack Form** over React Hook Form | Modern API, server actions, type safety |67| **Zustand** over Redux/Context | Minimal boilerplate, SSR-friendly |68| **shadcn/ui** over MUI/Chakra | Copy/paste ownership, Radix primitives |6970### Forbidden Patterns7172- **NextAuth.js** - Use Better Auth instead73- **Pages Router** - Use App Router for new projects74- **React Hook Form** - Use TanStack Form75- **Client Components by default** - Server Components first7677---7879## SOLID Architecture8081### Project Structure8283```84src/85├── app/ # Route handlers only86│ ├── [locale]/ # i18n routing87│ ├── api/ # API routes88│ └── layout.tsx # Root layout89├── modules/90│ ├── cores/ # Shared infrastructure91│ │ ├── i18n/ # Internationalization92│ │ ├── shadcn/ # UI components93│ │ ├── lib/ # Utilities (cn, etc.)94│ │ └── db/ # Prisma client95│ ├── auth/ # Authentication module96│ └── [feature]/ # Feature modules97└── proxy.ts # Route protection98```99100### Module Pattern101102Each feature module contains:103104- **src/services/** - Business logic105- **src/hooks/** - React hooks106- **src/components/** - UI components107- **src/interfaces/** - TypeScript types108109---110111## Integration Points112113### Authentication + Database114115Better Auth integrates with Prisma adapter for user storage. Schema in `prisma/schema.prisma` includes User, Session, Account, Verification tables.116117### Forms + UI + Validation118119TanStack Form with Zod validation using shadcn/ui Field components. Server Actions for form submission.120121### State + Server Components122123Zustand stores for client state only. Server Components fetch data directly. No global state for server data.124125### i18n + Routing126127next-intl with `[locale]` segment. proxy.ts handles locale detection and redirects.128129---130131## Quick Reference132133### Next.js 16134135| Feature | Reference |136|---------|-----------|137| App Router | `nextjs-16/app-router.md` |138| Server Components | `nextjs-16/server-components.md` |139| Caching | `nextjs-16/caching.md`, `cache-components.md` |140| proxy.ts | `nextjs-16/proxy.md` |141142### Prisma 7143144| Feature | Reference |145|---------|-----------|146| Schema | `prisma-7/schema.md` |147| Client | `prisma-7/client.md` |148| Migrations | `prisma-7/migrations.md` |149| TypedSQL | `prisma-7/typed-sql.md` |150151### Better Auth152153| Feature | Reference |154|---------|-----------|155| Setup | `better-auth/installation.md` |156| OAuth | `better-auth/providers/` |157| Plugins | `better-auth/plugins/` |158| Prisma adapter | `better-auth/adapters/prisma.md` |159160---161162## Best Practices1631641. **Server Components default** - Add `'use client'` only when needed1652. **Colocate code** - Keep related code in feature modules1663. **Type everything** - Full TypeScript, no any1674. **Fetch where used** - No prop drilling for data1685. **Validate at boundary** - Zod schemas for all inputs1696. **Cache explicitly** - Use `use cache` directive170171---172173## Getting Started1741751. Review `nextjs-16` for App Router fundamentals1762. Set up `prisma-7` for database1773. Add `better-auth` for authentication1784. Install `nextjs-shadcn` components1795. Configure `nextjs-i18n` if multilingual1806. Add `nextjs-zustand` for client state