Peer Mentor Repository
Component Detail
Data Layer
medium complexity
mobilebackend
0
Dependencies
0
Dependents
7
Entities
0
Integrations
Description
Data access layer responsible for reading and updating peer mentor profile data from Supabase, joining the peer_mentors, certifications, and peer_mentor_availability tables. Provides typed data transfer objects for the service layer.
peer-mentor-repository
Responsibilities
- Fetch peer mentor record with availability and certification joins
- Update peer mentor profile fields
- Query peer mentors by organisational affiliation or location
- Persist availability changes from pause management feature
- Cache frequently accessed profiles for offline resilience
Interfaces
getMentorById(mentorId)
getMentorsByOrganisation(orgId)
updateMentorProfile(mentorId, data)
getMentorAvailability(mentorId)
getMentorCertifications(mentorId)
watchMentorChanges(mentorId)
searchMentors(query, filters)
Related Data Entities (7)
Data entities managed by this component