This skill should be used when the user requests to scaffold, create, or initialize a full-stack Next.js application with a modern tech stack including Next.js 16, React 19, TypeScript, Tailwind CSS v4, shadcn/ui, Supabase auth, Prisma ORM, and comprehensive testing setup. Use it for creating production-ready starter templates with authentication, protected routes, forms, and example features. Trigger terms scaffold, create nextjs app, initialize fullstack, starter template, boilerplate, setup nextjs, production template, full-stack setup, nextjs supabase, nextjs prisma.
Scaffolds a production-ready Next.js 16 full-stack app with TypeScript, Tailwind v4, shadcn/ui, Supabase auth, and Prisma. Use when users request to create a new Next.js project with authentication, protected routes, forms, testing, and CI setup.
/plugin marketplace add hopeoverture/worldbuilding-app-skills/plugin install nextjs-fullstack-scaffold@worldbuilding-app-skillsThis skill inherits all available tools. When active, it can use any tool Claude has access to.
assets/folder-structure.txtassets/templates/package.template.jsonreferences/implementation-checklist.mdreferences/stack-architecture.mdscripts/scaffold.pyTo scaffold a production-grade Next.js 16 full-stack application with modern tooling and best practices, follow these steps systematically.
Before scaffolding, verify the target directory:
Prompt the user for the following details using the AskUserQuestion tool:
Use sensible defaults if user prefers to skip.
Create the complete folder structure as defined in assets/folder-structure.txt. Generate all necessary directories by writing files to them (directories are created automatically).
Create all configuration files in the project root. Consult references/stack-architecture.md for architectural guidance.
Generate these files using Write tool:
assets/templates/package.template.json, replacing placeholdersCreate all Next.js app router files following RSC conventions.
app/layout.tsx - Root layout with metadata and providersapp/page.tsx - Landing pageapp/globals.css - Tailwind directives and CSS variablesapp/(auth)/layout.tsx - Auth layout (centered)app/(auth)/login/page.tsx - Login page with formapp/(protected)/layout.tsx - Protected layout with auth checkapp/(protected)/dashboard/page.tsx - Dashboard with statsapp/(protected)/profile/page.tsx - User profile pageapp/(protected)/data/page.tsx - Data table pageapp/api/data/route.ts - Example API endpointmiddleware.ts - Supabase auth middlewareCreate shadcn/ui components in components/ui/:
button.tsx, card.tsx, input.tsx, label.tsx, form.tsx, table.tsx, dropdown-menu.tsx, avatar.tsxCreate custom components:
components/providers.tsx - App providers with Toastercomponents/layout/header.tsx - Header with navigationcomponents/layout/sidebar.tsx - Sidebar navigationcomponents/layout/nav.tsx - Navigation linkscomponents/auth/login-form.tsx - Login form with RHF + Zodcomponents/auth/auth-button.tsx - Sign in/out buttoncomponents/dashboard/stats-card.tsx - Stats display cardcomponents/dashboard/data-table.tsx - Interactive data tableAll components must be TypeScript and accessible.
Create utility and action files:
lib/utils.ts - cn() function and utilitieslib/prisma.ts - Prisma client singletonlib/supabase/client.ts - Client-side Supabase clientlib/supabase/server.ts - Server-side Supabase clientlib/supabase/middleware.ts - Middleware helper'use server')lib/actions/auth.ts - signIn(), signOut()lib/actions/user.ts - updateProfile()lib/actions/data.ts - CRUD operationslib/validations/auth.ts - Login/signup schemaslib/validations/user.ts - Profile update schemalib/validations/data.ts - Data CRUD schemasCreate prisma/schema.prisma:
Create prisma/seed.ts:
Create test files:
tests/unit/utils.test.ts - Unit test for utilitiestests/integration/auth.test.tsx - Integration test for authtests/e2e/login.spec.ts - E2E test for login flowCreate .github/workflows/ci.yml:
Create comprehensive README.md with:
After generating all files:
any types unless necessary"use client" when required for interactivityThroughout scaffolding:
references/stack-architecture.md for patternsreferences/implementation-checklist.md to track progressWhen finished: