Communitygithub.com

Next.js 16 Launchpad

Next.js 16과 Turbopack, Cache Components, proxy.ts를 사용한 부트스트래핑, 마이그레이션, 빌드를 위한 기술입니다. App Router와 React 19와 함께 사용하세요.

Next.js 16 Launchpad란 무엇인가요?

Next.js 16 Launchpad는 차세대 Next.js 16 애플리케이션 개발을 위한 포괄적인 기술 안내서입니다. 이 기술은 기본적으로 활성화된 Turbopack(빌드 속도 2~5배 향상), Cache Components('use cache' 지시어), 그리고 명시적인 요청 처리 제어를 위한 proxy.ts 파일을 중심으로 구성되어 있습니다. 개발자는 기존 Next.js 15 프로젝트를 16으로 마이그레이션하거나, 새로운 App Router 기반 프로젝트를 손쉽게 부트스트래핑할 수 있습니다. 주요 지원 플랫폼으로는 Vercel(무설정 배포), Docker/Node(standalone 출력 모드) 등을 포함하며, 성능 최적화를 위해 Turbopack 유지, Promise.all을 통한 병렬 데이터 로딩, Suspense를 활용한 스트리밍 경계 설정 등의 패턴을 제시합니다. 또한 마이그레이션 체크리스트와 의사 결정 가이드를 제공하여 개발자가 프로젝트 상황에 맞게 최적의 구성을 선택할 수 있도록 돕습니다.

지원 대상~Claude Code~Codex CLI~Cursor
npx skills add https://github.com/ComeOnOliver/skillshub/tree/HEAD/skills/aiskillstore/marketplace/calel33/next-js-16-launchpad

즐겨 사용하는 AI에게 물어보기

이 에이전트 스킬이 미리 로드된 새 채팅을 엽니다.

문서

Next.js 16 Launchpad은(는) 무엇을 하나요?

Next.js 16: Turbopack 기본 설정 (빌드 속도 2~5배 향상), Cache Components ('use cache'), 그리고 명시적 제어를 위한 proxy.ts.

사용 시점

✅ Next.js 16, Turbopack, Cache Components, proxy 마이그레이션, App Router, React 19.2

❌ Pages Router, Next.js ≤15, 일반적인 React 질문

요구 사항

도구버전
Node.js20.9.0+
TypeScript5.1.0+
React19.2+

빠른 시작

# 새 프로젝트
npx create-next-app@latest my-app

# 기존 프로젝트 업그레이드
npx @next/codemod@canary upgrade latest
npm install next@latest react@latest react-dom@latest

