Feature-Sliced Design

Implement Feature-Sliced Design layers in Next.js monorepos with Turborepo.

1|Updated Aug 11, 2025
One-click install
npx skills add https://github.com/ceami/opendata-web --skill feature-sliced-design-ceami
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Feature-Sliced Design
Source: https://github.com/ceami/opendata-web/tree/main/.claude/skills/feature-sliced-design
Command: npx skills add https://github.com/ceami/opendata-web --skill feature-sliced-design-ceami

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Feature-Sliced Design provides a clear, scalable structure for front-end code, breaking concerns into layers (app, views, widgets, features, entities, shared) to prevent circular dependencies and improve maintainability, especially in large Next.js projects and monorepos.

Core Features & Use Cases

  • Clear layer-based architecture with 7 layers (app, views, widgets, features, entities, shared)
  • Monorepo-friendly structure for Turborepo, isolated app structures, and shared packages
  • Public API pattern via index.ts exports to prevent cross-imports
  • Slices and segments organization (ui, model, api, lib, config)
  • Routing and app structure guidance for Next.js App Router and FSD App layer
  • Migration strategies and best practices

Quick Start

Create the layered project structure as described and begin applying FSD in your Next.js project.

Frequently Asked Questions about Feature-Sliced Design

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

FAQPage Schema
How do I structure a large Next.js app to prevent circular dependencies?

Feature-Sliced Design structures large Next.js apps into seven layers—app, views, widgets, features, entities, and shared—to prevent circular dependencies. It enforces cross-layer import rules and a public API export pattern for scalable maintenance.

What is the best way to organize a Next.js monorepo using Turborepo?

The best way to organize a Next.js monorepo using Turborepo is applying Feature-Sliced Design. It provides a monorepo-friendly structure with isolated app structures and shared packages, ensuring scalable front-end code maintenance across the workspace.

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

Feature-Sliced Design works with the Next.js App Router by mapping routing and app structure guidance to the FSD app layer. It separates concerns into slices and segments like ui, model, api, lib, and config within the seven-layer architecture.

How do I enforce public API rules for module exports in a Next.js project?

You enforce public API rules in a Next.js project by applying the Feature-Sliced Design public API export pattern via index.ts files. This prevents unauthorized cross-imports between slices and layers, avoiding circular dependencies in the codebase.

When do I need Feature-Sliced Design for my frontend architecture?

You need Feature-Sliced Design for your frontend architecture when building large-scale Next.js applications in a Turborepo. It breaks concerns into layers to improve maintainability and prevent circular dependencies in complex monorepos.