๐ 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?
๐ 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
- When a new developer joins:
- They donโt ask, โWhere do I put this?โ
- They ask, โWhich feature does this belong to?โ
- 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