Service Layer medium complexity backend
0
Dependencies
0
Dependents
6
Entities
0
Integrations

Description

Backend service responsible for validating and persisting activity records submitted by a coordinator on behalf of a peer mentor. Enforces authorization rules ensuring the submitting coordinator has management scope over the target mentor. Attaches proxy metadata to the stored record so reporting systems can distinguish proxy-submitted entries from self-submitted ones.

Feature: Coordinator Proxy Reporting

proxy-activity-service

Sources & reasoning

Lines 83-84 define proxy reporting as a shared coordinator need for NHF, HLF, and Barnekreftforeningen, explicitly motivated by peer mentors who will not or cannot use the app. Line 151 places the requirement at SHOULD HAVE in Phase 2 (Fase 2), which maps to v1.0 by ordinal position. The blueprint also assigns [v1.0] to this feature, confirming the target release.

  • docs/source/likeperson.md · line 83-84
    Koordinatorer må ha mulighet til å registrere aktivitet på vegne av sine likepersoner, enten enkeltvis eller samlet for faste aktiviteter (f.eks. ukentlig trening med mange deltakere).
  • docs/source/likeperson.md · line 151
    | Bulkregistrering / proxy-rapportering | ✓ | ✓ | - | ✓ | ✓ | SHOULD HAVE | 2 |

Responsibilities

  • Verify that the authenticated coordinator is authorized to submit activities for the specified peer mentor
  • Accept and validate activity payload including all required fields defined by the activity schema
  • Persist the activity record with proxy attribution fields (submitted_by_coordinator_id, proxy_submission flag)
  • Return a confirmation response with the newly created activity ID and timestamp
  • Expose a query interface for retrieving proxy submission history filtered by coordinator or mentor

Interfaces

submitProxyActivity(coordinatorId: string, mentorId: string, activity: ActivityPayload): Promise<ActivityRecord>
validateProxyAuthorization(coordinatorId: string, mentorId: string): Promise<boolean>
getProxySubmissions(coordinatorId: string): Promise<ActivityRecord[]>