Skip to content

526 feat referral system for ultracite cloud#541

Merged
haydenbleasel merged 18 commits intomainfrom
526-feat-referral-system-for-ultracite-cloud
Feb 7, 2026
Merged

526 feat referral system for ultracite cloud#541
haydenbleasel merged 18 commits intomainfrom
526-feat-referral-system-for-ultracite-cloud

Conversation

@haydenbleasel
Copy link
Owner

@haydenbleasel haydenbleasel commented Jan 25, 2026

Note

High Risk
Touches billing/Stripe webhook logic and adds new credit-application side effects, so failures could mis-credit customers or create duplicate credits despite the added idempotency safeguards.

Overview
Introduces an end-to-end referral program across the app: new Prisma models (ReferralCode, Referral) and server helpers to generate/track codes, record referrals during org sync, and compute referral stats/Stripe balance.

Adds referral UX in the org dashboard (sidebar link + new /settings/referrals page) with a client dashboard to copy the referral URL and view earned/pending history.

Hooks referrals into billing by handling invoice.paid webhooks to apply $5 Stripe customer balance credits (with idempotent/atomic DB claims and deferred referrer-crediting until the referrer subscribes), and captures referral codes via a new /r/[code] route that sets an HTTP-only cookie consumed during OAuth org sync.

Written by Cursor Bugbot for commit 750d614. This will update automatically on new commits. Configure here.

@haydenbleasel haydenbleasel linked an issue Jan 25, 2026 that may be closed by this pull request
@changeset-bot
Copy link

changeset-bot bot commented Jan 25, 2026

⚠️ No Changeset found

Latest commit: 750d614

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Contributor

vercel bot commented Jan 25, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ultracite-app Ready Ready Preview, Comment Feb 7, 2026 10:23pm
ultracite-jfuu Ready Ready Preview, Comment Feb 7, 2026 10:23pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
ultracite-web Ignored Ignored Feb 7, 2026 10:23pm

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@haydenbleasel haydenbleasel merged commit 7a1098e into main Feb 7, 2026
19 checks passed
@haydenbleasel haydenbleasel deleted the 526-feat-referral-system-for-ultracite-cloud branch February 7, 2026 22:35
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.

[Feat] Referral System for Ultracite Cloud

1 participant