โ† Back to list

๐Ÿš€ Why I Switched to Feature-Based Architecture in Frontend (FSD)

Ever joined a project where it takes 20 minutes just to understand where to put a new component?

Daniil Sapielkin ยท 2026-03-04 12:41 ยท 0 claps ยท 3.3 min read
#architecture #fsds #frontend #frontend-architecture #frontend-developer
Open on Medium โ†—
Wiki topics: ๐ŸŒ ยท Web Development ๐Ÿ›๏ธ ยท Architecture

๐Ÿš€ Why I Switched to Feature-Based Architecture in Frontend (FSD)

Ever joined a project where it takes 20 minutes just to understand where to put a new component?

And hereโ€™s the main lesson Iโ€™ve learned:

Simpler architecture = faster, more resilient teams.

โš ๏ธ The Problems I Kept Seeing

As projects grow, architecture decisions start shaping team performance more than code quality itself.

Here are recurring issues I observed:

  • Teams spend more time debating folder structure than building product features.
  • Feature-Sliced Design (FSD) is interpreted differently by every developer, leading to inconsistency.
  • Over-engineered patterns like DDD, MVC, and MVVM are introduced without clear necessity.
  • New developers struggle with onboarding because the structure feels abstract and overly theoretical.

Instead of accelerating development, architecture becomes friction.

๐Ÿ’ก Why I Chose Feature-Based (Modular) Architecture

Feature-based architecture organizes code around business functionality, not technical layers.

Instead of structuring your project like this:

components/
hooks/
services/
store/
utils/

You structure it like this:

features/
  auth/
  payments/
  profile/
pages/
shared/

Each feature becomes a self-contained unit. This small shift changes everything.

โœ… Benefits Iโ€™ve Experienced

1. Clear Feature Boundaries

Each feature owns:

  • Its UI components
  • Its business logic
  • Its hooks
  • Its services
  • Its local state/model

No hidden dependencies scattered across the project.

2. Faster Onboarding

  1. When a new developer joins:
  2. They donโ€™t ask, โ€œWhere do I put this?โ€
  3. They ask, โ€œWhich feature does this belong to?โ€
  4. Thatโ€™s a massive cognitive difference.

3. Reduced Cognitive Load

Instead of thinking in technical abstractions, developers think in product terms:

  • โ€œThis belongs to dashboard analytics.โ€
  • โ€œThis is part of subscription billing.โ€
  • โ€œThis belongs to user settings.โ€

Architecture aligns with how the business thinks.

4. Natural Scalability

As the project grows:

  • You add features.
  • You expand existing ones.
  • You rarely touch unrelated areas.

Complex dashboards? Still manageable โ€” because each widget is part of a feature, not an entangled shared mess.

โœจ Core Principles I Follow

Hereโ€™s the simplified version of how I apply it in production:

๐Ÿงฉ Page = Screen Orchestrator

A page should assemble features. It should not contain business logic.

๐Ÿงฉ Feature = Self-Contained Functional Unit

A feature may include:

feature-name/
  components/
  hooks/
  services/
  model/
  index.ts

It is atomic and independent.

๐Ÿงฉ Separate UI from Business Logic

  • UI components handle presentation.
  • Hooks/services handle logic.
  • State/model handles domain behavior.

This keeps components clean and reusable.

๐Ÿงฉ Avoid Overloading Components

If youโ€™re adding endless variant, mode, and type props to make one component handle five scenariosโ€ฆ

Youโ€™re likely forcing unrelated responsibilities into a single abstraction.

Instead:

  • Create separate implementations.
  • Keep them simple.
  • Optimize later if necessary.

๐Ÿงฉ The One-Sentence Rule

If you cannot describe what a feature or component does in one sentenceโ€ฆ

Itโ€™s probably doing too much.

๐Ÿ— Example: Dashboard Structure

Imagine a dashboard page:

pages/
  Dashboard/

features/
  revenue-chart/
  user-activity/
  subscription-overview/
  notifications/

shared/
  ui/
  lib/
  hooks/

The Dashboard page simply orchestrates:

  • <RevenueChart />
  • <UserActivity />
  • <SubscriptionOverview />
  • <Notifications />

Each feature:

  • Has its own internal logic.
  • Does not depend on sibling features.
  • Exposes only what is necessary.

Even years later, this structure remains understandable.

๐Ÿ“Œ Shared Code: Use It Carefully

Feature-based does not mean duplication everywhere.

Shared should contain:

  • Generic UI primitives (Button, Input, Modal)
  • Cross-cutting utilities
  • Reusable hooks without business context

But:

If itโ€™s business-specific โ€” it belongs to a feature.

๐Ÿง  Why I Recommend This Approach

From real production experience, this architecture:

  • Speeds up onboarding.
  • Reduces mistakes.
  • Improves ownership.
  • Scales across small and large teams.
  • Minimizes โ€œwhere is this located?โ€ confusion.
  • Keeps teams focused on business value.

And most importantly:

It prevents wasting time exploring project structure instead of building functionality.

๐Ÿค” About FSD and Strict Methodologies

Feature-based architecture isnโ€™t โ€œone strict FSD method.โ€

Itโ€™s pragmatic.

Many communities discuss Feature-Sliced Design extensively, but in practice, interpretations vary wildly. Instead of blindly following a rigid doctrine, I prefer adapting the core idea:

Organize by business capability. Keep boundaries clear. Avoid unnecessary abstraction.

Thatโ€™s it.

๐Ÿ–ผ Architecture Overview

In the infographic accompanying this article, I illustrate:

  • A Dashboard page assembling multiple features.
  • Each feature containing its own components, hooks, services, and model.
  • Clear folder responsibilities explained in plain English.
  • Proper organization of shared code and optional widgets/hooks.

The goal is simple:

Make the structure immediately understandable to anyone reviewing the project.

Final Thoughts

Architecture should serve the team โ€” not the other way around.

The best structure is the one that:

  • Reduces cognitive overhead.
  • Encourages ownership.
  • Scales with business growth.
  • Remains understandable years later.

Iโ€™ve applied this approach in production projects with very different lifecycles โ€” and many of those applications remain easy to maintain even years later.

If you see something I overlooked or disagree with โ€” Iโ€™d genuinely love to hear your experience.

Especially because in many communities, FSD is widely discussed โ€” yet interpreted very differently in practice.

Letโ€™s refine the conversation together.


๋ฉ”ํƒ€๋ฐ์ดํ„ฐ
post_id
7a021a945146
slug
why-i-switched-to-feature-based-architecture-in-frontend-fsd-7a021a945146
url
https://medium.com/@sapielkin.daniil/why-i-switched-to-feature-based-architecture-in-frontend-fsd-7a021a945146
canonical_url
https://medium.com/@sapielkin.daniil/why-i-switched-to-feature-based-architecture-in-frontend-fsd-7a021a945146
author_url
https://medium.com/@sapielkin.daniil
status
ok
fetched_at
2026-06-16 20:05:23