Mo - Development Plan Document
1. Development Approach
| Principle | Description |
|---|---|
| Vertical Slices | Build complete features end-to-end (DB → API → UI) |
| Ship Early | Deploy after Sprint 0, iterate continuously |
| You First | You're the first user - build what you need |
| Mobile First | All features work on mobile before desktop polish |
| Core Before Polish | Functionality first, animations/3D later |
2. Sprint Overview
| Sprint | Duration | Focus | Outcome |
|---|---|---|---|
| 0 | 3-4 days | Setup | Project scaffolded, deployed, ready to build |
| 1 | 5-7 days | Auth + Onboarding | Users can sign up and complete onboarding |
| 2 | 7-10 days | Workout Core | Log workouts, track sets/reps |
| 3 | 5-7 days | Dashboard + Progress | MoBoard, weight tracking, basic stats |
| 4 | 5-7 days | AI Coach | MoCoach chat with personality |
| 5 | 5-7 days | Exercise Library + Programs | MoGuide, MoPhase, wellness guide data |
| 6 | 5-7 days | Polish + PWA | Animations, offline, installable |
| 7 | 5-7 days | Payments + Launch | Stripe, final testing, launch |
Total Estimated Duration: 6-8 weeks
3. Sprint 0: Project Setup
Duration: 3-4 days Goal: Development environment ready, deployed skeleton
Tasks
| Task | Priority | Time | Details |
|---|---|---|---|
| Initialize Next.js 15 | P0 | 1hr | App router, TypeScript, Tailwind v4 |
| Configure shadcn/ui | P0 | 1hr | Install base components |
| Setup Drizzle + Neon | P0 | 2hr | Database connection, initial schema |
| Run initial migrations | P0 | 1hr | Users, coaches tables |
| Configure Clerk | P0 | 2hr | Auth provider, create OAuth apps |
| Setup Vercel project | P0 | 1hr | Deploy, environment variables |
| Configure ESLint/Prettier | P0 | 30min | Code quality rules |
| Setup project structure | P0 | 1hr | Folders per architecture doc |
| Create design tokens | P0 | 2hr | Tailwind config from UI doc |
| Setup Framer Motion | P1 | 1hr | Base animation config |
| Create base components | P1 | 3hr | Button, Card, Input with Mo styling |
| Setup CI/CD | P1 | 1hr | GitHub Actions for linting/tests |
Checklist
□ Next.js 15 with App Router
□ TypeScript configured
□ Tailwind v4 with design tokens
□ shadcn/ui installed
□ Drizzle ORM configured
□ Neon database connected
□ Initial migrations run
□ Clerk authentication setup
□ Google OAuth configured
□ Apple OAuth configured
□ Vercel project deployed
□ Environment variables set
□ ESLint + Prettier configured
□ Project structure created
□ Base UI components created
□ GitHub repo initialized
Deliverable
Empty app deployed at production URL with:
- Working auth flow (Clerk)
- Database connected
- Design system ready
4. Sprint 1: Authentication + Onboarding
Duration: 5-7 days Goal: Users can create account and complete onboarding
Tasks
| Task | Priority | Time | Details |
|---|---|---|---|
| Landing page (basic) | P0 | 4hr | Hero section, features, pricing, CTA |
| Clerk sign-up flow | P0 | 2hr | Email + OAuth options |
| Clerk sign-in flow | P0 | 1hr | Return users |
| User creation on signup | P0 | 2hr | Webhook or first-login handler |
| Users table complete | P0 | 1hr | All fields from schema |
| Coaches table + seed | P0 | 3hr | 8 coaches with system prompts |
| Onboarding: Goals | P0 | 2hr | Goal selection screen |
| Onboarding: Experience | P0 | 2hr | Experience level screen |
| Onboarding: Stats | P0 | 2hr | Height, weight, goal weight |
| Onboarding: Quiz | P1 | 3hr | Personality matching quiz |
| Onboarding: Coaches | P0 | 3hr | Coach selection (1-8) |
| Onboarding: Program | P0 | 2hr | Program selection |
| Onboarding: Complete | P0 | 1hr | Save all data, redirect |
| Protected routes | P0 | 2hr | Middleware for auth + onboarding |
| User profile API | P0 | 2hr | GET/PATCH /users/me |
Database Tables
-- Users (expand from Sprint 0)
users (
id, clerk_id, email, full_name, avatar_url,
height_cm, current_weight, goal_weight,
experience, fitness_goal, units, theme,
subscription, onboarded_at, created_at, updated_at
)
-- Coaches
coaches (
id, name, slug, gender, role, personality,
voice_example, avatar_url, system_prompt, is_active
)
-- User's selected coaches
user_coaches (
id, user_id, coach_id, is_primary, context, created_at
)
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/v1/users/me | GET | Get current user |
/api/v1/users/me | PATCH | Update profile |
/api/v1/users/me/onboarding | POST | Complete onboarding |
/api/v1/users/me/coaches | GET | Get selected coaches |
/api/v1/users/me/coaches | PUT | Update coach selection |
/api/v1/coaches | GET | List all coaches |
Screens Built
- MoHome (landing page - basic)
- Sign Up (Clerk hosted/embedded)
- Sign In (Clerk hosted/embedded)
- Onboarding: Goal Selection
- Onboarding: Experience Level
- Onboarding: Starting Stats
- Onboarding: Personality Quiz
- Onboarding: Coach Selection
- Onboarding: Program Selection
- Onboarding: Welcome/Ready
Checklist
□ Landing page live
□ Sign up working (email)
□ Sign up working (Google)
□ Sign up working (Apple)
□ Sign in working
□ User created in database on signup
□ Onboarding flow complete (6 steps)
□ Coaches seeded in database
□ Coach selection saving
□ Personality quiz matching
□ Protected routes working
□ Redirect to onboarding if incomplete
□ Redirect to dashboard if complete
Deliverable
New users can:
- Visit landing page
- Sign up with email or OAuth
- Complete 6-step onboarding
- Select their coach(es)
- Land on dashboard (empty)
5. Sprint 2: Workout Core
Duration: 7-10 days Goal: Log complete workouts with sets, reps, weights
Tasks
| Task | Priority | Time | Details |
|---|---|---|---|
| Exercises table + seed | P0 | 4hr | 50+ exercises from wellness guide |
| Programs table + seed | P0 | 4hr | PPL program with phases |
| Program phases table | P0 | 2hr | Foundation, Hypertrophy, etc. |
| Program days table | P0 | 2hr | Push A, Pull B, etc. |
| Program exercises table | P0 | 2hr | Exercises per day |
| Workouts table | P0 | 2hr | User workout sessions |
| Workout sets table | P0 | 2hr | Individual set logs |
| User programs table | P0 | 1hr | Track user's enrollment |
| Today's workout API | P0 | 3hr | Calculate scheduled workout |
| Workout preview screen | P0 | 3hr | Show exercises before starting |
| Start workout API | P0 | 2hr | Create workout record |
| Active workout screen | P0 | 6hr | Main logging interface |
| Set logging component | P0 | 4hr | Weight/reps input |
| Log set API | P0 | 2hr | Save individual sets |
| Rest timer component | P0 | 3hr | Countdown with coach tip |
| Complete workout API | P0 | 2hr | Finish and calculate stats |
| Workout complete screen | P0 | 3hr | Summary, duration, volume |
| Previous performance | P1 | 2hr | Show last workout data |
| PR detection | P1 | 3hr | Auto-detect and save PRs |
| Personal records table | P1 | 1hr | Store PRs |
| PR celebration modal | P1 | 2hr | Confetti + coach message |
Database Tables
-- Exercises
exercises (
id, name, slug, category, equipment,
primary_muscles, secondary_muscles,
instructions, tips, common_mistakes,
demo_url, video_url, is_active
)
-- Programs
programs (
id, name, slug, description, duration_weeks,
experience, goal, is_active
)
-- Program phases
program_phases (
id, program_id, phase_number, name,
weeks, description, focus
)
-- Program days
program_days (
id, phase_id, day_number, name,
workout_type, is_rest_day
)
-- Program exercises
program_exercises (
id, program_day_id, exercise_id, order,
sets, reps_min, reps_max, rpe_target,
rest_seconds, notes, is_warmup
)
-- User programs
user_programs (
id, user_id, program_id, current_phase,
current_week, status, started_at, completed_at
)
-- Workouts
workouts (
id, user_id, program_day_id, date, status,
started_at, completed_at, duration_min,
coach_greeting, coach_summary, notes,
mood_before, mood_after, created_at
)
-- Workout sets
workout_sets (
id, workout_id, exercise_id, set_number,
weight, reps, rpe, is_warmup, is_pr,
notes, completed_at
)
-- Personal records
personal_records (
id, user_id, exercise_id, weight, reps,
estimated_1rm, achieved_at, workout_set_id, created_at
)
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/v1/workouts/today | GET | Get today's scheduled workout |
/api/v1/workouts | POST | Start a new workout |
/api/v1/workouts/:id | GET | Get workout details |
/api/v1/workouts/:id | PATCH | Update workout (complete, skip) |
/api/v1/workouts/:id/sets | POST | Log a set |
/api/v1/workouts/:id/sets/:setId | PATCH | Update a set |
/api/v1/workouts/history | GET | Get workout history |
/api/v1/exercises | GET | List exercises |
/api/v1/programs/enroll | POST | Enroll in program |
Screens Built
- Workout Preview (MoLog)
- Active Workout (MoLog)
- Rest Timer (overlay)
- Workout Complete
- PR Celebration (modal)
Checklist
□ Exercises seeded (50+)
□ PPL program seeded
□ Today's workout API working
□ Workout preview shows exercises
□ Can start workout
□ Set logging UI functional
□ Weight input with +/- buttons
□ Reps input with +/- buttons
□ Sets save to database
□ Rest timer counts down
□ Coach tips show during rest
□ Can skip rest timer
□ Previous performance displayed
□ PR auto-detection working
□ PR celebration shows
□ Workout completion saves
□ Duration tracked
□ Volume calculated
Deliverable
Users can:
- See today's workout
- Start workout session
- Log weight and reps for each set
- Use rest timer between sets
- See their previous performance
- Get PR celebrations
- Complete and save workout
6. Sprint 3: Dashboard + Progress
Duration: 5-7 days Goal: Dashboard with stats, weight tracking, progress charts
Tasks
| Task | Priority | Time | Details |
|---|---|---|---|
| Dashboard layout | P0 | 3hr | MoBoard structure |
| Coach greeting component | P0 | 2hr | Dynamic from selected coach |
| Today's workout card | P0 | 2hr | Quick access widget |
| Streaks table | P0 | 1hr | Track workout streaks |
| Streak calculation | P0 | 2hr | Logic for streak counting |
| Streak display component | P0 | 2hr | Fire icon + counter |
| Weight entries table | P0 | 1hr | Daily weight logs |
| Weight logging screen | P0 | 3hr | MoBody entry screen |
| Weight logging API | P0 | 2hr | CRUD for weight |
| Weight chart component | P0 | 4hr | Recharts line chart |
| Weekly averages | P0 | 2hr | Calculate from entries |
| Progress overview API | P0 | 2hr | Dashboard stats endpoint |
| Quick actions grid | P0 | 2hr | Weight, Coach, Stats buttons |
| Workout history list | P1 | 3hr | Past workouts |
| Strength progress chart | P1 | 3hr | PR tracking over time |
| Volume chart | P2 | 2hr | Weekly volume |
Database Tables
-- Weight entries
weight_entries (
id, user_id, weight, date, notes, created_at
UNIQUE(user_id, date)
)
-- Streaks
streaks (
id, user_id, current_streak, longest_streak,
last_workout, updated_at
)
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/v1/progress/overview | GET | Dashboard stats |
/api/v1/progress/streaks | GET | Streak data |
/api/v1/weight | GET | Weight history |
/api/v1/weight | POST | Log weight |
/api/v1/weight/:id | PATCH | Update entry |
/api/v1/weight/:id | DELETE | Delete entry |
/api/v1/weight/stats | GET | Weekly averages, trends |
/api/v1/progress/prs | GET | Personal records |
Screens Built
- MoBoard (Dashboard)
- MoBody (Weight tracking)
- MoStats (Progress - basic)
Checklist
□ Dashboard layout complete
□ Coach greeting displays
□ Today's workout card works
□ Streak counter shows
□ Streak calculation accurate
□ Weight logging screen
□ Weight saves to database
□ Weight chart renders
□ Weekly average calculated
□ Quick actions work
□ Workout history loads
□ PR list displays
□ All stats update in real-time
Deliverable
Users can:
- See dashboard with greeting
- View current streak
- Access today's workout quickly
- Log daily weight
- View weight trend chart
- See weekly averages
- View workout history
- Track PRs
7. Sprint 4: AI Coach
Duration: 5-7 days Goal: Chat with AI coach in their unique personality
Tasks
| Task | Priority | Time | Details |
|---|---|---|---|
| Vercel AI SDK setup | P0 | 2hr | Install, configure |
| Claude API integration | P0 | 2hr | API key, client setup |
| Coach system prompts | P0 | 4hr | 8 unique personalities |
| Chat messages table | P0 | 1hr | Store conversation |
| Chat UI layout | P0 | 3hr | Message list, input |
| Chat bubble component | P0 | 2hr | User vs coach styling |
| Coach avatar in chat | P0 | 1hr | Show coach image |
| Send message API | P0 | 3hr | Stream response |
| Streaming display | P0 | 3hr | Real-time text rendering |
| Chat history API | P0 | 2hr | Load previous messages |
| Context builder | P1 | 3hr | Include user stats in prompt |
| Coach switching | P1 | 2hr | Change coach mid-chat |
| Typing indicator | P1 | 1hr | Dots animation |
| Coach greeting API | P1 | 2hr | Context-aware greeting |
| Clear chat | P2 | 1hr | Delete history option |
| Workout tips | P2 | 2hr | Tips during workout |
Database Tables
-- Chat messages
chat_messages (
id, user_id, coach_id, role, content,
context, created_at
)
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/v1/coach/chat | POST | Send message (streaming) |
/api/v1/coach/chat/history | GET | Get chat history |
/api/v1/coach/chat/history | DELETE | Clear chat history |
/api/v1/coach/greeting | GET | Get contextual greeting |
/api/v1/coach/tip | GET | Get workout tip |
Coach System Prompts Structure
const coachPrompts = {
sam: {
name: "Sam",
role: "The Buddy",
personality: `You are Sam, a friendly and supportive fitness coach.
You speak like a workout buddy - encouraging, warm, and balanced.
You celebrate wins, show empathy for struggles, and keep things positive.
Example phrases: "Let's crush this together!", "You got this!", "Great work!"
Never be harsh or critical. Always find the positive angle.`,
// ... context injection points
},
max: {
name: "Max",
role: "Drill Sergeant",
personality: `You are Max, a tough and intense fitness coach.
You speak like a drill sergeant - direct, no-nonsense, pushing for results.
You don't accept excuses and demand the best effort.
Example phrases: "No excuses.", "Get it done.", "Push harder."
Be tough but fair. Challenge users to exceed their limits.`,
// ...
},
// ... other coaches
};
Screens Built
- MoCoach (Chat interface)
Checklist
□ Claude API connected
□ System prompts for all 8 coaches
□ Chat UI complete
□ Messages save to database
□ Streaming responses work
□ Chat history loads
□ Coach personality distinct
□ Context includes user stats
□ Coach switching works
□ Typing indicator shows
□ Greeting API works
□ Mobile keyboard handling
Deliverable
Users can:
- Open MoCoach chat
- Send messages to their coach
- Receive streaming responses
- See coach personality in responses
- Switch between coaches
- View chat history
- Get contextual advice based on their data
8. Sprint 5: Exercise Library + Programs
Duration: 5-7 days Goal: Browse exercises, view program details, import wellness guide
Tasks
| Task | Priority | Time | Details |
|---|---|---|---|
| Exercise library screen | P0 | 4hr | Grid/list view |
| Exercise search | P0 | 2hr | Full-text search |
| Muscle group filter | P0 | 2hr | Filter tabs |
| Exercise detail screen | P0 | 4hr | Full info page |
| Exercise demo display | P0 | 2hr | GIF/video player |
| Exercise history | P1 | 2hr | User's history with exercise |
| Program overview screen | P0 | 3hr | MoPhase layout |
| Phase display | P0 | 2hr | Show all phases |
| Current phase highlight | P0 | 1hr | Visual indicator |
| Week progress | P0 | 2hr | Progress bar |
| Import wellness guide | P0 | 6hr | Parse and seed content |
| Exercise instructions | P0 | 2hr | From wellness guide |
| Exercise tips | P0 | 1hr | From wellness guide |
| Swap exercise feature | P1 | 3hr | Replace during workout |
| Equipment filter | P2 | 1hr | Filter by equipment |
Content Import (Wellness Guide)
Import from ~/wellness-guide/:
├── 22-exercise-library.md → exercises table
├── 23-phase1-foundation.md → program_phases, program_days
├── 24-phase2-hypertrophy.md → program_phases, program_days
├── 25-phase3-strength.md → program_phases, program_days
├── 26-phase4-peak.md → program_phases, program_days
└── 27-phase5-outdoor.md → program_phases, program_days
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/v1/exercises | GET | List exercises (paginated, filterable) |
/api/v1/exercises/search | GET | Search exercises |
/api/v1/exercises/:slug | GET | Exercise details |
/api/v1/exercises/by-muscle/:muscle | GET | Filter by muscle |
/api/v1/programs | GET | List programs |
/api/v1/programs/:slug | GET | Program details |
/api/v1/programs/current | GET | User's current program |
/api/v1/programs/current | PATCH | Update progress |
Screens Built
- MoGuide (Exercise Library)
- Exercise Detail
- MoPhase (Program Tracker)
Checklist
□ Exercise library displays
□ Search working
□ Muscle filter working
□ Exercise detail page
□ Instructions display
□ Demo GIF/video shows
□ Tips display
□ User history shows
□ Program overview page
□ All phases listed
□ Current phase highlighted
□ Week progress accurate
□ Wellness guide content imported
□ 50+ exercises with full data
□ Swap exercise works
Deliverable
Users can:
- Browse all exercises
- Search and filter exercises
- View detailed exercise info
- See their history with each exercise
- View program overview
- Track phase/week progress
- Swap exercises during workout
9. Sprint 6: Polish + PWA
Duration: 5-7 days Goal: Beautiful animations, offline support, installable app
Tasks
| Task | Priority | Time | Details |
|---|---|---|---|
| Page transitions | P0 | 3hr | Framer Motion setup |
| Card animations | P0 | 2hr | Entrance, hover states |
| Button animations | P0 | 1hr | Press, loading states |
| Number animations | P0 | 2hr | Counting, changes |
| PR celebration polish | P0 | 2hr | Confetti, coach reaction |
| Skeleton loaders | P0 | 3hr | All loading states |
| PWA manifest | P0 | 1hr | App manifest file |
| Service worker | P0 | 3hr | Workbox setup |
| Offline detection | P0 | 2hr | Online/offline status |
| Offline workout queue | P1 | 4hr | IndexedDB storage |
| Background sync | P1 | 3hr | Sync when back online |
| Cache strategies | P1 | 2hr | Static vs dynamic |
| Haptic feedback | P1 | 2hr | Vibration API |
| Pull to refresh | P1 | 1hr | Mobile gesture |
| 3D coach avatar | P2 | 6hr | Basic Three.js setup |
| Sound effects | P2 | 2hr | Optional audio |
PWA Configuration
// manifest.json
{
"name": "Mo - Build Momentum",
"short_name": "Mo",
"description": "AI fitness coaching that matches your personality",
"start_url": "/dashboard",
"display": "standalone",
"background_color": "#0a0a0f",
"theme_color": "#00d4aa",
"orientation": "portrait",
"icons": [
{ "src": "/icons/icon-192.png", "sizes": "192x192", "type": "image/png" },
{ "src": "/icons/icon-512.png", "sizes": "512x512", "type": "image/png" },
{ "src": "/icons/icon-maskable.png", "sizes": "512x512", "type": "image/png", "purpose": "maskable" }
]
}
Offline Storage (Dexie.js)
// Offline database schema
const db = new Dexie('MoOffline');
db.version(1).stores({
pendingSets: '++id, date, workoutId, exerciseId, synced',
pendingWeights: '++id, date, weight, synced',
cachedWorkout: 'date',
cachedExercises: 'id, slug'
});
Checklist
□ Page transitions smooth
□ Cards animate on entrance
□ Buttons have press feedback
□ Numbers animate on change
□ PR celebration polished
□ All screens have skeletons
□ PWA manifest configured
□ Service worker registered
□ App installable on mobile
□ Offline indicator shows
□ Workouts save offline
□ Sets queue when offline
□ Syncs when back online
□ Haptics on key actions
□ No jank (60fps)
□ Lighthouse PWA score > 90
Deliverable
App that:
- Feels native with smooth animations
- Can be installed to home screen
- Works offline at the gym
- Syncs data when back online
- Provides haptic feedback
- Loads fast with proper caching
10. Sprint 7: Payments + Launch
Duration: 5-7 days Goal: Monetization ready, final testing, production launch
Tasks
| Task | Priority | Time | Details |
|---|---|---|---|
| Stripe account setup | P0 | 1hr | Connect account |
| Stripe products | P0 | 1hr | Create Pro subscription |
| Checkout integration | P0 | 3hr | Stripe Checkout |
| Webhook handler | P0 | 3hr | Handle subscription events |
| Subscriptions table | P0 | 1hr | Track user subscriptions |
| Billing portal | P0 | 2hr | Manage subscription |
| Free vs Pro gates | P0 | 3hr | Feature restrictions |
| Upgrade prompts | P0 | 2hr | UI for upgrade |
| Settings completion | P0 | 3hr | All settings working |
| Profile editing | P0 | 2hr | Update user info |
| Account deletion | P0 | 2hr | GDPR compliance |
| Data export | P1 | 2hr | Export user data |
| Error boundaries | P0 | 2hr | Graceful error handling |
| E2E tests | P0 | 4hr | Critical path testing |
| Performance audit | P1 | 2hr | Lighthouse optimization |
| Security review | P1 | 2hr | Auth, data access audit |
| Analytics setup | P0 | 2hr | Vercel Analytics |
| Error monitoring | P0 | 1hr | Sentry setup |
| Domain setup | P0 | 1hr | Custom domain |
| Launch checklist | P0 | 2hr | Final verification |
Database Tables
-- Subscriptions
subscriptions (
id, user_id, stripe_customer_id, stripe_subscription_id,
plan, status, current_period_start, current_period_end,
created_at
)
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/v1/subscriptions/current | GET | Get subscription status |
/api/v1/subscriptions/checkout | POST | Create checkout session |
/api/v1/subscriptions/portal | POST | Get billing portal URL |
/api/v1/subscriptions/cancel | POST | Cancel subscription |
/api/v1/webhooks/stripe | POST | Handle Stripe webhooks |
/api/v1/users/me/export | GET | Export user data |
/api/v1/users/me | DELETE | Delete account |
Free vs Pro Features
| Feature | Free | Pro |
|---|---|---|
| Workouts per month | 12 | Unlimited |
| AI Coach messages | 20/month | Unlimited |
| Weight tracking | ✓ | ✓ |
| Progress charts | Basic | Advanced |
| Exercise library | ✓ | ✓ |
| Multiple coaches | 1 | Up to 8 |
| Offline mode | ✓ | ✓ |
| Export data | - | ✓ |
| Priority support | - | ✓ |
E2E Test Scenarios
// Critical paths to test
const criticalPaths = [
'visitor_can_view_landing_page',
'visitor_can_sign_up_with_email',
'visitor_can_sign_up_with_google',
'new_user_completes_onboarding',
'user_can_start_workout',
'user_can_log_sets',
'user_can_complete_workout',
'user_can_log_weight',
'user_can_chat_with_coach',
'user_can_upgrade_to_pro',
'user_can_cancel_subscription',
'user_can_delete_account',
];
Launch Checklist
□ All features working
□ Stripe payments tested
□ Webhooks configured
□ Free/Pro gates working
□ E2E tests passing
□ Performance optimized (Lighthouse > 90)
□ Security audit complete
□ Error monitoring active
□ Analytics tracking
□ Custom domain configured
□ SSL certificate valid
□ Privacy policy page
□ Terms of service page
□ Support email configured
□ Backup strategy in place
□ Monitoring alerts set up
Deliverable
Production-ready app with:
- Working subscription payments
- Free and Pro tiers
- All features complete
- Comprehensive testing
- Monitoring and analytics
- Custom domain live
11. Build Order Diagram
Sprint 0: Setup
│
▼
Sprint 1: Auth + Onboarding
│
┌─────────────┴─────────────┐
▼ ▼
Sprint 2: Workout Sprint 3: Dashboard
│ │
└─────────────┬─────────────┘
│
▼
Sprint 4: AI Coach
│
▼
Sprint 5: Library + Programs
│
▼
Sprint 6: Polish + PWA
│
▼
Sprint 7: Payments + Launch
│
▼
🚀 LAUNCH
12. Testing Strategy
Test Types
| Type | Tool | Coverage | When |
|---|---|---|---|
| Unit | Vitest | Utilities, calculations | Every PR |
| Component | Vitest + Testing Library | UI components | Every PR |
| Integration | Vitest | API routes | Every PR |
| E2E | Playwright | Critical flows | Pre-merge to main |
| Visual | Playwright screenshots | UI regression | Weekly |
| Performance | Lighthouse CI | Core Web Vitals | Pre-deploy |
| Manual | You | Full app | Every sprint |
Test Coverage Targets
| Area | Target |
|---|---|
| Utility functions | 90% |
| API routes | 80% |
| Components | 70% |
| E2E critical paths | 100% |
CI Pipeline
# .github/workflows/ci.yml
name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm lint
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm typecheck
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm test
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v2
- run: pnpm install
- run: pnpm exec playwright install
- run: pnpm test:e2e
13. Definition of Done
Every feature is complete when:
Functionality
- Works on mobile (375px width)
- Works on tablet (768px width)
- Works on desktop (1280px width)
- Handles loading state
- Handles error state
- Handles empty state (if applicable)
- Handles offline state (if applicable)
Quality
- No TypeScript errors
- No ESLint errors
- No console errors
- Unit tests passing
- Manually tested
Accessibility
- Keyboard navigable
- Screen reader compatible
- Touch targets ≥ 44px
- Color contrast passes
Performance
- No layout shift
- Images optimized
- Lazy loaded where appropriate
14. Risk Mitigation
| Risk | Impact | Probability | Mitigation |
|---|---|---|---|
| AI costs too high | High | Medium | Rate limits, prompt optimization, caching |
| Offline sync conflicts | Medium | Medium | Last-write-wins, add conflict UI later |
| 3D performance issues | Low | Medium | Progressive enhancement, 2D fallback |
| Scope creep | High | High | Strict MVP focus, parking lot document |
| Auth edge cases | Medium | Low | Use Clerk (battle-tested) |
| Database performance | Medium | Low | Proper indexes, query optimization |
| Burnout | High | Medium | Sustainable pace, celebrate milestones |
15. Milestones
| Milestone | Sprint | Date Target | Celebration |
|---|---|---|---|
| M1: Skeleton | 0 | Day 4 | First deploy! |
| M2: Accounts | 1 | Week 1 | First user signup |
| M3: Logging | 2 | Week 2-3 | First real workout logged |
| M4: Tracking | 3 | Week 3-4 | Full tracking working |
| M5: Coaching | 4 | Week 4-5 | First AI conversation |
| M6: Complete | 5 | Week 5-6 | Feature complete |
| M7: Polished | 6 | Week 6-7 | Beautiful + offline |
| M8: Launch | 7 | Week 7-8 | 🚀 GO LIVE |
16. Post-Launch Roadmap
V1.1 (Month 2-3)
- PR Records page (MoPRs)
- Meal tracking (MoFuel) - basic
- Progress photos (MoBody)
- Body measurements
- Push notifications
- Facebook OAuth
V1.2 (Month 3-4)
- Flutter mobile app (iOS)
- Flutter mobile app (Android)
- Advanced analytics
- Workout sharing
Future
- Apple Watch integration
- Social features (MoSquad)
- Challenges (MoChallenge)
- Custom workout builder
- Educational content (MoLearn)
Document Status
- Development Approach
- Sprint Overview
- Sprint 0: Setup
- Sprint 1: Auth + Onboarding
- Sprint 2: Workout Core
- Sprint 3: Dashboard + Progress
- Sprint 4: AI Coach
- Sprint 5: Exercise Library + Programs
- Sprint 6: Polish + PWA
- Sprint 7: Payments + Launch
- Build Order Diagram
- Testing Strategy
- Definition of Done
- Risk Mitigation
- Milestones
- Post-Launch Roadmap
Phase 5: Development Plan - COMPLETE
Document created: December 2024 Version: 1.0 Status: Complete