Skip to main content

MoBadges

"The Trophy Case" — "I celebrate your milestones"

Status: ❌ Future

MoBadges will track achievements, milestones, and badges to gamify the fitness journey.


Purpose

  • Award badges for achievements
  • Track milestone progress
  • Gamify consistency and progress
  • Provide shareable achievements

Planned Badge Categories

Consistency Badges

BadgeRequirementIcon
First StepComplete first workout🎯
Week Warrior7-day streak🔥
Month Master30-day streak💎
Century Club100 total workouts💯
Year of Iron365 workouts in a year🏆

Strength Badges

BadgeRequirementIcon
First PRSet first personal record
PR Machine10 PRs in a month🌟
1 Plate ClubBench 135 lbs🥉
2 Plate ClubBench 225 lbs🥈
3 Plate ClubBench 315 lbs🥇
1000 lb ClubCombined squat/bench/deadlift👑

Volume Badges

BadgeRequirementIcon
First TonLift 2000 lbs in one session💪
Volume King100,000 lbs total volume🦁
Million Pound Club1,000,000 lbs lifetime🎖️

Recovery Badges

BadgeRequirementIcon
Sleep ChampionLog 8+ hrs sleep for 7 days😴
Recovery ProLog recovery for 30 days🧘

Data Model

interface Badge {
id: string;
slug: string;
name: string;
description: string;
category: BadgeCategory;
icon: string;
requirement: BadgeRequirement;
tier: BadgeTier;
}

interface UserBadge {
userId: string;
badgeId: string;
earnedAt: Date;
progress: number; // 0-100
isComplete: boolean;
}

interface BadgeProgress {
badge: Badge;
currentProgress: number;
requiredProgress: number;
percentComplete: number;
isEarned: boolean;
earnedAt: Date | null;
}

type BadgeCategory =
| 'consistency'
| 'strength'
| 'volume'
| 'recovery'
| 'special';

type BadgeTier = 'bronze' | 'silver' | 'gold' | 'platinum';

Planned API Endpoints

EndpointMethodDescription
/api/badgesGETGet all badges with user progress
/api/badges/earnedGETGet user's earned badges
/api/badges/checkPOSTCheck and award new badges

Integration Points

Will Receive from:

  • MoSession (workout completion triggers)
  • MoRecords (PR achievements)
  • MoStreaks (streak milestones)
  • MoRecover (recovery logging)

Will Provide to:

  • Profile page (badge display)
  • Dashboard (recent badges)
  • MoShare (shareable achievements - future)
  • MoAlerts (badge earned notifications)

Badge Checking Logic

Badges would be checked:

  1. On workout completion
  2. On PR detection
  3. On streak update
  4. On recovery log
  5. Daily cron job for time-based badges
// Example badge check on workout complete
async function checkWorkoutBadges(userId: string, session: Session) {
const checks = [
checkFirstWorkoutBadge(userId),
checkWorkoutCountBadges(userId),
checkVolumeBadges(userId, session),
checkStreakBadges(userId)
];

const newBadges = await Promise.all(checks);
return newBadges.filter(Boolean);
}

Implementation Tasks

  • Design badge system schema
  • Create badges and user_badges tables
  • Define all badges with requirements
  • Build badge checking logic
  • Create badge display UI
  • Add badge earned notifications
  • Build shareable badge cards