Skip to content

[PREMIUM-003] Add premium discovery boosts - #92

Open
chev0004 wants to merge 13 commits into
developfrom
feat/premium-003
Open

[PREMIUM-003] Add premium discovery boosts#92
chev0004 wants to merge 13 commits into
developfrom
feat/premium-003

Conversation

@chev0004

@chev0004 chev0004 commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Outline

Summary

Adds premium discovery boosts: premium members get three boosts per month that lift their profile to the top of the default discovery ordering for 24 hours, with usage tracked server-side, replay blocked while a boost is active, and status shown in the profile editor.


Changes & Enhancements

  • Type of Change:
    • Feature
    • Bugfix
    • Refactor
    • Chore
  • Changes:
    • (Database):
      • Add boosted_until on profiles and a profile_boosts usage table.
      • Add the discovery.monthlyBoosts entitlement (free 0, premium 3) and boost status helpers in src/db/boosts.ts.
    • (Server):
      • Add POST /api/profile/boost: premium only, public profile required, 409 while a boost is active, 429 when the monthly allowance is spent, tracks a profile.boost analytics event.
    • (Discovery):
      • Discovery profiles carry a boosted flag only while the owner is still premium; the default recently-bumped sort places boosted profiles first, while explicit name, overlap, and match-score sorts stay relevance-driven. Blocking and visibility filters apply before boosts.
      • The feed tracks a discovery.boost_impressions analytics event with the boosted card count.
    • (Profile editor):
      • The options menu shows Boost profile with the remaining monthly count, a disabled Boost active state, and an error banner on failure.

Page / App Changes

Affected Next.js Routes (Local):

  • /[lang] (boosted profiles rank first in the default sort)
  • /[lang]/profile (boost action and status in the options menu)
Before (Screenshot)
After (Screenshot)

Component / Storybook Changes

Affected Storybook Components (Local):

Before (Screenshot)
After (Screenshot)

Not Doing


Other (Remarks)

Builds on #91 (and #90, #89) and includes their commits until they merge; merge those first and this diff reduces to the boost work.


Checklists

  • Code is well-documented (comments, JSDoc, etc.).
  • Existing comments were updated as needed.
  • No out-of-scope changes are included.
  • Write TODO comments where future work is required.
  • Removed unnecessary debug code (e.g., console.log, debugger).
  • Self-reviewed and tested locally.

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