Skip to content
next-js-16-launchpad logo

Next.js 16 Launchpad

next-js-16-launchpad

Next.js 16 with Turbopack, Cache Components, and proxy.ts. Use for bootstrapping, migrating, and building with App Router and React 19.

aiskillstore/marketplace0installs430stars

SKILL.md

Full skill instructions

Next.js 16 Launchpad

Next.js 16: Turbopack default (2-5× faster builds), Cache Components ('use cache'), and proxy.ts for explicit control.

When to Use

✅ Next.js 16, Turbopack, Cache Components, proxy migration, App Router, React 19.2

❌ Pages Router, Next.js ≤15, generic React questions

Requirements

ToolVersion
Node.js20.9.0+
TypeScript5.1.0+
React19.2+

Quick Start

# New project
npx create-next-app@latest my-app

# Upgrade existing
npx @next/​codemod@canary upgrade latest
npm install next@latest react@latest react-dom@latest

Recommended: TypeScript, ESLint, Tailwind, App Router, Turbopack, @/​* alias.

Minimal Setup

// app/​layout.tsx
export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>{children}</​body>
    </​html>
  )
}
// app/​page.tsx
export default function Page() {
  return <h1>Hello, Next.js 16!</​h1>
}

Configuration

// next.config.ts
import type { NextConfig } from 'next'

const nextConfig: NextConfig = {
  cacheComponents: true,
  reactCompiler: true,
}

export default nextConfig

v15 → v16 Changes

v15v16
experimental.turbopackDefault
experimental.pprcacheComponents
middleware.ts (Edge)proxy.ts (Node)
Sync paramsawait params

Core Patterns

1. Server Components (Default)

export default async function BlogPage() {
  const res = await fetch('https://api.example.com/​posts')
  const posts = await res.json()
  return <PostList posts={posts} />
}

2. Cache Components

import { cacheLife } from 'next/​cache'

export default async function BlogPage() {
  'use cache'
  cacheLife('hours')
  const posts = await fetch('https://api.example.com/​posts').then(r => r.json())
  return <PostList posts={posts} />
}

3. Client Components

'use client'
import { useState } from 'react'

export default function Counter() {
  const [count, setCount] = useState(0)
  return (
    <div>
      <p>Count: {count}</​p>
      <button onClick={() => setCount(count + 1)}>+</​button>
    </​div>
  )
}

4. Proxy Boundary

// app/​proxy.ts
export function proxy(request: NextRequest) {
  if (!request.cookies.get('auth') && request.nextUrl.pathname.startsWith('/​dashboard')) {
    return NextResponse.redirect(new URL('/​login', request.url))
  }
  return NextResponse.next()
}

5. Cache Tags + Server Actions

// app/​blog/​page.tsx
'use cache'
cacheLife('hours')
cacheTag('blog-posts')

export default async function BlogList() {
  const posts = await db.posts.findMany()
  return <PostList posts={posts} />
}
// app/​actions.ts
'use server'
import { updateTag } from 'next/​cache'

export async function createPost(data: PostData) {
  await db.posts.create(data)
  updateTag('blog-posts')
}

6. Streaming with Suspense

export default function Dashboard() {
  return (
    <div>
      <Suspense fallback={<Skeleton />}>
        <RevenueCard />
      </​Suspense>
      <Suspense fallback={<Skeleton />}>
        <UsersCard />
      </​Suspense>
    </​div>
  )
}

async function RevenueCard() {
  const data = await db.analytics.revenue()
  return <div>{data}</​div>
}

Key Concepts

  1. Turbopack - Rust bundler, incremental compilation, Fast Refresh
  2. Server Components - Default in app/, zero client JS
  3. Client Components - 'use client', hooks, browser APIs
  4. Cache Components - 'use cache' + cacheLife() for PPR
  5. Proxy Boundary - proxy.ts for auth/​rewrites/​redirects
  6. Partial Pre-Rendering - Static shell + dynamic streaming

Migration Checklist

  1. Async Request APIs

    npx @next/​codemod@canary async-request-api
    

    Update: const { slug } = await params

  2. middleware.ts → proxy.ts

    • Rename file, export proxy
    • Node runtime only (not Edge)
  3. Config updates

    • Remove experimental.* flags
    • Enable cacheComponents, reactCompiler
    • Remove serverRuntimeConfig/publicRuntimeConfig
  4. Cache Components

    • Replace experimental.ppr with cacheComponents: true
    • Wrap dynamic sections with <Suspense>
  5. Images

    • Configure images.localPatterns for query strings

See references/​nextjs16-migration-playbook.md for complete guide.

Common Pitfalls

❌ Mixing 'use cache' with runtime APIs (cookies(), headers()) ❌ Missing <Suspense> when Cache Components enabled ❌ Tilde Sass imports under Turbopack ❌ Running proxy.ts on Edge runtime

