GeographyMatchingService
Component Detail
Description
Orchestrates the full mentor recommendation flow for a given assignment. Retrieves candidate mentors, computes geographic distances, applies eligibility filters, and returns a ranked suggestion list. Acts as the primary entry point for coordinator-initiated match requests.
geography-matching-service
Sources & reasoning
Line 99 directly ties geographic visualization to matching and assignment dispatch (oppdragstildeling), providing the provenance for this feature as a distinct matching capability beyond simple map display. Line 358 places it in Fase 3, normalizing to v1.1. The blueprint lists this feature under Geographic Map View at [v1.1]. Kept as a separate feature from peer-mentor-map because matching logic and the dispatch integration are distinct from rendering the map layer.
-
docs/source/likeperson.md · line 99Geografisk kartvisning av likepersoner for matching og oppdragstildeling (særlig store fylker).
-
docs/source/likeperson.md · line 358Geografisk kartvisning (Blindeforbundet)
Responsibilities
- Fetch candidate mentor pool from the mentor location repository
- Invoke distance calculation for each candidate against the assignment target
- Apply eligibility filters (certification, availability, workload threshold)
- Compose and return ranked suggestion list sorted by composite score
- Cache results per assignment ID to avoid redundant computation
Interfaces
getRankedSuggestions(assignmentId: string, filters: MatchFilters): Promise<RankedMentorSuggestion[]>
invalidateCache(assignmentId: string): void
preloadCandidates(region: string): Promise<void>
Related Data Entities (2)
Data entities managed by this component