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

Description

Local data layer that caches organization-specific benefit rate configurations fetched from the backend, enabling fully offline calculator operation. Stores versioned config payloads in the local SQLite database and exposes reactive streams so the Calculator Screen rebuilds when a fresher config is loaded after reconnection.

Feature: Advantage Calculator

benefit-config-repository

Responsibilities

  • Persist fetched BenefitConfig payloads to local SQLite with version metadata
  • Expose reactive stream of current config to BLoC layer
  • Detect stale cache on reconnection and trigger background refresh
  • Return last known config when network is unavailable

Interfaces

getConfig(orgId: String) → Stream<BenefitConfig?>
saveConfig(orgId: String, config: BenefitConfig) → Future<void>
isConfigStale(orgId: String, serverVersion: ConfigVersion) → bool
clearConfig(orgId: String) → Future<void>

Relationships

Dependents (3)

Components that depend on this component