Skip to content

Renu-code123/Luna

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Luna

Luna โ€” AI-Powered Women's Health Companion

Early Detection & Lifestyle Recommendations for PCOS & PCOD

Live Demo


๐ŸŽฅ Project Demo

โ–ถ Watch the full demo on YouTube:
YouTube Demo


๐Ÿ’ก About Luna

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."


๐Ÿš€ Key Features

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

๐Ÿ—๏ธ System Architecture

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
Loading

๐Ÿ› ๏ธ Tech Stack

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)

๐Ÿ“‚ Project Structure

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

๐Ÿค– AI/ML Models

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

โš™๏ธ How It Works

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]
Loading
  1. Sign Up & Login โ€” Secure JWT-based authentication
  2. Submit Health Data โ€” Lifestyle details, cycle data, symptoms, and medical parameters
  3. AI Analysis โ€” ML models predict PCOS/PCOD risk along with diabetes, heart, and obesity risks
  4. Personalized Plans โ€” RL-based diet, exercise, and stress management recommendations
  5. Track & Monitor โ€” Period tracking, symptom logging, and progress visualization
  6. Doctor Finder โ€” Locate nearby specialists via Google Maps integration

๐Ÿงช Local Development Setup

Prerequisites

  • Node.js v18+ and npm
  • Python 3.10+
  • MongoDB (local or Atlas account)
  • Git

1. Clone the Repository

git clone https://github.com/Renu-code123/Luna.git
cd Luna

2. Setup the Backend

cd backend
npm install

Create a .env file in the backend/ directory:

MONGODB_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/LunaDB
JWT_SECRET=your_secret_key_here
PORT=5000

Start the backend:

npm start

3. Setup the ML Service

cd ml_service
pip install -r requirements.txt

Start the ML service:

python app.py

The ML service will run on http://localhost:5001.

4. Setup the Frontend

cd frontend
npm install

Create a .env file in the frontend/ directory:

VITE_BACKEND_API_URL=http://localhost:5000
VITE_ML_API_URL=http://localhost:5001

Start the frontend:

npm run dev

The frontend will be available at http://localhost:5173.


๐Ÿ” What Makes Luna Different

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)

๐ŸŒˆ Impact & Benefits

  • ๐ŸŽฏ 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

๐Ÿ”ฎ Future Roadmap

  • ๐Ÿ“ฑ 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

๐Ÿ† Recognition

Developed under the Open Innovation Track at HackAura 2025

Empowering Women's Health with AI & Data-Driven Insights


๐Ÿ‘ฉโ€๐Ÿ’ป Team

Member Role
Renu Kumari Prajapati Full-Stack Developer & ML Engineer
Arushi Thakur Backend Developer
Anjali Yadav UI/UX & Frontend Developer

๐Ÿ“œ License

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

About

AI-powered system for early detection of PCOS/PCOD risk and personalized lifestyle recommendations using machine learning and health data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors