Skip to content

feat: add referral rewards#282

Open
danielwpz wants to merge 2 commits into
mainfrom
feat/referrals
Open

feat: add referral rewards#282
danielwpz wants to merge 2 commits into
mainfrom
feat/referrals

Conversation

@danielwpz

Copy link
Copy Markdown
Contributor

Summary:

  • Add referral codes, referral binding, and referral dashboard endpoint
  • Grant invitee/inviter credits through existing credit tables when each referral's snapshotted trigger is met
  • Add admin referral config and auth/OAuth referral-code handling

Validation:

  • cargo fmt --all -- --check
  • cargo clippy --all-targets --features test -- -D warnings

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a comprehensive referral system, including database migrations, a new ReferralService, and a ReferralRepository. It integrates referral tracking into the authentication flows (OAuth, email, NEAR) and the subscription lifecycle to grant credit rewards based on configurable triggers like registration or first active subscription. Additionally, it adds administrative configuration for referrals and a new API endpoint for user referral dashboards. I have no feedback to provide as no review comments were present.

@danielwpz danielwpz marked this pull request as ready for review May 19, 2026 02:10

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa50bef56e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread crates/database/src/repositories/credits_repository.rs Outdated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant