Invite Store
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
0
Dependents
0
Entities
0
Integrations
Description
Persistence layer holding invite tokens, their inviter and organization bindings, and redemption records. Provides the durable attribution trail used by recruitment reporting.
invite-store
Sources & reasoning
Listed verbatim in the canonical area taxonomy under referral-program, and motivated by HLF's stated need for app-as-marketed-membership-benefit recruitment functionality. Matrix row 114 places it in Phase 3, which maps to the Growth & Engagement phase name used in §5.
-
docs/source/likeperson.md · line 75Vervefunksjonalitet for medlemsverving (appen som markedsført medlemsfordel).
-
docs/source/likeperson.md · line 114Verving / Referral (invite-link, rekruttering) | - | - | - | ✓ | ✓ | SHOULD (HLF) | 3
-
docs/source/likeperson.md · line 362referral-program | Referral Program | Invite Link & QR Sharing, Recruitment Tracking
Responsibilities
- Persist invite tokens with inviter, org, and expiry metadata
- Record redemption events tying recruits back to inviters
- Enforce uniqueness of active tokens per inviter
- Support lookup by token, by inviter, and by organization
Interfaces
insertInvite(invite): InviteId
findByToken(token): Invite | null
findByInviter(userId): Invite[]
recordRedemption(inviteId, newUserId): void