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

Description

Data access layer that abstracts all persistence and retrieval operations for organization data. Communicates with the REST API client to fetch the organizations list and caches responses locally using the device's offline storage. Provides typed organization models to the service layer and handles cache invalidation and expiry logic.

Feature: Organization Selection & Onboarding

organizations-repository

Responsibilities

  • Fetch the organizations list from the REST API endpoint /api/v1/organizations
  • Cache the organizations list locally for offline support and faster startup
  • Retrieve a single organization by ID including its labels and settings
  • Persist and retrieve the user's selected organization preference from local storage
  • Handle cache invalidation when organization data is updated server-side

Interfaces

getOrganizations()
getOrganizationById(orgId)
cacheOrganizations(organizations)
getCachedOrganizations()
saveSelectedOrganizationId(orgId)
getSelectedOrganizationId()
clearCache()
isCacheValid()

Relationships

Dependents (3)

Components that depend on this component

Related Data Entities (2)

Data entities managed by this component