Geolocation Service
Component Detail
Description
Backend-integrated service that fetches role-scoped peer mentor location data from the peer_mentor_locations REST endpoint, enforcing coordinator-only access and strict organization isolation. Handles location caching, refresh scheduling, and privacy rules ensuring peer mentors cannot access the location layer.
geolocation-service
Sources & reasoning
Core service bridging the map UI to the peer_mentor_locations backend endpoint. Role-scoped access and organization isolation are non-negotiable - peer mentors must not see each other's locations, only coordinators with dispatch authority may access the location layer per the privacy controls described in the feature.
No source references — this artifact was included based on reasoning alone (see above).
Responsibilities
- Fetch peer mentor locations via role-scoped REST API endpoint
- Enforce organization isolation - return only mentors within the caller's organization
- Enforce coordinator-only access by integrating with Role Guard Service
- Cache location results with configurable TTL for low-connectivity resilience
- Trigger refresh on pull-to-refresh and periodic timer intervals
Interfaces
fetchMentorLocations(String orgId) -> Future<List<PeerMentorLocation>>
streamLocations(String orgId) -> Stream<List<PeerMentorLocation>>
refreshNow() -> Future<void>
clearCache()
Relationships
Related Data Entities (1)
Data entities managed by this component