Motherly is an AI-powered pregnancy companion that empowers expectant parents with personalized insights, daily guidance, and mental wellness support throughout the pregnancy journey. Built with Flutter, the app blends medical best practices with conversational AI to improve prenatal care access and create a calm, informed experience from week one to delivery day.
- Features
- Tech Stack
- Architecture Highlights
- Getting Started
- Configuration
- Usage Guide
- Key Screens
- Data Privacy
- Roadmap
- Contributing
- License
- Due date & trimester tracking – Calculate expected delivery dates from the last menstrual period and monitor weekly progress using
lib/calculation/date_calculation.dart. - AI pregnancy chatbot – Chat with an always-on assistant backed by Google Gemini (
flutter_gemini) to ask health, nutrition, and wellness questions (lib/screens/ai_chatbot.dart). - Baby kick counter – Log fetal movement patterns and review historical trends stored locally via
shared_preferences(lib/screens/baby_kick_counter_screen.dart). - Nutrition discover hub – Explore month-by-month dietary guidance sourced from curated JSON content (
assets/motherly_monthly_data.json) rendered inlib/screens/discover_screen.dart. - Personalized daily checklist – Stay organized with customizable prenatal tasks and reminders within the
HomeScreenmodule. - Emergency support directory – Access curated helplines and professional contacts from the
HelplineScreen.
- Framework: Flutter 3.x, Dart
- AI Integration:
flutter_geminifor Gemini 1.5 models - State & Storage:
shared_preferencesfor persistent local storage - UI Components:
dash_chat_2,intl,cupertino_icons - Platforms: Android, iOS, Web (Flutter supported targets)
- Modular screens: Feature-specific screens under
lib/screens/to keep business logic isolated. - Reusable widgets & utilities: Shared helpers in
lib/widgets/andlib/utils/for styling and formatting. - Asset-driven content: Nutrition and educational content delivered from JSON assets for offline access.
- AI abstraction: Gemini initialization occurs in
lib/main.dartandGemini.initis invoked once before bootstrapping the app entry pointMotherley(lib/app.dart).
- Flutter SDK
>=3.5.2 - Dart SDK bundled with Flutter
- Android Studio, VS Code, or compatible IDE
- Xcode (for iOS builds)
git clone https://github.com/<your-org>/motherly.git
cd motherly
flutter pub get- Create a Gemini API key from the Google AI Studio.
- Copy
lib/models/const.example.darttolib/models/const.dart(if not already present) and paste your key:const String GEMINI_API_KEY = "YOUR_KEY_HERE";
- Never commit real keys—use local
.envmanagement or secure secret stores.
Run the application on an emulator or device:
flutter run- Onboarding: Enter the mother’s name and last menstrual period to personalize insights (
FirstDayOfLastMenstrualPeriodDate). - Home dashboard: Review due-date timeline, wellness tips, and customizable checklist items (
HomeScreen). - AI Conversations: Ask real-time questions about symptoms, nutrition, or emotional support within the AI chat interface (
AIChatBot). - Activity Tracking: Log baby kicks and monitor historical trends to share with a healthcare provider (
BabyKickCounterScreen). - Discover Hub: Browse trimester-based nutritional recommendations and educational content (
Discover).
- Splash & Onboarding:
lib/screens/splash_screen.dart,lib/screens/motherNameScreen.dart - Main Navigation:
lib/screens/bottom_navigation_bar.dart - Support Services:
lib/screens/help_line.dart
- No user data leaves the device except Gemini queries initiated by the user.
- Health logs (kick counts, checklists) persist locally via
shared_preferencesand can be cleared by reinstalling the app. - Users should consult medical professionals and not treat AI responses as medical advice.
- Expand AI prompt engineering for symptom triage.
- Add appointment reminders synchronized with device calendars.
- Introduce partner access and collaborative journaling.
- Localize experience for additional languages.
Contributions are welcome! Please open an issue to propose changes. For pull requests:
- Fork the repository
- Create a feature branch (
git checkout -b feature/your-feature) - Commit with clear messages (
feat: add hydration reminder) - Open a PR describing the change and testing steps
Distributed under the MIT License. See LICENSE (to be added) for details.