Skip to content

Component Structure

my-buddy uses atomic design to organize components into four levels of complexity.

src/components/
├── atoms/ # Basic building blocks
├── molecules/ # Simple component groups
├── organisms/ # Complex components
└── templates/ # Page layouts

The smallest, most reusable components.

ComponentPurpose
BadgeStatus and type indicators
FilterSelectDropdown filter for list views
KeyToastKeyboard shortcut indicator
SearchInputSearch input field
SiblingNavPrevious/next navigation

Combinations of atoms that form distinct UI pieces.

ComponentPurpose
Backlinks”Referenced by” section on detail pages
BreadcrumbNavigation breadcrumb trail
FilterBarCollection of filters for list pages
RelatedContentRelated entries sidebar

Complex components that form major sections of the UI.

ComponentPurpose
SidebarMain navigation sidebar
HelpModalKeyboard shortcuts help overlay

Page-level layouts that compose organisms and define page structure.

ComponentPurpose
BaseTemplateBase HTML layout with head, styles, scripts
PageTemplateStandard page layout with sidebar and content area

Pages live in src/pages/ and use file-based routing:

RoutePage
/Dashboard
/accounts/Account list
/accounts/[slug]Account detail
/contacts/Contact list
/contacts/[slug]Contact detail
/deals/Deal list
/deals/[slug]Deal detail
/projects/Project list
/projects/[slug]Project detail
/tasks/Task list
/tasks/[slug]Task detail
/kb/KB list
/kb/[slug]KB detail
/meetings/Meeting list
/meetings/[slug]Meeting detail
/journals/Journal list
/journals/[slug]Journal detail