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

Description

Backend service responsible for generating, validating, and resolving personalized referral links tied to a specific peer mentor. It ensures each link is unique, tracks click events, and attributes new registrations back to the originating mentor.

Feature: Invite Link & QR Sharing

referral-link-service

Sources & reasoning

Line 117 names vervefunksjonalitet as a unique HLF need. Line 164 of the priority matrix assigns it to Phase 3 with SHOULD priority for HLF only, and Norse Test. Phase 3 maps to v1.1 per the normalization rules. The blueprint area taxonomy (line 473) names Invite Link & QR Sharing as the first feature under referral-program, confirming this is one of the two canonical sub-features of the area.

  • docs/source/likeperson.md · line 117
    Vervefunksjonalitet for medlemsverving (appen som markedsført medlemsfordel).
  • docs/source/likeperson.md · line 164
    Verving / Referral (invite-link, rekruttering) | - | - | - | ✓ | ✓ | SHOULD (HLF) | 3
  • docs/source/likeperson.md · line 361
    Verving / Referral (HLF)

Responsibilities

  • Generate a unique invite token scoped to a peer mentor
  • Construct the full invite URL embedding the token
  • Validate tokens on redemption and resolve the referring mentor identity
  • Record click and conversion events for attribution reporting
  • Invalidate or regenerate tokens on request

Interfaces

generateInviteLink(mentorId: string): Promise<InviteLink>
resolveToken(token: string): Promise<MentorReferral>
recordClick(token: string, metadata: ClickMeta): Promise<void>
recordConversion(token: string, newUserId: string): Promise<void>
regenerateLink(mentorId: string): Promise<InviteLink>

Related Data Entities (2)

Data entities managed by this component