Data Layer medium complexity backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations

Description

Persists the output of each geography matching run for audit, analytics, and coordinator review history. Records which suggestions were presented, which was selected, and the filters in effect at the time. Supports rehydrating a previous match session for coordinator resumption.

Feature: Assignment Matching by Geography

match-result-store

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.

Responsibilities

  • Persist ranked suggestion list and active filters per match session
  • Record coordinator selection outcome and timestamp
  • Support retrieval of match history by assignment ID
  • Provide aggregated match quality metrics for analytics
  • Purge stale sessions beyond retention window

Interfaces

saveSession(session: MatchSession): Promise<string>
getSessionByAssignment(assignmentId: string): Promise<MatchSession | null>
recordSelection(sessionId: string, mentorId: string): Promise<void>
getMatchHistory(assignmentId: string): Promise<MatchSession[]>