{"id":29248412,"url":"https://github.com/adityavofficial/mamasaheli","last_synced_at":"2026-04-13T16:34:39.542Z","repository":{"id":302035932,"uuid":"1010962806","full_name":"ADITYAVOFFICIAL/MamaSaheli","owner":"ADITYAVOFFICIAL","description":"MamaSaheli: AI-driven pregnancy support platform using Groq (Chat/OCR), Fluvio (Real-Time Forum), Monad (Blockchain Game), and Appwrite (BaaS). Includes health tracking, doc management, and community features.","archived":false,"fork":false,"pushed_at":"2025-06-30T08:13:18.000Z","size":13676,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-30T08:38:15.560Z","etag":null,"topics":["appwrite","blockchain","gaming","groq","healthcare","monad","reactjs","solidity","typescript"],"latest_commit_sha":null,"homepage":"https://mamasaheli.vercel.app/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ADITYAVOFFICIAL.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-30T05:23:14.000Z","updated_at":"2025-06-30T08:13:21.000Z","dependencies_parsed_at":"2025-06-30T08:48:30.281Z","dependency_job_id":null,"html_url":"https://github.com/ADITYAVOFFICIAL/MamaSaheli","commit_stats":null,"previous_names":["adityavofficial/mamasaheli"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ADITYAVOFFICIAL/MamaSaheli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADITYAVOFFICIAL%2FMamaSaheli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADITYAVOFFICIAL%2FMamaSaheli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADITYAVOFFICIAL%2FMamaSaheli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADITYAVOFFICIAL%2FMamaSaheli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ADITYAVOFFICIAL","download_url":"https://codeload.github.com/ADITYAVOFFICIAL/MamaSaheli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ADITYAVOFFICIAL%2FMamaSaheli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263421926,"owners_count":23464049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appwrite","blockchain","gaming","groq","healthcare","monad","reactjs","solidity","typescript"],"created_at":"2025-07-04T00:06:31.364Z","updated_at":"2026-04-13T16:34:39.529Z","avatar_url":"https://github.com/ADITYAVOFFICIAL.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MamaSaheli\n\n**MamaSaheli** is a comprehensive, AI-powered platform designed to support expectant mothers throughout their pregnancy journey. It offers personalized health tracking, secure document management, real-time community support, and a suite of intelligent tools to provide a confident and informed experience.\n\n**[Live Demo](https://mamasaheli.vercel.app/)**\n\n---\n# MamaSaheli\n\n**MamaSaheli** is a comprehensive, AI-powered platform designed to support expectant mothers throughout their pregnancy journey. It offers personalized health tracking, secure document management, real-time community support, and a suite of intelligent tools to provide a confident and informed experience.\n\n**[Live Demo](https://mamasaheli.vercel.app/)**\n\n---\n\n## ✨ Key Features\n\n- ✅ **AI Chat Assistant (Gemini \u0026 Groq):** Personalized Q\u0026A and **Document Transcription (OCR)** powered by fast, multimodal AI models.\n- ✅ **Personalized Dashboard:** Tracks pregnancy milestones, upcoming appointments, medication reminders, and recent health readings with AI-generated insights.\n- ✅ **Comprehensive Health Tracking:** Log and visualize key health metrics including Blood Pressure, Blood Sugar, and Weight.\n- ✅ **Bloodwork Analysis:** Upload lab reports and leverage AI to extract, track, and visualize key biomarkers over time.\n- ✅ **Appointment Scheduling:** Book and manage prenatal care appointments with your assigned healthcare provider.\n- ✅ **Secure Medical Document Vault:** Upload, view, and manage medical records securely, powered by Appwrite Storage.\n- ✅ **Real-Time Community Forum:** Create topics, post replies, and vote on content with real-time updates (via Fluvio) and AI-powered content moderation (via Groq).\n- ✅ **Resources \u0026 Blog:** Access a rich library of articles, filterable by category, with AI-enhanced content formatting.\n- ✅ **Emergency Hub:** Quick access to critical warning signs and a location-aware tool to find nearby hospitals using Google Maps.\n- ✅ **AI-Powered Suggestions:** Get personalized meal ideas, safe exercise suggestions, and relevant product recommendations tailored to your profile and pregnancy stage.\n- ✅ **Symptom Checker:** An informational tool providing AI-powered analysis of symptoms based on user input and profile context.\n- ✅ **Blockchain Engagement (Monad):**\n        - A fun stacking game with high scores submitted to a transparent, on-chain leaderboard on the Monad Testnet.\n        - Mint unique, non-transferable NFT \"milestone badges\" for achieving key goals in the pregnancy journey.\n- ✅ **Doctor's Portal:** A dedicated dashboard for healthcare providers to view assigned patients, their recent documents, and upcoming appointments.\n- ✅ **Data Privacy \u0026 Management:** Easily export all your personal data in JSON or PDF format, or permanently delete your account and associated data.\n- ✅ **Progressive Web App (PWA):** Installable on mobile and desktop devices for an app-like experience with offline capabilities.\n- ✅ **Push Notifications:** Opt-in to receive timely reminders for appointments and medications via Firebase Cloud Messaging.\n- ✅ **User Authentication \u0026 Profile (Appwrite):** Secure user registration, login, and comprehensive profile management.\n\n---\n\n## 🛠️ Tech Stack\n\n- **Frontend:** React, TypeScript, Vite, Tailwind CSS, Shadcn UI\n- **Backend-as-a-Service (BaaS):** Appwrite (Authentication, Databases, Storage, Functions)\n- **Real-Time Streaming:** Fluvio / InfinyOn Cloud (via WebSocket Gateway)\n- **AI Engines:** Google Gemini \u0026 Groq API (Llama 3 Models)\n- **Blockchain:** Solidity, Ethers.js, Monad Testnet\n- **State Management:** Zustand\n- **Data Fetching:** TanStack Query (React Query)\n- **Deployment:** Vercel (Frontend), Bun (Backend Server)\n- **Additional Services:** Google Maps API, Firebase Cloud Messaging\n\n---\n\n## 🏛️ Architecture\n\nThe application is built on a robust, modern architecture leveraging a BaaS for core backend functionality, a real-time streaming platform for community features, and cutting-edge AI and blockchain services for intelligent and engaging user experiences.\n\n**Overall Workflow:**\n![Overall Workflow Diagram](charts_and_diagrams/Workflow_Diagram.png)\n\n**Real-Time Dataflow (Fluvio):**\n![Fluvio Dataflow Architecture](charts_and_diagrams/Fluvio_InfinyOn_Dataflow_architecture_and_Design.png)\n\n**AI Workflow (Groq):**\n![Groq Workflow Diagram](charts_and_diagrams/Groq_Workflow_Diagram.png)\n\n**Blockchain Interaction (Monad):**\n![Monad Blockchain Integration](charts_and_diagrams/Monad_Blockchain.png)\n\n---\n\n## 📂 Project Structure\n\nThe repository is organized into several key directories:\n\n```bash\ngit clone https://github.com/ADITYAVOFFICIAL/MamaSaheli.git\ncd MamaSaheli\n.\n├── MamaSaheli-backend/   # WebSocket server for real-time Fluvio events\n├── appwrite-functions/   # Serverless functions triggered by Appwrite events (e.g., new forum post)\n├── contracts/            # Solidity smart contracts for Monad blockchain features\n├── functions/            # Additional Appwrite serverless functions (e.g., user analytics)\n├── public/               # Static assets, PWA manifest, service workers\n├── src/                  # Main frontend application source code\n│   ├── components/       # Reusable React components\n│   ├── hooks/            # Custom React hooks\n│   ├── lib/              # Client-side libraries, API helpers (Appwrite, AI, etc.)\n│   ├── pages/            # Top-level page components for each route\n│   └── store/            # Zustand state management store\n└── ...                   # Root configuration files (Vite, Tailwind, Docker, etc.)\n```\n\n---\n\n## 🚀 Getting Started\n\nFollow these steps to set up and run the MamaSaheli project locally.\n\n### 1. Prerequisites\n\n- [Node.js](https://nodejs.org/) (v18 or later)\n- [Bun](https://bun.sh/) (or `npm`/`yarn`)\n- An [Appwrite Cloud](https://cloud.appwrite.io/) account.\n- API Keys for:\n        - Google Gemini\n        - Groq\n        - Google Maps (with Places API enabled)\n        - Fluvio / InfinyOn Cloud\n        - Firebase Project for Push Notifications\n\n### 2. Clone the Repository\n\n```bash\ngit clone https://github.com/ADITYAVOFFICIAL/MamaSaheli.git\ncd MamaSaheli\n```\n\n### 3. Environment Variable Setup\n\nYou will need two separate `.env` files: one for the frontend (root directory) and one for the backend service.\n\n**A. Frontend Environment (`.env.local`)**\n\nCreate a file named `.env.local` in the project's root directory. Populate it with your Appwrite, AI, and Google Maps keys.\n\n```env\n# Appwrite Configuration (Get these from your Appwrite project settings)\nVITE_APPWRITE_ENDPOINT=\"https://cloud.appwrite.io/v1\"\nVITE_APPWRITE_PROJECT_ID=\"YOUR_APPWRITE_PROJECT_ID\"\nVITE_APPWRITE_BLOG_DATABASE_ID=\"YOUR_APPWRITE_DATABASE_ID\"\nVITE_APPWRITE_PROFILES_COLLECTION_ID=\"profiles\"\nVITE_APPWRITE_APPOINTMENTS_COLLECTION_ID=\"appointments\"\nVITE_APPWRITE_MEDICAL_DOCUMENTS_COLLECTION_ID=\"medicalDocuments\"\nVITE_APPWRITE_BLOG_COLLECTION_ID=\"blogs\"\nVITE_APPWRITE_BP_COLLECTION_ID=\"bloodPressure\"\nVITE_APPWRITE_SUGAR_COLLECTION_ID=\"bloodSugar\"\nVITE_APPWRITE_WEIGHT_COLLECTION_ID=\"weight\"\nVITE_APPWRITE_MEDS_COLLECTION_ID=\"medications\"\nVITE_APPWRITE_CHAT_HISTORY_COLLECTION_ID=\"chatHistory\"\nVITE_APPWRITE_BOOKMARKS_COLLECTION_ID=\"bookmarks\"\nVITE_APPWRITE_FORUM_TOPICS_COLLECTION_ID=\"forumTopics\"\nVITE_APPWRITE_FORUM_POSTS_COLLECTION_ID=\"forumPosts\"\nVITE_APPWRITE_FORUM_VOTES_COLLECTION_ID=\"forumVotes\"\nVITE_BLOODWORKS_COLLECTION_ID=\"bloodworks\"\nVITE_APPWRITE_PROFILE_BUCKET_ID=\"profilePhotos\"\nVITE_APPWRITE_MEDICAL_BUCKET_ID=\"medicalFiles\"\nVITE_APPWRITE_CHAT_IMAGES_BUCKET_ID=\"chatImages\"\nVITE_APPWRITE_MANAGE_USER_DATA=\"YOUR_MANAGE_USER_DATA_FUNCTION_ID\"\n\n# AI API Keys\nVITE_GEMINI_API_KEY=\"YOUR_GOOGLE_GEMINI_API_KEY\"\nVITE_GROQ_API_KEY=\"YOUR_GROQ_API_KEY\"\n\n# Google Maps API Key\nVITE_GOOGLE_MAPS_API_KEY=\"YOUR_GOOGLE_MAPS_API_KEY\"\n# Appwrite Configuration (Get these from your Appwrite project settings)\nVITE_APPWRITE_ENDPOINT=\"https://cloud.appwrite.io/v1\"\nVITE_APPWRITE_PROJECT_ID=\"YOUR_APPWRITE_PROJECT_ID\"\nVITE_APPWRITE_BLOG_DATABASE_ID=\"YOUR_APPWRITE_DATABASE_ID\"\nVITE_APPWRITE_PROFILES_COLLECTION_ID=\"profiles\"\nVITE_APPWRITE_APPOINTMENTS_COLLECTION_ID=\"appointments\"\nVITE_APPWRITE_MEDICAL_DOCUMENTS_COLLECTION_ID=\"medicalDocuments\"\nVITE_APPWRITE_BLOG_COLLECTION_ID=\"blogs\"\nVITE_APPWRITE_BP_COLLECTION_ID=\"bloodPressure\"\nVITE_APPWRITE_SUGAR_COLLECTION_ID=\"bloodSugar\"\nVITE_APPWRITE_WEIGHT_COLLECTION_ID=\"weight\"\nVITE_APPWRITE_MEDS_COLLECTION_ID=\"medications\"\nVITE_APPWRITE_CHAT_HISTORY_COLLECTION_ID=\"chatHistory\"\nVITE_APPWRITE_BOOKMARKS_COLLECTION_ID=\"bookmarks\"\nVITE_APPWRITE_FORUM_TOPICS_COLLECTION_ID=\"forumTopics\"\nVITE_APPWRITE_FORUM_POSTS_COLLECTION_ID=\"forumPosts\"\nVITE_APPWRITE_FORUM_VOTES_COLLECTION_ID=\"forumVotes\"\nVITE_BLOODWORKS_COLLECTION_ID=\"bloodworks\"\nVITE_APPWRITE_PROFILE_BUCKET_ID=\"profilePhotos\"\nVITE_APPWRITE_MEDICAL_BUCKET_ID=\"medicalFiles\"\nVITE_APPWRITE_CHAT_IMAGES_BUCKET_ID=\"chatImages\"\nVITE_APPWRITE_MANAGE_USER_DATA=\"YOUR_MANAGE_USER_DATA_FUNCTION_ID\"\n\n# AI API Keys\nVITE_GEMINI_API_KEY=\"YOUR_GOOGLE_GEMINI_API_KEY\"\nVITE_GROQ_API_KEY=\"YOUR_GROQ_API_KEY\"\n\n# Google Maps API Key\nVITE_GOOGLE_MAPS_API_KEY=\"YOUR_GOOGLE_MAPS_API_KEY\"\n```env\n# Fluvio Access Key (from InfinyOn Cloud)\nVITE_FLUVIO_ACCESS_KEY=\"YOUR_FLUVIO_ACCESS_KEY\"\n\n# WebSocket Server Port\nWEBSOCKET_PORT=8081\n```\n*(**Note:** For a complete list of required variables, refer to `src/utils/appwriteConfig.ts`)*\n\n**B. Backend Environment (`MamaSaheli-backend/.env`)**\n\nCreate a file named `.env` inside the `MamaSaheli-backend/` directory.\n\n```env\n# Fluvio Access Key (from InfinyOn Cloud)\nVITE_FLUVIO_ACCESS_KEY=\"YOUR_FLUVIO_ACCESS_KEY\"\n\n# WebSocket Server Port\nWEBSOCKET_PORT=8081\n```\n\n### 4. Appwrite Project Setup\n\nBefore running the application, you must configure your Appwrite Cloud project.\n\n### A. Create Project \u0026 Database\n\n1. Log in to your Appwrite Cloud account and create a new project.\n2. Note the **Project ID** and add it to your `.env.local` file.\n3. Navigate to the **Databases** section and create a new database. Note the **Database ID** and add it to `.env.local`.\n\n### B. Create Collections \u0026 Buckets\n\nInside your new database, create the collections and storage buckets listed in your `.env.local` file. You must **manually add the attributes and indexes** for each collection as defined in `src/utils/appwriteConfig.ts`. This step is crucial for the application's queries to work correctly.\n\n- **Collections:** `profiles`, `appointments`, `medicalDocuments`, `blogs`, `bloodPressure`, `bloodSugar`, `weight`, `medications`, `chatHistory`, `bookmarks`, `forumTopics`, `forumPosts`, `forumVotes`, `bloodworks`.\n- **Storage Buckets:** `profilePhotos`, `medicalFiles`, `chatImages`.\n\n### C. Deploy Functions\n\nDeploy the serverless functions using the [Appwrite CLI](https://appwrite.io/docs/command-line).\n\n1. Install and log in to the Appwrite CLI: `appwrite login`.\n1. Link your local project: `appwrite init project`.\n1. Deploy the functions one by one:\n\n```bash\n    # Deploy user analytics function\n    appwrite deploy function --functionId \u003cYOUR_GETUSERCOUNT_FUNCTION_ID\u003e --path functions/getUserCount\n    \n    # Deploy forum event producers\n    appwrite deploy function --functionId \u003cYOUR_PRODUCEFORUMPOSTEVENT_FUNCTION_ID\u003e --path appwrite-functions/produceForumPostEvent\n    appwrite deploy function --functionId \u003cYOUR_PRODUCEFORUMVOTEEVENT_FUNCTION_ID\u003e --path appwrite-functions/produceForumVoteEvent\n\n    # Deploy user data management function\n    appwrite deploy function --functionId \u003cYOUR_MANAGEUSERDATA_FUNCTION_ID\u003e --path appwrite-functions/manageUserData\n```\n\n1. After deploying, go to the Appwrite Console for each function to set the required **environment variables** and **event triggers**. Refer to the README files within each function's directory for specific requirements.\n\n### 5. Install Dependencies \u0026 Run\n\n### A. Backend Service (Fluvio Consumer)\n\nOpen a terminal for the backend service.\n\n```bash\ncd MamaSaheli-backend\nbun install\nbun run dev\n```\n\n### B. Frontend Application\n\nOpen a separate terminal for the frontend application.\n\n```bash\n# From the project root directory\nbun install\nbun run dev\n```\n\nThe application should now be running on `http://localhost:8080`.\n\n---\n\n## 🔮 Future Scope\n\n- ⛓️ **Digital Healthcare Records:** A secure, blockchain-based platform for storing and sharing electronic health records, ensuring data privacy and easy access for patients and healthcare providers.\n- 🎓 **EduTech Interactive Learning Platform:** A web3-based interactive learning platform that uses gamification and AR/VR to make education engaging and accessible for students in remote areas.\n- ⌚ **Wearable Device Integration:** Integration with smartwatches (e.g., Google Wear OS, Samsung Galaxy Watch) for at-a-glance notifications, quick health metric logging, and medication reminders directly on the user's wrist.\n- 🛡️ **Enhanced Security \u0026 Privacy:** Implement data encryption at rest and in transit where applicable and conduct a thorough review of Appwrite permissions.\n- 🌐 **Localization \u0026 Accessibility:** Add support for multiple languages (i18n) and improve compliance with accessibility standards (WCAG).\n- ☁️ **Scalability \u0026 Optimization:** For large-scale traffic, migrate backend components to dedicated cloud services and optimize API usage.\n\n---\n\n## 📜 License\n\nThis project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n---\n\n## 🖇️ Acknowledgements\n\n- **Frameworks/Libraries:** React, Vite, TypeScript, Tailwind CSS, Shadcn UI, Ethers.js, TanStack Query, Zustand.\n- **Services:** Appwrite, Google Gemini, Groq, Fluvio/InfinyOn, Vercel, Google Maps, Firebase.\n- **Blockchain Platform:** Monad.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityavofficial%2Fmamasaheli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadityavofficial%2Fmamasaheli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadityavofficial%2Fmamasaheli/lists"}