How khalidmohomud/nutristep-ai works
NutriStep AI is a Flutter nutrition and activity-tracking app. Its main workflow takes a meal photo, analyzes it through a Supabase Edge Function and Gemini, then presents nutrition alongside the user’s daily targets and meals. The README also documents onboarding and personalized planning, dashboard and streaks, step tracking, coaching, account deletion, and server-enforced scan quotas. App-to-backend links below follow documented relationships; Dart implementation details were not sampled, so the graph does not infer additional calls between app modules.
Main entry points: scan_screen.dart Meal scanner · index.ts Meal analysis · flutter_window.cpp Windows host · onboarding_step_screen.dart Onboarding
Components 20
Flutter app
- Onboarding
lib/screens/onboarding_step_screen.dart - Personal plan
lib/plan/plan.dart - Auth and session
lib/state/session.dart - Home dashboard
lib/screens/home_screen.dart - Meal scanner
lib/screens/scan_screen.dart - Step tracking
lib/state/steps.dart - Backend client
lib/state/backend.dart
Supabase services
- AI coach
supabase/functions/ai-coach/index.ts - Meal analysis
supabase/functions/analyze-meal/index.ts - Account deletion
supabase/functions/delete-account/index.ts - Postgres data
supabase/migrations/20260924000000_init.sql - Scan quota
supabase/migrations/20260924100000_scan_quota.sql
AI analysis
- Gemini
Platform runtime
- Linux host
linux/runner/my_application.cc - Linux plugins
linux/flutter/generated_plugin_registrant.cc - Windows host
windows/runner/flutter_window.cpp - Windows window
windows/runner/win32_window.cpp - Windows plugins
windows/flutter/generated_plugin_registrant.cc - macOS plugins
macos/Flutter/GeneratedPluginRegistrant.swift
Other components
- App user
Connections 13
- App user → Onboarding: starts setup
README.md - Onboarding → Personal plan: sets targets
README.md - App user → Meal scanner: scans meal
README.md - Meal scanner → Meal analysis: sends photo
README.md - Meal analysis → Gemini: requests analysis
README.md - Meal scanner → Backend client: uses backend
- Backend client → Postgres data: reads and writes
README.md - Meal analysis → Scan quota: enforces limits
README.md - App user → Home dashboard: views day
README.md - App user → Step tracking: tracks activity
README.md - Linux host → Linux plugins: registers plugins
linux/runner/my_application.cc - Windows host → Windows plugins: registers plugins
windows/runner/flutter_window.cpp - Windows host → Windows window: hosts view
windows/runner/flutter_window.cpp