Files
slp-modular-cms/aidlc-docs/features/cms-frontend/construction/unit-3/functional-design/domain-entities.md
T
SluijsensandClaude Haiku 4.5 31cc45d79b docs(unit-3): Functional design for Layout & Navigation
- Role-filtered sidebar (Owner/Admin/User visibility rules BR-U3-01–06)
- Topbar removed; UserMenu + LanguageSwitcher move to sidebar footer
- Mobile slide-over sidebar with hamburger button
- Theme toggle (light/dark) with localStorage persistence and no-flash init
- New components: MobileBar, SidebarOverlay, ThemeToggle, useTheme
- Unit 2 marked complete in aidlc-state

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-06-22 11:44:24 +02:00

985 B

Domain Entities — Unit 3: Layout & Navigation

NavItem

Represents a single entry in the sidebar navigation. Defined as a constant array in Sidebar.tsx.

Field Type Description
to string TanStack Router route path
labelKey string i18n key for the display label
icon LucideIcon Icon component from lucide-react
testId string data-testid value
roles Role[] Roles that can see this item (undefined = all roles)

Role (from AuthContext)

type Role = 'Owner' | 'Administrator' | 'User';

Sourced from useAuth().user.role. Used by sidebar to filter NavItem[].

Theme

type Theme = 'light' | 'dark';

Persisted in localStorage under key cms-theme. Applied as class light or dark on <html>.

SupportedLanguage (existing, Unit 1)

type SupportedLanguage = 'en' | 'nl';

No changes from Unit 1 — changeLanguage from @/i18n/config is reused.