Inspiration

As a new father and healthcare software developer in Kenya, I watched my wife navigate pregnancy with confusing ultrasound reports, forgotten medication schedules, and anxiety between monthly clinic visits. Having deployed OpenMRS systems serving 100,000+ patients and mChanjo immunization tracking across 50+ Kenyan counties, I've seen how 342 mothers die per 100,000 births in Kenya - yet 70% of maternal complications are preventable with early detection. I knew AI and mobile technology could bridge this gap.

What it does

MamaCare Butler is an AI-powered maternal health companion that provides:

  • Weekly AI Health Check-ins: Gemini AI analyzes symptoms and vital signs to detect pre-eclampsia, gestational diabetes, and other high-risk conditions with personalized risk assessments
  • Ultrasound Translator: Gemini Vision extracts measurements from ultrasound images and explains findings in simple language, making medical reports accessible
  • Smart Kick Counter: AI-powered fetal movement tracking with pattern analysis alerts mothers to potential distress
  • Medication Tracker: Comprehensive medication management with scheduled reminders for prenatal vitamins, iron tablets, and prescriptions
  • Emergency SOS: One-tap SMS alerts with GPS location sent to emergency contacts and local hospitals
  • Health Trends Dashboard: Visual charts tracking blood pressure, weight, and fetal movements with period filtering (1 week to full pregnancy)
  • Personalized Profile: Complete pregnancy tracking with due date countdown, week-by-week progress, and emergency contact management ## How we built it Frontend:
  • Flutter 3.5+ for cross-platform mobile (Android/iOS)
  • Material 3 design with responsive layouts using flutter_screenutil
  • Custom chart visualizations with fl_chart library
  • Real-time notifications using flutter_local_notifications

Backend:

  • Serverpod 3.1.1 with full REST API architecture
  • PostgreSQL database for secure health data storage

AI Integration:

  • Google Gemini 1.5 Flash for health risk assessment
  • Gemini Vision API for ultrasound image analysis and measurement extraction
  • AI-powered pattern recognition for kick counter anomaly detection
  • Natural language health advice generation

Challenges we ran into

  • AI Medical Safety: Balancing AI predictions with medical disclaimers - ensuring Gemini provides helpful insights without replacing doctors
  • Scheduled Notifications: Android emulator limitations with exact alarm scheduling required creative workarounds and real device testing
  • Database Migrations: Managing complex health data schema with Serverpod migrations and PostgreSQL compatibility
  • Real-time Chart Updates: Building responsive health trend visualizations with period filtering and empty state handling
  • Emergency Services Integration: Implementing reliable SMS and GPS functionality across different Android versions
  • Gemini API Integration: Structuring prompts for consistent, medically-relevant responses from Gemini

Accomplishments that we're proud of

  • Fully Functional MVP: 10+ major features working end-to-end with real AI integration
  • Gemini AI Excellence: Successfully integrated both Gemini text and vision models for health assessments and ultrasound analysis
  • Complete Health Ecosystem: Built comprehensive maternal health tracking - from daily medications to emergency SOS
  • Production-Ready Backend: Robust Serverpod architecture with 6 REST endpoints, proper error handling, and database migrations
  • Professional UI/UX: Clean, intuitive interface with responsive design, loading states, and smooth navigation
  • Kenya-Specific Optimization: Timezone handling, local emergency numbers, and SMS integration for African context
  • Real Healthcare Experience: Leveraged 5+ years of health tech experience deploying systems serving 100,000+ patients

What we learned

  • Gemini AI excels at medical text analysis and OCR
  • WhatsApp is crucial for Kenya (90% penetration vs 30% app usage)
  • Offline-first is non-negotiable for healthcare apps in Africa
  • Simple, intuitive UI matters more than fancy features
  • FHIR compliance enables seamless integration with existing systems

What's next for mamaCare

  • Partner with Kenyan county governments for pilot deployment
  • Full integration with KenyaEMR and mChanjo health systems
  • Add telemedicine consultations with healthcare providers
  • Multi-language support (Kikuyu, Luo, Kalenjin)A
  • Expand to Uganda, Tanzania, Nigeria
  • Seek funding from Gates Foundation, USAID, Grand Challenges Canada

Built With

Share this project:

Updates