Early Detection & Lifestyle Recommendations for PCOS & PCOD
▶ Watch the full demo on YouTube:
Polycystic Ovary Syndrome (PCOS) and Polycystic Ovary Disorder (PCOD) are among the most common hormonal disorders affecting women worldwide. Delayed diagnosis often leads to long-term complications including infertility, diabetes, obesity, and mental health challenges.
Luna is an AI-powered digital health companion that helps women:
- 🔍 Detect early risk signals using trained ML models
- 📊 Analyze lifestyle and health patterns with data-driven insights
- 💊 Receive personalized health and lifestyle recommendations
- 🩺 Connect with nearby healthcare professionals
"Technology with empathy — empowering women to take control of their health."
| Feature | Description |
|---|---|
| 🧠 AI-Powered Early Detection | Predicts PCOS/PCOD risk using an optimized Stacking Ensemble model with interpretable risk scores (Low / Moderate / High) |
| 🍎 Personalized Lifestyle Plans | AI + Reinforcement Learning based diet, exercise, sleep, and stress management recommendations |
| 📍 Nearby Doctor Finder | Google Maps API integration to locate specialists and book consultations |
| 📆 Period & Symptom Tracker | Track menstrual cycles, symptoms, and fertility windows with AI-powered cycle prediction |
| 🫀 Multi-Disease Risk Analysis | Predicts risks for Diabetes, Heart Disease, Obesity, and Infertility alongside PCOS |
| 🧘 Mental Wellness Support | Personalized mental health tips and emotional support resources |
| 🌐 Community Forum | Safe space for women to share experiences, read articles, and support each other |
| 🔐 Secure Authentication | JWT-based signup/login with password hashing and route protection |
graph TD
subgraph Frontend [React.js Client]
UI[User Interface]
State[State Management]
Router[React Router]
end
subgraph Backend [Node.js / Express API]
Auth[Authentication & JWT]
UserController[User Management]
MLController[ML Gateway]
end
subgraph Machine_Learning [Python AI Service]
Detect[PCOS Early Detection Model]
Period[Period Prediction Model]
Life[Lifestyle Recommendation Model]
end
subgraph Database
DB[(MongoDB Atlas)]
end
UI -->|API Requests| Auth
UI -->|API Requests| UserController
UI -->|API Requests| MLController
UserController <--> DB
MLController <-->|REST| Detect
MLController <-->|REST| Period
MLController <-->|REST| Life
Detect <--> DB
| Layer | Technology |
|---|---|
| Frontend | React.js, Vite, CSS |
| Backend API | Node.js, Express.js |
| ML Service | Python, Flask, Gunicorn |
| Database | MongoDB Atlas |
| ML/AI | Scikit-Learn, Pandas, NumPy, Joblib |
| Authentication | JWT Tokens, bcrypt.js |
| APIs | Google Maps API, RESTful APIs |
| Hosting | Vercel (Frontend), Render (Backend + ML) |
Luna/
│
├── frontend/ # React + Vite frontend application
│ ├── src/
│ │ ├── components/ # Reusable UI components
│ │ ├── pages/ # Application pages
│ │ └── App.jsx # Main app with routing
│ ├── .env # Frontend environment variables
│ └── package.json
│
├── backend/ # Node.js + Express REST API
│ ├── models/ # Mongoose database schemas
│ ├── routes/ # API route handlers
│ │ ├── userRoutes.js # Auth (signup, login, profile)
│ │ ├── communityRoutes.js # Community forum endpoints
│ │ ├── doctorRoutes.js # Doctor finder endpoints
│ │ └── healthDataRoutes.js# Health data endpoints
│ ├── server.js # Express server entry point
│ ├── .env # Backend environment variables
│ └── package.json
│
├── ml_service/ # Python Flask ML microservice
│ ├── models/ # Trained .joblib model files
│ ├── app.py # Flask API with prediction endpoints
│ └── requirements.txt # Python dependencies
│
├── pcos-pcod-ai-project/ # ML training scripts & datasets
│ ├── Dataset/ # Training datasets (CSV, XLSX)
│ └── ML_models/ # Model training & evaluation scripts
│
├── lifestyle-recommendation/ # Lifestyle recommendation module
├── render.yaml # Render deployment configuration
├── .gitignore
└── README.md
| Model | Algorithm | Accuracy | Purpose |
|---|---|---|---|
| PCOS Detection | Stacking Ensemble (Optimized) | 🟢 94.3% | Primary PCOS/PCOD risk prediction |
| Diabetes Risk | Random Forest | 🟢 91.8% | Diabetes likelihood assessment |
| Heart Disease | Random Forest | 🟢 92.5% | Cardiovascular risk prediction |
| Obesity Level | Gradient Boosting | 🟢 93.1% | Obesity classification |
| Infertility Risk | Gradient Boosting | 🟢 89.7% | Fertility risk assessment |
| Lifestyle Recommender | Reinforcement Learning | 🔵 Reward-Based | Personalized health plan generation |
| Cycle Predictor | Statistical + ML Hybrid | 🔵 ±2.3 days | Next period & fertility window prediction |
Model Details:
- Input: Cycle history, BMI, lifestyle habits, symptoms, blood parameters
- Output: Risk probability (0–100%) with confidence labels
- Training Data: Preprocessed public + synthetic anonymized datasets
- Evaluation: Accuracy, Precision, Recall, F1-Score
graph LR
A[👤 User Signup/Login] --> B[📝 Input Health Data]
B --> C[🧠 AI Risk Analysis]
C --> D{Risk Level}
D -->|Low| E[✅ Preventive Tips]
D -->|Moderate| F[⚠️ Lifestyle Plan + Monitoring]
D -->|High| G[🚨 Doctor Consultation + Plan]
E --> H[📊 Track Progress]
F --> H
G --> H
H --> I[🔄 Continuous Feedback Loop]
- Sign Up & Login — Secure JWT-based authentication
- Submit Health Data — Lifestyle details, cycle data, symptoms, and medical parameters
- AI Analysis — ML models predict PCOS/PCOD risk along with diabetes, heart, and obesity risks
- Personalized Plans — RL-based diet, exercise, and stress management recommendations
- Track & Monitor — Period tracking, symptom logging, and progress visualization
- Doctor Finder — Locate nearby specialists via Google Maps integration
- Node.js v18+ and npm
- Python 3.10+
- MongoDB (local or Atlas account)
- Git
git clone https://github.com/Renu-code123/Luna.git
cd Lunacd backend
npm installCreate a .env file in the backend/ directory:
MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/LunaDB
JWT_SECRET=your_secret_key_here
PORT=5000Start the backend:
npm startcd ml_service
pip install -r requirements.txtStart the ML service:
python app.pyThe ML service will run on http://localhost:5001.
cd frontend
npm installCreate a .env file in the frontend/ directory:
VITE_BACKEND_API_URL=http://localhost:5000
VITE_ML_API_URL=http://localhost:5001Start the frontend:
npm run devThe frontend will be available at http://localhost:5173.
| Existing Solutions | Luna's Innovation |
|---|---|
| Only track periods and symptoms | AI-driven early detection with multi-disease analysis |
| Limited lifestyle advice | RL-powered personalized diet, exercise & mental health plans |
| No clinical linkage | Integrated doctor finder with Google Maps |
| Generic interfaces | Premium, privacy-focused user experience |
| Single condition focus | Multi-model approach (PCOS + Diabetes + Heart + Obesity + Infertility) |
- 🎯 Promotes early awareness before symptoms worsen
- 🥗 Encourages preventive lifestyle changes through personalized plans
- 👥 Builds a supportive digital community for women's health
- 🔒 Ensures data privacy with secure authentication
- 🏥 Bridges the gap between self-care and medical consultation
- 📱 Mobile App (React Native) for on-the-go access
- ⌚ Wearable Integration for real-time health monitoring
- 🌍 Multilingual Support (Hindi, Tamil, and more)
- 🤖 AI Chatbot for mental health support and query resolution
- 🧬 Clinical Validation in partnership with healthcare professionals
- 📈 Advanced Analytics Dashboard with trend predictions
Developed under the Open Innovation Track at HackAura 2025
Empowering Women's Health with AI & Data-Driven Insights
| Member | Role |
|---|---|
| Renu Kumari Prajapati | Full-Stack Developer & ML Engineer |
| Arushi Thakur | Backend Developer |
| Anjali Yadav | UI/UX & Frontend Developer |
This project was developed as a Final Year Academic Project and submitted as a contribution toward an ongoing research paper in the field of AI-powered women's healthcare.
Our core mission is to empower women through:
- 🎓 Education — Raising awareness about PCOS/PCOD among young women and students
- 🔬 Research — Applying real-world Machine Learning to solve healthcare challenges
- 💜 Awareness — Bridging the gap between technology and women's health literacy
- 🌍 Impact — Making early health detection accessible to everyone, free of cost
Feel free to fork, contribute, or build upon this work to further the cause of women's health! 🌸
If Luna inspires you or helps spread awareness about PCOS & PCOD, consider giving it a ⭐ on GitHub!
Together, we can build technology that truly makes a difference.
Made with 💜 by Renu , Arushi , Anjali