-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
📅 Date
2025-08-20
💡 Idea
Refactor the shared/ui folder using Atomic Design principles to improve reusability, scalability, and clarity.
This approach separates generic design system components from feature/domain-specific components, ensuring the codebase remains maintainable as the portfolio project grows.
Why Atomic Design?
- Atoms: The smallest, indivisible components (Button, Tag, Icon, Toggle, etc.)
- Molecules: Combinations of atoms forming small functional units (Card, LanguageMenu, etc.)
- Organisms: Larger independent blocks with meaning (Navbar, Footer, Hero, etc.)
- Layout: Wrappers responsible for consistent spacing and structure (Container, Section, Grid, etc.)
Benefits
- Reusability: Atoms like
Buttonare consistent and reusable across the app. - Scalability: Molecules and Organisms scale without collapsing into a flat UI folder.
- Separation of Concerns: Domain-specific components stay in
features/, while the design system lives inshared/ui/. - Layout Consistency: Dedicated
shared/layoutensures uniform spacing, grid, and section wrappers.
📂 Suggested Folder Structure
shared/
hooks/ # Generic React hooks (useMediaQuery, useMounted, etc.)
lib/ # Pure utility functions (clsx, fetcher, etc.)
types/ # Global types (Theme, Locale, etc.)
styles/ # CSS tokens + Tailwind entrypoint
layout/ # Layout-only components (Container, Section, Grid)
ui/
atoms/ # Button, Tag, Icon, ModeSwitch
molecules/ # Card, LanguageMenu, SectionHeader
organisms/ # Navbar, Footer, Hero
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation