GeolocationRepository
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
0
Dependents
1
Entities
0
Integrations
Description
Data access layer responsible for persisting and querying peer mentor geolocation records in the database. It provides CRUD operations for location entries and supports spatial queries to retrieve mentors within geographic bounds or proximity ranges. This repository integrates with the profile-data-settings feature to associate locations with mentor profiles.
geolocation-repository
Sources & reasoning
Lines 99 and 359 directly name geographic map view as a Blindeforbundet need and place it in Fase 3. Fase 3 maps to v1.1 by ordinal position. The blueprint confirms this area at v1.1 phase.
-
docs/source/likeperson.md · line 99Geografisk kartvisning av likepersoner for matching og oppdragstildeling (særlig store fylker).
-
docs/source/likeperson.md · line 359Geografisk kartvisning (Blindeforbundet)
Responsibilities
- Store and update peer mentor geolocation records linked to profiles
- Query mentor locations within specified geographic bounds
- Support filtering by mentor status, availability, and certification fields
- Provide proximity-based queries for nearest-mentor lookups
- Maintain audit trail for location record changes
Interfaces
findByBounds(bounds: GeoBounds, filters: LocationFilters): MentorLocationRecord[]
findByMentorId(mentorId: string): MentorLocationRecord
upsertLocation(mentorId: string, coords: GeoCoordinates): void
deleteLocation(mentorId: string): void
findNearby(coords: GeoCoordinates, radiusKm: number): MentorLocationRecord[]
Related Data Entities (1)
Data entities managed by this component