Next.js Architecture (FSD)

Organize Next.js code by business domain slices with Feature-Sliced Design.

Updated Jan 22, 2026
One-click install
npx skills add https://github.com/ngxtm/skill-rule --skill next-js-architecture-fsd-ngxtm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Next.js Architecture (FSD)
Source: https://github.com/ngxtm/skill-rule/tree/main/rules/nextjs/architecture
Command: npx skills add https://github.com/ngxtm/skill-rule --skill next-js-architecture-fsd-ngxtm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the challenge of maintaining scalable and organized Next.js projects by implementing the Feature-Sliced Design (FSD) methodology, preventing architectural decay as applications grow.

Core Features & Use Cases

  • Enforces FSD Principles: Guides developers on layer hierarchy, slice-based grouping, and segment naming conventions.
  • Scalable Project Structure: Provides a clear blueprint for organizing code by business domain rather than file type, promoting maintainability.
  • Use Case: When starting a new, large-scale Next.js project or refactoring an existing one that has become difficult to manage, apply this Skill's guidance to establish a robust and scalable folder structure.

Quick Start

Apply the Feature-Sliced Design principles to organize the src/ directory of your Next.js application.

Frequently Asked Questions about Next.js Architecture (FSD)

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

FAQPage Schema
What is Feature-Sliced Design in Next.js?

Feature-Sliced Design (FSD) is an architectural methodology that organizes Next.js applications by business domain slices, such as features and entities, and enforces a strict layer hierarchy to maintain scalability and reduce boilerplate.

How do I structure a scalable Next.js app using FSD?

Structure your scalable Next.js app by grouping code into business domain slices within the src directory. Apply the FSD layer hierarchy—App, Widgets, Features, Entities, and Shared—to separate concerns and integrate with Next.js App Router conventions.

Does Feature-Sliced Design work with the Next.js App Router?

Yes, Feature-Sliced Design integrates with Next.js App Router conventions. It aligns the strict layer hierarchy with App Router routing, server actions, and data access patterns to maintain a scalable project structure.

When should I refactor my Next.js project to use FSD?

You should refactor to FSD when your Next.js application grows large and becomes difficult to manage. Applying this architecture prevents architectural decay by organizing code by business domain rather than file type.

What are the limitations of using FSD for Next.js architecture?

Using FSD for Next.js architecture requires adhering to a strict layer hierarchy and segment naming conventions. This methodology introduces structural overhead that is best suited for large-scale applications rather than small, simple projects.

Is FSD the best way to organize Next.js folder structure?

FSD is a robust approach for organizing Next.js folder structure if you need strict layer separation and business domain grouping. Compared to organizing by file type, it provides better maintainability and scalability for complex applications.