AI Pregnancy Twin Inspiration:

Pregnancy care and maternal health monitoring is crucial, yet many expectant mothers do not have easy access to personalized insights and risk assessment tools. Traditional healthcare monitoring often requires frequent clinic visits, is costly, and may not provide ongoing feedback between appointments. I wanted to build a system that could generate a digital health twin, a personalized model that continuously monitors and interprets clinical data to help mothers understand their risk for pregnancy complications, track health trends, and receive tailored recommendations. The idea grew from the need to make maternal health guidance more accessible, data-driven, and empowering for individuals navigating pregnancy.

What it does?

AI Pregnancy Twin is a web-based maternal health prediction and monitoring system that creates a digital health profile and uses machine learning to assess risk levels for key pregnancy complications. It helps users log their health vitals and symptoms, track weekly trends, and receive AI-powered risk assessment and recommendations. The system also provides real-time alerts and personalized insights, enabling proactive care and informed decisions.

Key functionalities include:

1.Digital health profile and medical history management

2.Recording and visualization of vitals (blood pressure, heart rate, weight, glucose, temperature)

3.Symptom logging and trend tracking

4.AI-powered risk predictions for conditions such as preeclampsia, gestational diabetes, and preterm risk

5.Weekly health summaries and tips

6.Secure authentication and personalized recommendations

How we built it?

The project is built with a full modern web application stack:

Frontend:React (Vite) — fast, modular UI development

TypeScript — type safety, Tailwind CSS & shadcn/ui — styling and components

React Query — data fetching, Recharts — data visualization

Backend & Database: Supabase — PostgreSQL database and authentication

Edge Functions (Deno) — serverless functions for risk assessment and weekly summary APIs

Machine Learning:

Python / Notebooks for model training (Logistic Regression, Decision Trees, Random Forest, Gradient Boosting)

Models deployed as part of backend risk assessment functions

Integration: React frontend communicates with Supabase for authentication and data storage

Supabase edge functions handle AI risk scoring and summary generation

The system uses structured clinical data and vitals to generate risk scores and personalized insights.

Challenges we ran into:

Building AI Pregnancy Twin brought several challenges:

Data modeling: Designing a schema that captures longitudinal health data and symptom logs in a way that supports predictive modeling and analytics.

Model selection: Choosing machine learning models that balance interpretability and performance for health risk prediction.

Real-time integration: Coordinating real-time UI interactions with backend risk scoring functions while maintaining responsiveness.

User experience: Creating a UI that is both informative and accessible for non-technical users tracking health trends.

These challenges required careful planning and iteration of both the data models and UI flows to ensure meaningful outputs without overwhelming the user.

What we learned?

How to design effective digital health models for longitudinal monitoring.

How to integrate machine learning workflows into a real web application.

How to use Supabase edge functions as a scalable, serverless backend.

Importance of data visualization for health trends.

Best practices for React + TypeScript application architecture with real-world data flows.

What’s next for AI Pregnancy Twin

Mobile version: Build a native or hybrid app (React Native) for on-the-go tracking.

Wearables integration: Connect real-time data from wearables for continuous monitoring.

Doctor portal: Extend the system to allow clinicians to review data and recommendations.

Advanced AI models: Explore deep learning or time-series models for more nuanced predictions.

Multilanguage support and offline mode: Improve accessibility for non-English speakers and low-connectivity environments.

Exportable health reports: Allow users to generate reports to share with healthcare providers.

Built With

  • decision-tree-classifier
  • gradient-boosting
  • logistic-regression
  • machine-learning
  • react-vite
  • supabase
Share this project:

Updates