Skip to content

Conversation

@fr1jo
Copy link
Contributor

@fr1jo fr1jo commented Oct 3, 2025

Summary

Implements a comprehensive referral program feature for Pinto Protocol, including referral link generation, progress tracking, and integration across the application.

Changes Made

New Features

  • Referral Link Generation: Added ReferralLinkGenerator component with automatic link generation based on user's wallet address
  • Qualification System: Users must Sow at least 1,000 Pinto to unlock their referral link
  • Progress Tracking: Visual horizontal progress bar showing qualification progress with gradient styling (now positioned above link input for better UX)
  • Analytics Integration: Comprehensive event tracking for link generation, copying, and Twitter sharing
  • Navigation Integration: Added Referral to main navigation menu (positioned after Pod Market, before Collection)
  • Swap Page Integration: Added referral rewards information to Swap rewards tooltip

UI/UX Improvements

  • Consistent Design System: Updated referral page to use Pinto design tokens (pinto-h1, pinto-h2, pinto-body-light, etc.)
  • Wider Layout: Changed to PageContainer variant="lg" for better space utilization
  • Disabled State: Link input and copy button are disabled/grayed out until qualification threshold is met
  • Progress-First Flow: Qualification progress bar appears before the link input to show users what they need to do first
  • Real-time Copy Feedback: Toast notifications on successful link copy
  • Twitter Share Integration: Direct sharing to Twitter with pre-formatted message
  • Responsive Stats Display: 2-column layout for referral statistics
  • Separated Sections: Distinct cards for stats, leaderboard (placeholder), and information

Content Updates

  • Updated referral bonus from 1% to 10%
  • Clarified that only the referrer earns the bonus (not both parties)
  • Capitalized all instances of "Sow/Sows" for consistency
  • Removed redundant CTA section
  • Rebranded "Beans" to "Pinto" throughout

Technical Details

  • New component: src/components/ReferralLinkGenerator.tsx
  • New page: src/pages/Referral.tsx
  • Updated navigation: src/components/nav/nav/Navi.desktop.tsx
  • Analytics events added to ANALYTICS_EVENTS.REFERRAL
  • Referral address encoding utility: encodeReferralAddress

Files Created

  • /src/components/ReferralLinkGenerator.tsx - Core referral link generation component
  • /src/pages/Referral.tsx - Main referral program page

Files Modified

  • /src/components/nav/nav/Navi.desktop.tsx - Added Referral navigation item
  • /src/pages/Swap.tsx - Added referral info to rewards tooltip (previous commit)

Test Plan

  • Connect wallet and verify referral link generation
  • Test with < 1,000 Pinto sown - link should be disabled with progress bar shown first
  • Test with >= 1,000 Pinto sown - link should be enabled
  • Verify copy functionality and toast feedback
  • Test Twitter share link formatting
  • Check navigation on both desktop and mobile
  • Verify analytics events are firing correctly
  • Test responsive layout on different screen sizes

Screenshots/Demo

Referral page with qualification progress, stats tracking, and comprehensive information sections

🤖 Generated with Claude Code

@netlify
Copy link

netlify bot commented Oct 3, 2025

Deploy Preview for pintomoney failed.

Name Link
🔨 Latest commit 25eb501
🔍 Latest deploy log https://app.netlify.com/projects/pintomoney/deploys/692db56d43096b000992c3ca

@fr1jo fr1jo changed the title feat: add referral link generation feature with analytics tracking feat: referrals Oct 3, 2025
fr1jo and others added 12 commits October 4, 2025 01:08
- Update page layout to use consistent design system (variant="lg" container)
- Replace all typography with Pinto design system classes
- Add Separator component for consistent visual hierarchy
- Replace text-based warning with visual horizontal progress bar
- Show qualification progress with animated gradient bar
- Display remaining beans needed to unlock referral link
- Update all color classes to use design system tokens
- Improve mobile responsiveness with responsive padding

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add min-w-0 to input to allow proper flexbox shrinking
- Add text-sm to input for better URL readability
- Add whitespace-nowrap to Copy button to prevent text wrapping
- Ensure input takes maximum available space in flex container

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Remove "How it works" section from ReferralLinkGenerator (redundant with main page)
- Replace all instances of "Beans" with "Pinto" for brand consistency
- Update progress bar labels to show "Pinto" instead of "Beans"
- Update Twitter share text to reference "Pinto"
- Update FAQ text to use "Pinto" terminology

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Split "Your Referral Stats" and "Referral Leaderboard" into separate cards
- Move leaderboard section above "How It Works" component
- Update referral stats to show specific metrics:
  - Total Pods Earned (placeholder: 0)
  - Successful Referrals (placeholder: 0)
- Improve visual hierarchy with dedicated sections
- Add better spacing and layout for stats display

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Update all instances of 1% to 10% referral bonus
- Clarify that only the referrer earns the bonus, not both parties
- Update Twitter share text to reflect accurate mechanics
- Update hero description and all "How It Works" copy
- Remove misleading "you both earn" language

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Capitalize all instances of "sow/sows" to "Sow/Sows" for brand consistency
- Remove "Ready to Start Earning?" CTA card (redundant)
- Change stats layout from 2 rows to 2 columns in 1 row (grid-cols-2)
- Update all copy across both referral components

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Move referral link input to always be visible at top
- Disable input and copy button when threshold not met (grayed out)
- Reorder UI: link input first, then qualification progress, then active state
- Better visual hierarchy showing link is locked until qualified
- Input adapts to full width with flex-1 min-w-0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Reorder navigation items in home tab
- New order: Overview, Silo, Field, Swap, Pod Market, Referral, sPinto, Collection
- Referral now appears after Pod Market and before Collection

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Improves UX by showing users the progress they need to make before
displaying the locked referral link input.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@fr1jo fr1jo changed the title feat: referrals feat: implement referral program with link generation and progress tracking Oct 4, 2025
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.

3 participants