iOS-first AI fitness coaching. Flutter talks to Supabase Auth, Postgres, and Storage. OpenAI runs only in Edge Functions.
- Start Docker Desktop.
- From this repo:
supabase start- Copy the printed
API URLandanon keyinto.env:
SUPABASE_URL=http://127.0.0.1:54321
SUPABASE_ANON_KEY=<anon-or-publishable-key>
- Put
OPENAI_API_KEYinsupabase/functions/.env(never in Flutter). - Run the app:
flutter runServe functions locally when you need AI:
supabase functions serve generate-plan,coach-chat,apply-ai-action --env-file supabase/functions/.envOnboard → generate plan → train and log food → track weight → coach proposes changes → you Apply or Dismiss.
Tabs: Home, Workout, Nutrition, Coach, Progress. Profile is pushed from Home.
- Flutter uses the anon/publishable key only.
- Edge Functions use the user JWT for user data and the service role only for
ai_prompt_versions,ai_configurations, andai_usage. - Do not reuse other Supabase projects. A dedicated FitMate cloud project is created later after cost confirmation.