Service Layer medium complexity backend
0
Dependencies
0
Dependents
5
Entities
0
Integrations

Description

Backend service that composes the dashboard payload for a given user by combining their role, enabled tenant modules, and current operational status. It returns a structured list of widgets and quick actions that the Home Screen renders without further logic.

Feature: Role-Specific Home Dashboard

home-composition-service

Sources & reasoning

Source defines role-specific home content and a module-registry-driven assembly of nav and home surfaces from the backend's enabled module set, making this the canonical home dashboard feature for the Home & Navigation area.

  • Screens - Role-specific home content (peer mentor vs coordinator variants)
  • Module registry - the app's navigation, home surfaces, and entry points are assembled at runtime from the enabled module set returned by the backend.

Responsibilities

  • Resolve the authenticated user's role and tenant context
  • Query the enabled module set for the tenant
  • Assemble role-appropriate widget and quick-action definitions
  • Aggregate status indicator values from upstream sources
  • Return a unified dashboard composition payload to the client

Interfaces

getDashboardComposition(userId: string): DashboardPayload
resolveEnabledWidgets(role: UserRole, modules: ModuleSet): Widget[]