792 B
792 B
Task: Gamification (Stats & Badges)
Objective
Implement a stats engine and badge system to reward user engagement.
Steps
- Stats Engine:
- Create service to calculate "Times Played" for songs.
- Create service to calculate "Gap" (shows since last played).
- Expose stats via
SongandShowAPI responses.
- Badges:
- Create
Badgemodel (name, icon, description). - Create
UserBadgemodel (user_id, badge_id, awarded_at). - Implement logic to award badges (e.g., "First Review", "10 Shows Attended").
- Create
- Frontend:
- Display Song Stats on Song Detail page.
- Display User Badges on Profile page.
Acceptance Criteria
- Song page shows "Times Played" and "Gap".
- User profile displays earned badges.