All use-cases

Data, AI & Platform

Role-scoped dashboard

KPI cards, trends, and donuts that change with the viewer's role, period, and currency — via one injected adapter.

One adapter projects domain rows into generic primitives the chart layer never has to know about.

Role gates panels automatically — a viewer sees fewer KPIs than a group_admin. Period and currency switchers re-fetch; FX and pure calculators run on the returned data before charts render.

Bell = in-app alert Amber diamond = automatic check
User opens dashboard period + currency + roleScope injected Adapter.fetchData(supabase, opts) projects domain rows → generic primitives roleScope check pass viewer Restricted view viewer panels only fewer KPIs shown continue Period / currency switch mtd · qtd · ytd · re-fetch money.convertMinor + findRate DEMO_FX_TABLE → reporting currency Pure calculators deadStock · margin · daysCover Charts render KpiCard · TrendChart · DonutChart · PacingBar
app/dashboard
Role-scoped dashboard — period and currency switch screen recording
One adapter, any domain. Inject DashboardDataAdapter; the roleScope gate filters panels automatically; period and currency switchers re-fetch; FX conversion and pure calculators run before KpiCard, TrendChart, DonutChart, and PacingBar render.