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.

Feature: Peer Mentor Map

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 99
    Geografisk kartvisning av likepersoner for matching og oppdragstildeling (særlig store fylker).
  • docs/source/likeperson.md · line 359
    Geografisk 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