APA Production Plan¶
From Shakedown Prototype to Real Product¶
Author: Jules (COA)
Date: 2026-03-20
Status: DRAFT — Awaiting Jeff's Review
Context: Jeff's directive at 7:51 PM — no building until this plan is reviewed.
What We Have Today¶
The shakedown prototype (test-runs/local-model-benchmark/prototype/) proved the pipeline works. It is NOT a production codebase — it's a test harness. But it validated:
- 23 TypeScript files across routes, services, middleware
- Prisma schema with 8 models (User, Coach, Team, Athlete, Session, MetricReading, GapScore, RefreshToken)
- Full CRUD: Athletes, Teams, Sessions, Metrics
- Auth: JWT + bcrypt + refresh tokens + role-based access
- GAP Score calculation engine (rule-based)
- Garmin webhook handler + data transformer
- Rate limiting, error handling, request logging
- 35 passing tests
- SQLite for prototype speed (production migrates to PostgreSQL)
What it's missing: Production database, real Garmin API integration, frontend, mobile apps, deployment infrastructure, real-world data validation.
The Plan: 6 Phases, 6 Months to First Paying Customer¶
This aligns with Business Plan V2's phasing but adds tactical detail for execution.
Phase 0: Foundation Setup (2 weeks)¶
Target: April 1–14, 2026
Cost: ~$155 one-time + $5/mo
Build effort: Minimal — mostly account setup and scaffolding
What Gets Done¶
- Developer accounts (Jeff, requires his action)
- Apple Developer Program ($99/year) — start D-U-N-S process NOW if not already done (can take 2+ weeks)
- Google Play Console ($25 one-time)
- Garmin Connect Developer Program — FREE, apply immediately (2 business day approval, but integration takes 1–4 weeks)
- Health API: HR, HRV, sleep, stress, Body Battery, respiration, steps, calories
- Activity API: running dynamics, workout details, GPS tracks
- OAuth 2.0 based
- Beat-to-Beat Interval data requires license fee — evaluate need for GAP Score accuracy
-
WHOOP developer access (deferred — requires owning a WHOOP device)
-
Production monorepo scaffolding
- GitHub repo:
vivere-vitalis/apa(private) - Structure:
apps/api|apps/web|apps/mobile|packages/shared|services/ml - NOT reusing the shakedown prototype — fresh scaffold with lessons learned baked in
-
Key architectural decisions to lock:
- Database: PostgreSQL via Supabase (free tier → Pro at launch)
- ORM: Prisma (proven in shakedown)
- API: Express + TypeScript (proven in shakedown)
- Frontend: Next.js + Tailwind + shadcn/ui
- Mobile: React Native via Expo (cross-platform from Day 1)
- Auth: Supabase Auth (replaces hand-rolled JWT from shakedown)
-
CI/CD pipeline
- GitHub Actions → Vercel preview deploys (web)
- Expo EAS builds (mobile)
-
Automated TypeScript + test checks on PR
-
Domain & DNS
ascentfitwell.com— confirm ownership, DNS via Cloudflare (free)- Or
ascentperformanceanalytics.comif that's the final brand call (Jeff decision)
Jeff Actions Required¶
- Initiate Apple Developer enrollment (needs Jeff's personal/business identity)
- Decide: domain name (ascentfitwell.com vs ascentperformanceanalytics.com)
- Apply for Garmin Connect Developer Program (business application)
- Confirm GitHub org name
Go/No-Go → Phase 1¶
All developer accounts active or in-process. Monorepo scaffolded, CI green, local dev running.
Phase 1: "Patient Zero" Alpha (4 weeks)¶
Target: Mid-April – Mid-May 2026
Cost: ~$15/mo infrastructure
Build effort: HIGH — this is the core product sprint
What Gets Built¶
API (apps/api) — Port shakedown learnings into production code: - Authentication via Supabase Auth (email/password + invite flow) - Athlete CRUD, Team CRUD, Session CRUD (refined from shakedown) - Wellness check-in endpoint (manual entry: sleep, energy, soreness, mood, RPE) - Garmin Health API integration: - OAuth 2.0 consent flow (athlete authorizes Garmin data sharing) - Webhook receiver for push notifications (Garmin pushes data on device sync) - Data normalization: Garmin → canonical APA schema - Metrics: HR (resting + active), HRV (beat-to-beat if licensed), sleep stages, Body Battery, stress, steps, training load - GAP Score v0.1 calculation engine (port from shakedown, validate against real Fenix 8 data) - sRPE calculation: session RPE × duration → acute/chronic load tracking
Web App (apps/web) — Coach-facing dashboard (Jeff is the only user): - Login → Coach overview: all athletes, traffic-light status (green/yellow/red) - Athlete detail: 7-day wellness trend, HRV trend, current week load, GAP Score - Wellness check-in review (what athletes submitted today) - Flag-and-note: coach marks athletes for follow-up - Simple, functional — not polished. Jeff is testing workflow, not design.
Mobile App (apps/mobile) — Athlete-facing wellness check-in (TestFlight only): - Login → Daily check-in form (sleep hours, quality, energy, soreness, mood, notes) - Garmin connection wizard (OAuth flow to link their watch) - Personal readiness score (simple display) - No App Store — TestFlight (iOS) + internal track (Android)
Jeff's Fenix 8 Integration: - Jeff is Patient Zero. His Fenix 8 syncs to Garmin Connect → pushes to APA webhook. - Validate: does the data arrive? Is it timely (minutes, not hours)? Is HRV granularity sufficient for GAP Score? - Document every gap, lag, or data quality issue — this shapes Phase 3.
Execution Strategy¶
- Forge specs every task before Melody touches code
- Melody builds via Cursor Agent CLI (subscription-covered), Sonnet fallback
- Quinn validates each task before merge
- Smart routing: Haiku for scaffold/config, Sonnet for business logic (proven in shakedown)
- Estimated 40–50 tasks, ~2 tasks/day pace, 4-week sprint
Go/No-Go → Phase 2¶
- Jeff uses APA daily for 2+ consecutive weeks with real athletes
- GAP Score generating output Jeff finds useful and believable
- 8+ athletes submitting wellness check-ins 5+ days/week
- Jeff can name 3 specific coaching decisions made because of APA data
Phase 2: Core Platform MVP (5 weeks)¶
Target: Mid-May – Late June 2026
Cost: ~$25–40/mo
What Gets Built¶
- Production auth: Supabase Auth with roles (admin, coach, athlete)
- Multi-client management: coaching groups, rosters, coach hierarchy
- Athlete profiles: sport, position, goals, custom fields
- Solo Coach vs. Facility account types (different UI flows)
- Client-facing dashboard (athletes can see their own data)
- Visibility controls (coach configures athlete data access)
- API v1: fully documented, versioned endpoints
- Production deployment: Vercel (web) + Supabase (DB + auth)
- Database migration: SQLite → PostgreSQL (Supabase-hosted)
Key Architecture Decision: Hosting¶
Recommended: Supabase + Vercel + Edge Functions - Supabase free tier: 500MB database, 50K monthly active users, 1GB file storage - Vercel free tier: unlimited deploys, 100GB bandwidth - Total: $0/mo until you need Pro features - Upgrade path: Supabase Pro ($25/mo) + Vercel Pro ($20/mo) when traffic justifies
Alternative: AWS (Jeff asked about this) - AWS has a compelling pay-as-you-go model but introduces significant ops complexity: - EC2 + RDS + S3 + CloudFront + ALB = ~$50–80/mo minimum even at zero traffic - Requires VPC configuration, security groups, SSL cert management - Jeff's SRE background makes this manageable, but it's ops work that delays product work - Recommendation: Start on Supabase/Vercel (zero ops overhead), migrate to AWS when traffic + revenue justify dedicated infrastructure. Prisma makes the database migration trivial. - If Jeff strongly prefers AWS from Day 1, the minimal setup is: - 1× t3.micro EC2 (free tier eligible for 12 months) running Express - 1× RDS PostgreSQL db.t3.micro (free tier eligible) - S3 for file storage, CloudFront for CDN - Cost: ~$0–15/mo first year on free tier, then $40–60/mo
Go/No-Go → Phase 3¶
- 10+ external beta users onboarded and active
- Stable production with <1% error rate over 2 weeks
- Coach can onboard new athlete to first check-in in under 5 minutes
Phase 3: Data Integration + AI Insights (6 weeks)¶
Target: Late June – Early August 2026
Cost: ~$60–80/mo
What Gets Built¶
- Normalized Data Layer (NDL): canonical schema that ingests from any wearable
- WHOOP integration (if Jeff has one, otherwise deferred)
- Apple HealthKit integration via React Native (background sync)
- CSV import tool for bulk historical data
- Athlete baseline calculation: 14-day rolling averages per metric
- ACWR implementation: acute/chronic workload ratio with alerts at >1.3 and >1.5
- HRV deviation alerts: flag when >15% below 7-day baseline
- Readiness Score: composite (HRV + sleep + wellness) → 0–100
- LLM Weekly Summary: GPT-4o generates plain-English weekly athlete report
- Alert system: in-app + email notifications for high-priority flags
Garmin Deep Integration Notes¶
From research: - Garmin Health API uses REST + OAuth 2.0, ping/pull or push architecture - Webhook notifications deliver data within minutes of device sync (near real-time) - Full data access: HR, HRV, sleep stages, stress, Body Battery, respiration, running dynamics, GPS - New devices supported automatically through the developer program - Beat-to-Beat Interval data requires a commercial license fee — critical for GAP Score precision. Apply early. - No rate limits documented for approved partners, but data is per-user-sync (not real-time streaming) - React Native wrapper exists for Connect IQ Mobile SDK (github.com/cjsmith/react-native-connect-iq-mobile-sdk) — evaluate for direct device communication - For multi-source dedup: use Garmin's bundle ID filtering (com.garmin.android.apps.connectmobile) to prevent double-counting via Health Connect
Phase 4: Mobile Apps + Beta Launch (5 weeks)¶
Target: Early August – Mid-September 2026
Cost: ~$80–100/mo
What Gets Built¶
- Athlete Mobile App (iOS + Android via Expo):
- Daily wellness check-in (refined UX)
- Personal readiness dashboard
- Wearable connection wizard
- Push notifications (morning check-in reminder, coach messages)
- HealthKit / Health Connect background sync
-
Progress visualization
-
Coach Mobile App:
- Team readiness overview (phone-optimized)
- Class Readiness Dashboard (pre-class view)
-
Quick athlete notes (on-floor coaching)
-
Distribution:
- TestFlight (iOS) → App Store submission
- Play Store internal testing → production
- Privacy policy + ToS live
Phase 5: San Diego Beta → First Revenue (6 weeks)¶
Target: Mid-September – Late October 2026
Cost: ~$120–150/mo infrastructure
What Gets Built¶
- 5–10 San Diego facilities onboarded (CrossFit, Hyrox, private training)
- BioThread GAP Score as premium visible feature
- Stripe billing integration (beta on free trial, billing infrastructure ready)
- Onboarding docs: coach setup guide, athlete script, wearable FAQ
- Customer support: Crisp chat widget
- Facility admin view: multi-coach hierarchy, facility analytics
- Weekly Jeff ↔ beta coach calls
Then: Phase 6 Launch¶
- Solo Coach tier: $99–149/mo self-serve
- ascentfitwell.com marketing site live
- App Store + Play Store production releases
- Case studies from San Diego beta
- Target: 20 paying customers by January 2027
AWS Hosting Architecture (When Ready to Scale)¶
For when traffic justifies dedicated infrastructure:
┌─ CloudFront (CDN) ─────────────────────────────────┐
│ ↓ │
│ S3 (static assets: web app) │
│ │
│ ALB (Application Load Balancer) │
│ ├── ECS Fargate (API containers, auto-scaling) │
│ │ └── Express + Prisma → RDS │
│ ├── RDS PostgreSQL (Multi-AZ for production) │
│ └── ElastiCache Redis (session cache, rate limits) │
│ │
│ SQS (webhook queue: Garmin push → processing) │
│ Lambda (async: LLM summaries, alert evaluation) │
│ SES (transactional email) │
│ CloudWatch (monitoring + alerting) │
└─────────────────────────────────────────────────────┘
Estimated AWS production cost at 100 customers: - ECS Fargate: $15–30/mo (small containers) - RDS PostgreSQL: $15–25/mo (db.t3.small) - S3 + CloudFront: $5–10/mo - ElastiCache: $15/mo - SQS + Lambda: $1–3/mo - SES: $1–2/mo - Total: ~$50–100/mo at moderate traffic
Migration path: Prisma schema stays identical. Change DATABASE_URL from Supabase to RDS. Containerize Express app for ECS. Done.
Garmin Fenix 8 Integration — Technical Detail¶
Data Available via Health API (confirmed)¶
| Metric | Granularity | GAP Score Relevance |
|---|---|---|
| Heart Rate (resting) | Daily summary | ✅ Core input |
| Heart Rate (active) | Per-second during activities | ✅ Training load |
| HRV (Beat-to-Beat Interval) | Per-night* | ✅ Critical — requires license |
| Sleep Stages | Deep/Light/REM/Awake breakdown | ✅ Recovery quality |
| Body Battery | Daily charge/drain curve | ✅ Energy state |
| Stress Level | All-day, per-minute | ✅ Sympathetic load |
| Respiration | All-day + sleep | ⬜ Secondary input |
| Steps + Intensity Minutes | Daily | ⬜ Activity volume |
| Running Dynamics | Per-activity (stride, ground contact, VO) | ✅ Biomechanical load |
| VO2 Max | Updated per qualifying activity | ✅ Fitness trend |
| Training Load / Status | Weekly rolling | ✅ Overtraining signal |
| SpO2 (Pulse Ox) | Overnight | ⬜ Altitude/respiratory |
*Beat-to-Beat Interval requires commercial license. Standard HRV summary (average, max, min) is available without it. Evaluate if summary HRV is sufficient for GAP Score v0.1 before paying for beat-to-beat.
Integration Flow¶
- Jeff installs Garmin Connect on phone (already done)
- Fenix 8 syncs to Garmin Connect via Bluetooth (automatic)
- Garmin Connect pushes data to APA webhook (configured in Developer Portal)
- APA normalizes + stores data in PostgreSQL
- GAP Score engine runs on new data arrival
- Coach dashboard updates in near-real-time
First Test (Phase 1, Week 1)¶
- Jeff wears Fenix 8 for a normal training day
- Webhook receives sync data
- Jules/Quinn verify: all expected metrics present? Latency acceptable? Data quality sufficient?
- Document gaps → feed back to Forge for spec adjustments
Key Decisions for Jeff¶
- Domain name:
ascentfitwell.comorascentperformanceanalytics.com? - Hosting start: Supabase/Vercel ($0 start) or AWS from Day 1 ($0–15/mo on free tier)?
- Garmin Beat-to-Beat license: Apply now (may take time) or try standard HRV first for GAP Score v0.1?
- WHOOP integration priority: Do you own/plan to buy a WHOOP? Deferred if not.
- Brand: Is the product called "Ascent Performance Analytics" or "APA" or something else for public facing?
- Apple Developer enrollment: Ready to start? D-U-N-S number may take 2+ weeks.
- Timeline comfort: Phase 0 starting April 1 — is that aggressive enough or too aggressive?
Risk Register¶
| Risk | Likelihood | Impact | Mitigation |
|---|---|---|---|
| Garmin Developer Program rejection | Low | High | Apply early, have business plan ready for review call |
| Beat-to-Beat data too expensive | Medium | Medium | Validate GAP Score with standard HRV first |
| Expo/React Native Garmin SDK gaps | Medium | Medium | Fallback: native module bridge, or web-only mobile initially |
| Jeff too busy with DirecTV to be Patient Zero | Medium | High | Minimum viable daily commitment: 15 min/day for check-in review |
| Cloud costs spike during development | Low | Medium | Smart routing proven in shakedown. Budget: $200/mo ceiling for agent credits |
| Apple App Store review delays | Medium | Low | Submit early, keep first version minimal |
What This Plan Does NOT Cover (Intentionally)¶
- ML model training (future — after real data collection)
- Marketing strategy (covered in Business Plan V2, Phase 6)
- Pricing finalization (covered in Business Plan V2)
- Competitive response strategy (covered in COMPETITIVE.md)
- BioThread as standalone product (deferred)
- flash-moe / local model inference for production (future optimization)
This is the bridge between "we proved the pipeline works" and "let's build the real thing." Review it, poke holes in it, and tell me what to change. No code gets written until you sign off. 🦅