This knowledge item defines how to bootstrap a production-ready Next.js app (App Router) using React and TypeScript, with Tailwind CSS v4 and shadcn/ui, scaffolded via the latest create-next-app command and pnpm, guided by Context7 MCP to fetch current docs and best practices. It includes validating latest versions and CLI usage, architecture, deprecations, migrations, Tailwind v4 changes, shadcn/ui setup flow, App Router conventions, accessibility and performance recommendations. It enforces a scalable feature-first src structure with an alias @/* and standard folders (app, components, features, lib, hooks, types, styles) and a minimal, boilerplate-free setup.
Create a new production-ready frontend project using the latest stable versions.
IMPORTANT: Use Context7 MCP throughout the entire setup process to fetch the latest official documentation, patterns, and best practices before making decisions or installing packages.
Always verify:
Tech Stack:
Before implementation:
Use Context7 MCP to retrieve the latest documentation for:
Validate:
Avoid:
Initialize a new Next.js application with:
@/*Use the latest recommended create-next-app command.
Use this scalable feature-first structure:
src/ app/ layout.tsx page.tsx globals.css
components/ ui/ common/ layout/
features/ home/ components/ hooks/ services/ types.ts
lib/ utils.ts constants.ts
hooks/ types/ styles/
Install and configure shadcn/ui using the latest official CLI flow.
Install these base components:
Ensure:
Use the latest Tailwind CSS v4 setup patterns.
Requirements:
Configure:
Follow:
Create a simple responsive homepage using shadcn/ui components to verify:
After setup:
IMPORTANT: Prefer official documentation and Context7 MCP references over assumptions. Use the most modern and maintainable architecture possible.