Data Layer medium complexity mobile
0
Dependencies
0
Dependents
12
Entities
0
Integrations

Description

Data access layer responsible for fetching and caching the coordinator's scoped member list from Supabase. Constructs complex queries joining peer_mentors, peer_mentor_availability, certifications, and honorarium records filtered by the coordinator's organizational hierarchy. Supports cursor-based pagination and filter predicates passed from the service layer.

Feature: Coordinator Member Overview

member-overview-repository

Responsibilities

  • Construct and execute coordinator-scoped Supabase queries
  • Join peer mentor, availability, certification, and honorarium tables
  • Support cursor-based pagination for large result sets
  • Apply dynamic filter predicates from service layer
  • Cache results and invalidate on relevant data changes

Interfaces

fetchMembersInScope(coordinatorId, FilterState, cursor)
fetchMemberDetail(memberId)
fetchAtRiskMembers(coordinatorId)
watchScopedMembers(coordinatorId)
invalidateCache()
applyFilterPredicates(query, FilterState)
countMembersInScope(coordinatorId)