✅ Read cookies/​headers first, pass as props to cached components ✅ Wrap dynamic children in <Suspense> ✅ Use standard Sass imports ✅ Use Node runtime for proxy

Decision Guide

Enable Cache Components? → Yes for static/​semi-static content → No for fully dynamic dashboards

Where does auth live? → proxy.ts for cross-route checks → Route handlers for API-specific logic

When to use 'use client'? → Only when you need hooks, state, or browser APIs → Keep presentational components server-side

Production Patterns

E-commerce

// Product page with streaming
export default async function Product({ params }) {
  const { id } = await params
  const product = await db.products.findById(id)
  
  return (
    <>
      <ProductInfo product={product} />
      <Suspense fallback={<ReviewsSkeleton />}>
        <Reviews productId={id} />
      </​Suspense>
    </>
  )
}

Authenticated Dashboard

// proxy.ts
export function proxy(request: NextRequest) {
  const session = request.cookies.get('session')
  if (!session && request.nextUrl.pathname.startsWith('/​dashboard')) {
    return NextResponse.redirect(new URL('/​login', request.url))
  }
}

See references/​nextjs16-advanced-patterns.md for more blueprints.

Performance

  • Keep Turbopack enabled (opt-out with --webpack only if needed)
  • Parallelize fetches with Promise.all
  • Use <Suspense> for streaming boundaries
  • Enable file system cache for large repos

Security

  • Use server-only package + React Taint API
  • Keep auth in proxy.ts
  • Validate inputs in Server Actions
  • Gate env vars with NEXT_PUBLIC_ prefix
  • Extract cookies/​headers before cached scopes

Deployment

  • Vercel: Zero-config
  • Docker/​Node: output: 'standalone'
  • Monitor build times (2-5× speedup expected)
  • Configure cache lifecycles to match CDN

Reference Files

  • references/​nextjs16-reference.md - Install/​config/​checklists
  • references/​nextjs16-migration-playbook.md - Migration guide with codemods
  • references/​nextjs16-advanced-patterns.md - Streaming, caching, auth patterns
  • references/​NEXTJS_16_COMPLETE_GUIDE.md - Complete documentation
  • scripts/​bootstrap-nextjs16.ps1 - Automated setup script
  • assets/​app-router-starter/​ - Reference implementation

Resources

Version: 1.1.0 | Updated: 2025-12-27

More skills from aiskillstore

docx logo
aiskillstore/marketplace

docx

Comprehensive document creation, editing, and analysis with support for tracked changes, comments, formatting preservation, and text extraction. When Claude needs to work with professional documents (.docx files) for: (1) Creating new documents, (2) Modifying or editing content, (3) Working with tracked changes, (4) Adding comments, or any other document tasks

430 216
View
agent-development logo
aiskillstore/marketplace

agent-development

This handles everything around building autonomous agents for Claude Code plugins.

430 197
View
doc-coauthoring logo
aiskillstore/marketplace

doc-coauthoring

Guide users through a structured workflow for co-authoring documentation. Use when user wants to write documentation, proposals, technical specs, decision docs, or similar structured content. This workflow helps users efficiently transfer context, refine content through iteration, and verify the doc works for readers. Trigger when user mentions writing docs, creating proposals, drafting specs, or similar documentation tasks.

430 196
View
skill-development logo
aiskillstore/marketplace

skill-development

This is the meta-skill for building skills themselves.

430 196
View
canvas-design logo
aiskillstore/marketplace

canvas-design

Create beautiful visual art in .png and .pdf documents using design philosophy. You should use this skill when the user asks to create a poster, piece of art, design, or other static piece. Create original visual designs, never copying existing artists' work to avoid copyright violations.

430 193
View
webapp-testing logo
aiskillstore/marketplace

webapp-testing

Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.

430 191
View
hook-development logo
aiskillstore/marketplace

hook-development

Helps you build event-driven automation for Claude Code using hooks that trigger on tool use, session events, and stop conditions.

430 187
View
algorithmic-art logo
aiskillstore/marketplace

algorithmic-art

Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code, generative art, algorithmic art, flow fields, or particle systems. Create original algorithmic art rather than copying existing artists' work to avoid copyright violations.

430 185
View
command-development logo
aiskillstore/marketplace

command-development

Shows Claude Code how to build slash commands from markdown files, covering the YAML frontmatter options, dynamic arguments with $1/$2...

430 185
View
plugin-structure logo
aiskillstore/marketplace

plugin-structure

This is your reference when scaffolding Claude Code plugins or figuring out why components aren't loading.

430 183
View
skill-installer logo
aiskillstore/marketplace

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

430 180
View
web-artifacts-builder logo
aiskillstore/marketplace

web-artifacts-builder

Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web technologies (React, Tailwind CSS, shadcn/ui). Use for complex artifacts requiring state management, routing, or shadcn/ui components - not for simple single-file HTML/JSX artifacts.

430 177
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View