Points System
Overview
How It Works
Database Schema
user_points
user_pointsColumn
Type
Nullable
Default
Description
point_transactions
point_transactionsColumn
Type
Nullable
Default
Description
Point Earning Activities
Default Point Values
Action
Points
Description
Custom Point Awards
Negative Points
Level System
Level Calculation
Points Per Level
Level Progress Tracking
Level Benefits
Badge System
Badge Definitions
Badge Unlocking
Badge
Level Required
Points Required
Icon
Badge Storage
Badge Display
Point Transactions
Transaction Structure
Transaction History
Metadata Usage
Real-time Updates
Supabase Subscriptions
Auto-refresh
Frontend Components
usePoints Hook
usePoints HookPointsDashboard Component
PointsDashboard ComponentIntegration Points
Award Points on Trade
Award Points on Token Creation
Daily Login Bonus
Referral Bonus
User Flows
Flow 1: First Time User
Flow 2: Level Up
Flow 3: Badge Unlock
Flow 4: View History
Best Practices
For Developers
For Product
Troubleshooting
Points Not Adding
Level Not Updating
Badges Not Appearing
Duplicate Transactions
Performance Considerations
Database Indexes
Query Optimization
Caching Strategy
Future Enhancements
Potential Features
Technical Improvements
Last updated
Was this helpful?