nextjs-16-architecture

Plan Next.js 16 feature-based architecture with cache invalidation and server actions.

5|2|Updated Dec 1, 2025
One-click install
npx skills add https://github.com/horuz-ai/claude-plugins --skill nextjs-16-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nextjs-16-architecture
Source: https://github.com/horuz-ai/claude-plugins/tree/main/plugins/nextjs/skills/nextjs-16-architecture
Command: npx skills add https://github.com/horuz-ai/claude-plugins --skill nextjs-16-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Provides architecture guidelines for Next.js 16 apps, including feature-based organization, cacheable data fetching, server/client separation, and consistent file naming.

Core Features & Use Cases

  • Feature folder structure: features/{feature}/ with dedicated layers.
  • Cache components and use cache: Performance-first data fetching patterns.
  • Server vs Client decisions: Clear guidance for where to place logic.
  • One-file-per-concept: 1 file per query/type/schema/hook.
  • Routing, i18n, and layouts: Standardized approach for app routes.

Quick Start

Apply the patterns to a new feature: create features/{feature}, implement a get-{entity}.ts fetch in data/, connect to server actions with cache invalidation in actions/.

Frequently Asked Questions about nextjs-16-architecture

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

FAQPage Schema
How do I structure a Next.js 16 project with feature-based architecture?

Feature-based architecture organizes Next.js 16 projects into features/{feature}/ folders with dedicated layers for data fetching, server actions, and UI components. This separation enables scalable applications with clear boundaries between server and client logic, consistent file naming (one file per concept), and explicit cache invalidation workflows using 'use cache' and cacheTag directives.

What's the best way to implement cache-first data fetching in Next.js 16?

Cache-first patterns in Next.js 16 use 'use cache' declarations, cacheTag, and cacheLife to control revalidation boundaries. Implement get-{entity}.ts files in a data layer, connect them to server actions with explicit cache invalidation, and pair with Suspense components and skeletons to render cached data while background updates occur.

How do I decide where to place logic between server and client components in Next.js 16?

Server components handle data fetching, cache management, and sensitive operations; client components manage interactivity and state. Next.js 16 architecture guidance clarifies this boundary: use server actions to bridge them, apply 'use cache' at the server boundary, and structure layouts and app routes to enforce this separation systematically across feature folders.

Can I use cache invalidation with server actions in Next.js 16?

Yes. Next.js 16 server actions integrate directly with cache invalidation via cacheTag and explicit revalidation workflows. Define cache tags in your get-{entity}.ts data layer, then call invalidation from server actions to trigger revalidation. This ensures mutations update cached data consistently across your feature-based architecture.

Do I need absolute imports for Next.js 16 feature-based organization?

Absolute imports are recommended as a convention within Next.js 16 feature-based architecture to simplify navigation across features/{feature}/ layers and maintain clarity as projects scale. Combined with one-file-per-concept naming and Suspense-driven rendering, they support consistent file discovery and reduce import path fragmentation.

What routing patterns work best with cache-first Next.js 16 applications?

Next.js 16 app routes, layouts, and i18n follow standardized patterns within feature-based organization. Use app/ routing with Suspense boundaries at layout levels, implement skeletons for streamed content, and pair with server-side caching via 'use cache' to deliver performance-optimized, internationalized routes without blocking initial page render.