nextjs-app-router

Apply Next.js 14+ App Router patterns to pages, API routes, and SSE streaming.

Updated Jan 11, 2026
One-click install
npx skills add https://github.com/ohall/thesituation --skill nextjs-app-router-ohall
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-app-router
Source: https://github.com/ohall/thesituation/tree/main/.skills/nextjs-app-router
Command: npx skills add https://github.com/ohall/thesituation --skill nextjs-app-router-ohall

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This guide documents Next.js 14+ App Router patterns for building scalable web applications, clarifying how to structure route handlers, server components, client components, SSE streaming, and API design.

Core Features & Use Cases

  • Route Handlers & API Routes: design and implement endpoints using app/api and route.ts files.
  • Server & Client Components: patterns for data fetching, rendering, and hydration across server and client boundaries.
  • SSE Streaming: real-time data streaming patterns without WebSockets.
  • Dynamic Routes & UX: dynamic routing, loading, and error states techniques for robust UX.
  • Use Case: Architect a Command Center dashboard with real-time incident streams and modular UI.

Quick Start

Install a Next.js 14+ project and apply App Router patterns to create pages, API routes, and streaming endpoints.

Frequently Asked Questions about nextjs-app-router

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I structure API routes in Next.js 14 App Router?

Next.js 14 App Router structures API routes using app/api directories and route.ts files. This pattern replaces the pages/api structure, allowing you to design endpoints with TypeScript directly within the app folder hierarchy.

What is the difference between server and client components in Next.js App Router?

Server and client components in Next.js App Router separate data fetching and rendering logic across server and client boundaries. Server components fetch data securely on the server, while client components handle hydration and interactive UI states.

How do I implement SSE streaming in Next.js without WebSockets?

SSE streaming in Next.js is implemented using route handlers within the App Router. This pattern enables real-time data streaming from server to client without requiring WebSocket connections, ideal for live dashboard updates.

Can I use TypeScript with Next.js dynamic routes and loading states?

Yes, TypeScript works seamlessly with Next.js App Router dynamic routes, loading, and error states. This combination ensures robust UX by providing type safety while managing asynchronous data fetching and route hydration.

What's the best way to architect a real-time dashboard with Next.js App Router?

Architecting a real-time dashboard with Next.js App Router involves combining server components for modular UI and route handlers for SSE streaming. This setup efficiently delivers real-time incident streams and dynamic data updates.

Why am I getting hydration errors with Next.js server and client components?

Hydration errors with Next.js server and client components typically occur when client-side rendering logic improperly crosses server boundaries. Applying correct App Router patterns for data fetching and component separation resolves these mismatches.