MoHistory
"I remember your journey"
MoHistory tracks user achievements, personal records, streaks, and milestones.
Systems
| System | Name | Status | Description |
|---|---|---|---|
| MoRecords | "The Historian" | ✅ Built | Personal records, 1RM tracking |
| MoStreaks | "The Motivator" | ✅ Built | Workout consistency tracking |
| MoBadges | "The Trophy Case" | ❌ Future | Achievements, milestones |
Vertical Interface
interface MoHistoryInterface {
// Records
getPersonalRecords(userId: string, exerciseId?: string): Promise<PersonalRecord[]>;
checkAndRecordPR(userId: string, exerciseId: string, weight: number, reps: number): Promise<PRResult>;
// Streaks
getStreak(userId: string): Promise<StreakData>;
updateStreakOnWorkout(userId: string): Promise<StreakData>;
// Badges (future)
getBadges(userId: string): Promise<Badge[]>;
checkBadgeProgress(userId: string): Promise<BadgeProgress[]>;
}
Code Location
/lib/mo-self/history/
├── records.ts → MoRecords
├── streaks.ts → MoStreaks
└── index.ts → Vertical exports
API Endpoints
| Endpoint | Method | System |
|---|---|---|
/api/records | GET | MoRecords |
/api/streaks | GET | MoStreaks |