elmeg-demo/.specify/tasks/06_gamification.md

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 Song and Show API responses.
  • Badges:
    • Create Badge model (name, icon, description).
    • Create UserBadge model (user_id, badge_id, awarded_at).
    • Implement logic to award badges (e.g., "First Review", "10 Shows Attended").
  • 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.