Skip to main content

MO:JOURNEY - Strategic Domain

"The Navigator" — "I guide you toward your goals"

MO:JOURNEY orchestrates all domains to serve user goals. It tracks progress across multiple metrics, manages milestones, and provides the home screen experience.


Verticals

VerticalPurposeSystemsStatus
MoGoalsGoal creation & management30/3 planned
MoProgressProgress tracking & visualization30/3 planned
MoMilestonesCheckpoint management30/3 planned

Domain Data Model

interface MoJourneyData {
goals: {
active: Goal[];
paused: Goal[];
completed: Goal[];
};
progress: {
measurements: Measurement[];
trends: TrendAnalysis[];
predictions: CompletionPrediction[];
};
milestones: {
upcoming: Milestone[];
achieved: Milestone[];
missed: Milestone[];
};
}

interface Goal {
id: string;
userId: string;
goalType: 'muscle_building' | 'fat_loss' | 'strength' | 'recomp' | 'general';
priority: 'primary' | 'secondary' | 'background';
status: 'active' | 'paused' | 'completed';
startDate: Date;
targetDate: Date;
startingMetric: number;
targetMetric: number;
metricType: 'weight' | 'measurement' | '1rm' | 'other';
}

interface Measurement {
id: string;
userId: string;
date: Date;
weight?: number;
chest?: number;
waist?: number;
hips?: number;
thigh?: number;
bicep?: number;
}

Domain Interface

interface MoJourneyInterface {
// Goals
createGoal(data: CreateGoalInput): Promise<Goal>;
getActiveGoals(userId: string): Promise<Goal[]>;
updateGoal(goalId: string, data: UpdateGoalInput): Promise<Goal>;
archiveGoal(goalId: string): Promise<void>;

// Progress
getGoalProgress(goalId: string): Promise<ProgressResult>;
getMeasurements(userId: string, limit?: number): Promise<Measurement[]>;
logMeasurement(data: MeasurementInput): Promise<Measurement>;

// Milestones
getMilestones(goalId: string): Promise<Milestone[]>;
checkMilestone(milestoneId: string, actualValue: number): Promise<MilestoneResult>;
}

Code Organization

/lib/mo-journey
├── /goals
│ ├── create-goal.ts → MoGoalCreate
│ ├── update-goal.ts → MoGoalUpdate
│ └── archive-goal.ts → MoGoalArchive
├── /progress
│ ├── calculate-progress.ts → MoProgressCalculate
│ ├── get-measurements.ts → MoProgressVisualize
│ └── predict-completion.ts → MoProgressTrends
├── /milestones
│ ├── create-milestones.ts → MoMilestoneCreate
│ └── check-milestone.ts → MoMilestoneCheck
└── index.ts → Domain exports

Import Pattern

import {
createGoal, // MoGoalCreate
getActiveGoals, // MoGoals
getGoalProgress, // MoProgressCalculate
logMeasurement, // MoProgress
checkMilestone // MoMilestoneCheck
} from '@/lib/mo-journey';

API Endpoints

EndpointMethodSystem
/api/journey/goalsGET/POSTMoGoalCreate, MoGoals
/api/journey/goals/[id]GET/PATCH/DELETEMoGoalUpdate
/api/journey/goals/[id]/progressGETMoProgressCalculate
/api/journey/measurementsGET/POSTMoProgress
/api/journey/goals/[id]/milestonesGETMoMilestones

Integration with Other Domains

Consumes from:

  • MO:SELF → User preferences, equipment, training history
  • MO:PULSE → Workout sessions, recovery logs, body metrics
  • MO:COACH → Fatigue status, progression decisions
  • MO:MIND → Intelligent recommendations, conflict detection

Provides to:

  • All domains → Strategic context (what goals are active)
  • MO:MIND → Goals and measurements for analysis
  • Home screen → Primary user interface

Status

MetricValue
Verticals0/3
Systems Built0/9 (0%)
API Endpoints0
TargetPhase 1 MVP - Week 1-2