Skip to content

Shared Design System & Layout Reuse

Goal

Central and Tenant applications share one visual and structural foundation. Users moving between platform admin and workspace surfaces should recognize the same shell immediately.

Business functionality will differentiate the apps later; the shell must not require another layout refactor when that happens.

Design system

ConcernShared source
Colors, typography, spacingGlobal CSS / Tailwind theme tokens
PrimitivesEloSync-Frontend/src/components/ui
Page helperscomponents/common (headers, empty/loading/error states)
App chromelayouts/app-layout.tsx + components/layout
Motion / densityCompact admin density: Inter, sidebar w-60 / collapsed w-14, topbar h-14, content px-4px-6, control h-9
Keyboard shortcutsGlobal: GlobalShortcuts (mod+b); pages: mod+k command palette; modules: useModuleShortcuts (n create, mod+f search)
Kanban boardcomponents/crm/kanban-board.tsx inside ModuleListSurface — per-column vertical scroll (titles fixed), contained horizontal scroll (data-kanban-board), document auto-scroll disabled during drag

Central-specific dashboard widgets (tenant analytics, platform health, marketplace shortcuts) stay in components/dashboard and are not reused on the Tenant dashboard.

Tenant dashboard reuses shell + WidgetContainer patterns and renders widgets from GET /api/tenant/v1/dashboard (module + permission + assignee scoped).

Layout reuse strategy

  1. One AppLayout wraps both protected route trees. ScrollToTop (inside the router) resets window scroll on pathname changes so the persistent shell does not keep the previous page’s scroll.
  2. Navigation is data, not duplicated components — swap groups by AuthContext.
  3. Route helpers resolve dashboard / profile / settings / login per context.
  4. Business pages own their content; they must not fork the shell.
  5. Modules ship real pages (mirror Leads); placeholders are only transitional.

Evolution

PhaseCentralTenant
NowPlatform metrics dashboardWidget registry dashboard (Leads/Tasks/Calendar scoped)
LaterPlatform-focused metrics stayMore module-driven widgets (Invoices, …)
ShellRemains sharedRemains shared

Installed module subscriptions and Spatie permissions drive Tenant sidebar visibility. Sidebar groups follow catalog categories and collapse except for the current-route section.

Official documentation for the EloSync SaaS Platform.