Context Model (App State Only)
Principle
Context is for cross-page app state. Server datasets belong to query hooks (TanStack), not context.
Current Contexts
auth- session identity, current user, auth actionssystem- system permission catalog (from/system/permissions)notifications- global notifications + unread countui- global busy/session UI statetheme- theme and persistence behavior
Aggregation
src/context/index.ts contains:
- static registry (
getContext,getContexts) - wrapper helper (
wrapWithContexts) - app wrapper (
AppContextProvider)
This allows one import point and consistent provider order.