System overview

How a personalized plan gets to your client.

Every plan is AI-drafted in Manny's voice, reviewed by Manny himself, and tuned weekly by a feedback loop. No plan ships without coach approval.

Core flow

Stage 1
Checkout & Onboarding

Stripe-powered checkout creates a tier-based account. Intake quizzes unlock immediately after payment.

Stripe · Supabase Auth
Stage 2
AI Plan Drafting

Anthropic-powered engine drafts training, nutrition and life pillars using intake answers and the coach's tone profile.

Anthropic Claude
Stage 3
Coach Approval

Manny opens the queue, edits inline, regenerates if needed, and approves. Only then does the client gain access.

Hard gate
Stage 4
Client Portal

Five tabs: My Plan, Nutrition, Life Pillars, Check-In, Messages. Messaging gated by tier.

React + TanStack
Stage 5
Weekly Check-In

Client submits weight, sleep, energy, notes. Stored, surfaced to coach inbox.

Feedback loop
Stage 6
Iteration

Coach responds, optionally triggers AI re-draft. New plan re-enters approval queue.

Closed loop

Rules engine

if  client.tier == "Foundations"        => messaging = false, AI cadence = monthly
if  client.tier in ("Performance","Elite") => messaging = true,  AI cadence = weekly

on  intake.completed                       => enqueue(plan_draft)
on  plan.draft.created                     => assign(coach_review)
on  coach.approve(plan)                    => publish(plan), notify(client)
on  checkin.submitted                      => coach_inbox += entry
                                            => if delta(weight, sleep) > threshold
                                                 => suggest(plan_revision)

guard publish(plan) requires plan.coach_approved == true

Data model (high level)

users
id
email
role
created_at
clients
user_id
tier
payment_status
intake_id
plans
id
client_id
ai_draft
approved_by
approved_at
status
checkins
id
client_id
weight
sleep
energy
notes
status
messages
id
client_id
from
text
ts
intakes
id
client_id
answers_json
submitted_at

Approval gate

Intake
AI Draft
Coach Edit
Approval
Client Access

No client sees a plan until coach status flips to approved. This is enforced server-side, not in the UI.