high complexity v1.1 extracted Geographic Map View Confidence: 100%
2
Components
43
Shared
0
User Stories
Yes
Analyzed

Description

Assignment Matching by Geography is a service-layer capability that ranks eligible peer mentors by proximity to a contact's location when a coordinator dispatches an assignment. The system computes Haversine distances server-side and surfaces a ranked suggestion list in both the assignment dispatch flow and the Peer Mentor Map overlay. It applies eligibility filters before distance ranking so only active, available, and organization-scoped mentors appear. The feature is a direct algorithmic companion to the Peer Mentor Map and is gated by the same geographic-map-view module toggle.

Sources & reasoning

The source phrase 'for matching og oppdragstildeling' explicitly names two distinct use cases - visualization (map screen) and algorithmic matching/dispatch (this service). Blindeforbundet's large-county geography makes server-side proximity ranking essential, not just a nice UI. Fase 3 roadmap placement maps to v1.1, consistent with peer-mentor-map.

No source references — this artifact was included based on reasoning alone (see above).

Analysis

Business Value

Manual geographic matching forces coordinators to cross-reference location data from memory or separate records, producing suboptimal pairings that increase volunteer travel and slow assignment acceptance. Automated proximity ranking cuts coordinator decision time, reduces travel burden on peer mentors, and shortens the gap between assignment creation and dispatch - directly improving support response times for contacts in need. For Blindeforbundet, which operates across wide regional geographies with many active mentors, this ranking is an operational necessity rather than a convenience. Better geographic matching also reduces burnout risk by distributing assignments more fairly across the mentor pool based on objective proximity data.

Implementation Notes

The backend exposes a ranked suggestions endpoint (GET /api/v1/assignments/:id/suggested-mentors) that applies eligibility filters (active status, org membership, module-enabled) before computing Haversine distances between the contact's registered location and each candidate's peer_mentor_locations record. Computation runs entirely server-side to avoid exposing raw coordinates to clients beyond what is necessary for display. A graceful fallback returns an unranked eligible-mentor list when location data is absent for either the contact or the mentor. All location lookups are recorded in the organization's audit log per the platform's audit requirements. The geographic-map-view module toggle gates both this service and the map UI; tenants with the module disabled receive 403 on the suggestions endpoint.

Components (45)

Service Layer (2)

Shared Components

These components are reused across multiple features

User Stories

No user stories have been generated for this feature yet.