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