권장: TypeScript, ESLint, Tailwind, App Router, Turbopack, @/* 별칭.

최소 설정

// 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>
}

설정

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

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

export default nextConfig

v15 → v16 변경 사항

v15v16
experimental.turbopack기본값
experimental.pprcacheComponents
middleware.ts (Edge)proxy.ts (Node)
동기 paramsawait params

핵심 패턴

1. 서버 컴포넌트 (기본값)

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

2. 캐시 컴포넌트

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. 클라이언트 컴포넌트

'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. 프록시 경계

// 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. 캐시 태그 + 서버 액션

// 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. 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>
}

핵심 개념

  1. Turbopack - Rust 번들러, 증분 컴파일, Fast Refresh
  2. 서버 컴포넌트 - app/에서 기본값, 클라이언트 JS 없음
  3. 클라이언트 컴포넌트 - 'use client', 훅, 브라우저 API
  4. 캐시 컴포넌트 - 'use cache' + cacheLife() for PPR
  5. 프록시 경계 - 인증/재작성/리디렉션을 위한 proxy.ts
  6. 부분 사전 렌더링(PPR) - 정적 셸 + 동적 스트리밍

마이그레이션 체크리스트

  1. 비동기 요청 API

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

    업데이트: const { slug } = await params

  2. middleware.ts → proxy.ts

    • 파일 이름 변경, proxy 내보내기
    • Node 런타임만 사용 (Edge 아님)
  3. 설정 업데이트

    • experimental.* 플래그 제거
    • cacheComponents, reactCompiler 활성화
    • serverRuntimeConfig/publicRuntimeConfig 제거
  4. 캐시 컴포넌트

    • experimental.ppr을 cacheComponents: true로 교체
    • 동적 섹션을 <Suspense>로 감싸기
  5. 이미지

    • 쿼리 문자열을 위한 images.localPatterns 설정

전체 가이드는 references/nextjs16-migration-playbook.md를 참조하세요.

일반적인 함정

❌ 'use cache'와 런타임 API(cookies(), headers()) 혼용 ❌ 캐시 컴포넌트 활성화 시 <Suspense> 누락 ❌ Turbopack에서 틸드(~) Sass 임포트 사용 ❌ Edge 런타임에서 proxy.ts 실행

✅ 먼저 쿠키/헤더를 읽어 캐시된 컴포넌트에 props로 전달 ✅ 동적 자식을 <Suspense>로 감싸기 ✅ 표준 Sass 임포트 사용 ✅ 프록시에는 Node 런타임 사용

의사 결정 가이드

캐시 컴포넌트를 활성화할까요? → 예: 정적/반정적 콘텐츠인 경우 → 아니요: 완전 동적 대시보드인 경우

인증은 어디에 구현하나요? → proxy.ts: 라우트 간 검사 → 라우트 핸들러: API별 로직

'use client'는 언제 사용하나요? → 훅, 상태, 브라우저 API가 필요할 때만 → 프레젠테이셔널 컴포넌트는 서버 측 유지

프로덕션 패턴

전자상거래

// 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>
    </>
  )
}

인증된 대시보드

// 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))
  }
}

더 많은 청사진은 references/nextjs16-advanced-patterns.md를 참조하세요.

성능

  • Turbopack을 활성화 상태로 유지 (필요한 경우에만 --webpack으로 비활성화)
  • Promise.all로 데이터 가져오기 병렬화
  • 스트리밍 경계를 위해 <Suspense> 사용
  • 대규모 저장소의 경우 파일 시스템 캐시 활성화

보안

  • server-only 패키지 + React Taint API 사용
  • proxy.ts에서 인증 유지
  • 서버 액션에서 입력 유효성 검사
  • NEXT_PUBLIC_ 접두사로 env 변수 관리
  • 캐시된 범위 전에 쿠키/헤더 추출

배포

  • Vercel: 무설정 배포
  • Docker/Node: output: 'standalone'
  • 빌드 시간 모니터링 (2~5배 속도 향상 예상)
  • CDN에 맞게 캐시 수명 주기 설정

참조 파일

  • references/nextjs16-reference.md - 설치/설정/체크리스트
  • references/nextjs16-migration-playbook.md - codemod를 사용한 마이그레이션 가이드
  • references/nextjs16-advanced-patterns.md - 스트리밍, 캐싱, 인증 패턴
  • references/NEXTJS_16_COMPLETE_GUIDE.md - 전체 문서
  • scripts/bootstrap-nextjs16.ps1 - 자동 설정 스크립트
  • assets/app-router-starter/ - 참조 구현

리소스

버전: 1.1.0 | 업데이트: 2025-12-27

Individual skills in this repo

This repo contains 20 individual skills — each has its own dedicated page.

ComeOnOliver/skillshub

Create stunning, animation-rich HTML presentations from scratch or by converting PowerPoint files. Use when the user wants to build a presentation, convert a PPT/PPTX to web, or create slides for a talk/pitch. Helps non-designers discover their aesthetic through visual exploration rather than abstract choices.

ComeOnOliver/skillshub

Next.js 16+ 和 Turbopack — 增量打包、文件系统缓存、开发速度,以及何时使用 Turbopack 与 webpack。

ComeOnOliver/skillshub

SwiftUI architecture patterns, state management with @Observable, view composition, navigation, performance optimization, and modern iOS/macOS UI best practices.

ComeOnOliver/skillshub

See, Understand, Act on video and audio. See- ingest from local files, URLs, RTSP/live feeds, or live record desktop; return realtime context and playable stream links. Understand- extract frames, build visual/semantic/temporal indexes, and search moments with timestamps and auto-clips. Act- transcode and normalize (codec, fps, resolution, aspect ratio), perform timeline edits (subtitles, text/image overlays, branding, audio overlays, dubbing, translation), generate media assets (image, audio, video), and create real time alerts for events from live streams or desktop capture.

ComeOnOliver/skillshub

AI-assisted video editing workflows for cutting, structuring, and augmenting real footage. Covers the full pipeline from raw capture through FFmpeg, Remotion, ElevenLabs, fal.ai, and final polish in Descript or CapCut. Use when the user wants to edit video, cut footage, create vlogs, or build video content.

ComeOnOliver/skillshub

Next.js 15 애플리케이션을 위한 프론트엔드 개발 가이드라인. React 19, TypeScript, Shadcn/ui, Tailwind CSS를 사용한 모던 패턴. Server Components, Client Components, App Router, 파일 구조, Shadcn/ui 컴포넌트, 성능 최적화, TypeScript 모범 사례 포함. 컴포넌트, 페이지, 기능 생성, 데이터 페칭, 스타일링, 라우팅, 프론트엔드 코드 작업 시 사용.

ComeOnOliver/skillshub

Provides Tamagui patterns for config v4, compiler optimization, styled context, and cross-platform styling. Must use when working with Tamagui projects (tamagui.config.ts, @tamagui imports).

ComeOnOliver/skillshub

Create distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.

ComeOnOliver/skillshub

Create high-converting, visually distinctive landing pages. Use when building marketing pages, product launches, SaaS homepages, or any single-page conversion-focused website. Guides section-by-section composition with anti-AI-slop principles.

ComeOnOliver/skillshub

Auto-loaded context for Portfolio Buddy 2 development. Use for ANY task involving: React 19 development, TypeScript, portfolio analysis features, metrics calculations, trading strategy comparison, or working with the Portfolio Buddy 2 codebase. Contains tech stack, known issues, and architectural constraints.

ComeOnOliver/skillshub

Next.js development tooling via MCP. Inspect routes, components, build info, and debug Next.js apps. Use when working on Next.js applications, debugging routing, or inspecting app structure. NOT for general React or non-Next.js projects.

ComeOnOliver/skillshub

Implement UI using Shadcn MCP (atoms/theme) and 21st.dev MCP (complex sections). Use when adding buttons, layouts, or generating landing pages.

ComeOnOliver/skillshub

A conceptual skill for building an API client in Next.js that handles JWT tokens

ComeOnOliver/skillshub

Best practices and patterns for Next.js App Router, Server Actions, and Routing in this project.

ComeOnOliver/skillshub

The Design System, Theme, and UX rules for the Physical AI Hub.

ComeOnOliver/skillshub

Comprehensive frontend development skill for building modern, performant web applications using ReactJS, NextJS, TypeScript, Tailwind CSS. Includes component scaffolding, performance optimization, bundle analysis, and UI best practices. Use when developing frontend features, optimizing performance, implementing UI/UX designs, managing state, or reviewing frontend code.

ComeOnOliver/skillshub

This document captures learnings from fixing keyboard navigation issues when floating components (Select, DropdownMenu, Popover) have CSS open/close animations.

ComeOnOliver/skillshub

Build Next.js 16 applications with correct patterns and distinctive design. Use when creating pages, layouts, dynamic routes, upgrading from Next.js 15, or implementing proxy.ts. Covers breaking changes (async params/searchParams, Turbopack, cacheComponents) and frontend aesthetics. NOT when building non-React or backend-only applications.

ComeOnOliver/skillshub

Comprehensive Framer Motion animation library for React. Covers motion components, variants, gestures, page transitions, and scroll animations. Use when adding animations to React/Next.js applications.

ComeOnOliver/skillshub

Build interfaces that resonate, not just render. This skill enforces bold, intentional

관련 스킬