Skip to content

Feature: Referrals — add referral programme #180

@Hexstar-labs

Description

@Hexstar-labs

Description:
Users who refer new students should earn BST tokens.

Tasks:

  • Add referralCode: string (unique, auto-generated) to User entity
  • Add referredBy: string (nullable FK to User) to User entity
  • On registration with a valid ?ref=CODE, set referredBy
  • When the referred user completes their first course, mint 50 BST to the referrer via the Token contract
  • Add GET /users/:id/referrals endpoint showing referral count and earned BST
  • Add referral link sharing UI to the profile page

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions