Referral Link Service
Component Detail
Service Layer
medium complexity
mobile
1
Dependencies
2
Dependents
2
Entities
0
Integrations
Description
Business logic layer responsible for generating, validating, and managing referral links. Communicates with the REST API to create server-side signed referral tokens encoding the referring user ID and organization context. Handles link expiration checks, deep link interception via the app_links package on first open, and pre-population of onboarding context from referral parameters.
referral-link-service
Responsibilities
- Request server-side generation of signed referral tokens via REST API
- Manage link lifecycle including creation, expiration checks, and regeneration
- Intercept deep links on app install or first open and extract referral context
- Pre-populate onboarding fields with referral parameters from the signed token
- Respect feature flag configuration controlling referral rollout per organization
Interfaces
generateReferralLink(userId, organizationId)
getReferralLink(userId)
isLinkExpired(referralLink)
regenerateLink(existingLinkId)
handleDeepLink(uri)
extractReferralContext(signedToken)
checkFeatureFlag(organizationId)
getActiveLinkForUser(userId)
revokeLink(linkId)
Relationships
Dependents (2)
Components that depend on this component
Related Data Entities (2)
Data entities managed by this component