Dawa Mom is a Flutter maternal health companion app. It supports patient onboarding, appointment views, pregnancy-week guidance, period tracking, and Rudo chat through Supabase-backed data and Edge Functions.
The active app runtime is Supabase-backed. Firebase project files, Firebase Gradle plugins, Firebase iOS pods, and Firebase platform config files are not used by the Flutter app.
- Flutter stable / Dart
- Supabase Auth, Postgres, Row Level Security, and Edge Functions
- Python Rudo backend code under
lib/backend
flutter pub get
flutter analyze --no-pub
flutter test --no-pubBuild the web app, then serve the generated files:
flutter build web
node tools/serve_flutter_web.mjs build/webThe server defaults to http://127.0.0.1:8080. Set PORT to use another port.
Supabase is initialized from lib/backend/supabase/supabase_config.dart. The production defaults are checked in for the public URL and anon key, and can be overridden for staging/local builds:
flutter run --dart-define=SUPABASE_URL="https://project.supabase.co" --dart-define=SUPABASE_ANON_KEY="..."Voice playback uses the Supabase elevenlabs-tts Edge Function by default. The ElevenLabs API key belongs in Supabase secrets, not in the Flutter app:
supabase secrets set ELEVENLABS_API_KEY="<elevenlabs-api-key>" --project-ref himbfndvsuwiudtzjojh
supabase secrets set ELEVENLABS_VOICE_ID="EXAVITQu4vr4xnSDxMaL" ELEVENLABS_MODEL_ID="eleven_multilingual_v2" --project-ref himbfndvsuwiudtzjojh
supabase functions deploy elevenlabs-tts --project-ref himbfndvsuwiudtzjojhFor local Flutter runs, no ElevenLabs key is needed in the app. You can optionally make the provider explicit:
flutter run --dart-define=TTS_PROVIDER=elevenlabs --dart-define=ELEVENLABS_VOICE_ID="EXAVITQu4vr4xnSDxMaL"ELEVENLABS_EDGE_FUNCTION defaults to elevenlabs-tts, and ELEVENLABS_MODEL_ID defaults to eleven_multilingual_v2.
The fallback OmniVoice-compatible endpoint still uses Dart defines:
flutter run --dart-define=OMNIVOICE_API_URL="https://example.com/tts" --dart-define=OMNIVOICE_API_KEY="..."Private Gemini, backend, and service-role keys should stay in Supabase Edge Function secrets or backend environment variables, not in Flutter client code.
Migration docs and SQL live in supabase/. Some migration files still use legacy Firebase naming because they map/import old data, but those paths run through Supabase tables and Supabase Edge Functions. After changing Supabase-facing client code, verify:
- Auth sign-in and Firebase password migration fallback
period_tracker_settingsandperiod_tracker_entriesreads/writesrudo-chatEdge Function invocation and chat history persistence- RLS policies for patient, doctor, and admin roles
rudo-chat stores chat history in Supabase, calls the configured Rudo backend, and falls back to Gemini from the Edge Function when the configured/backend fallback returns demo greeting data. Set the secret before deploying:
supabase secrets set GEMINI_API_KEY="<gemini-api-key>" --project-ref himbfndvsuwiudtzjojh
supabase functions deploy rudo-chat --project-ref himbfndvsuwiudtzjojh