Data Layer low complexity mobile
0
Dependencies
0
Dependents
2
Entities
0
Integrations

Description

Local cache layer for role and membership data fetched from Supabase. Stores resolved role state to local storage for offline resilience, allowing the app to determine access levels even when connectivity is unavailable. Invalidated on role switch or session expiry.

Feature: Role-Based Access Control

role-config-store

Responsibilities

  • Cache active role and organization context to local storage
  • Restore cached role state on app launch without a network round-trip
  • Invalidate cache on logout, role switch, or expiry

Interfaces

saveActiveRole(role)
loadActiveRole()
saveActiveMembership(membership)
loadActiveMembership()
clearCache()
isCacheValid()

Related Data Entities (2)

Data entities managed by this component