"Finally, a health companion that talks to you like a friend and works like a doctor."
HerLife is an AI-powered women's health platform that unifies period tracking, PCOS risk detection, cycle prediction, nutrition, fitness, and wellness into one intelligent web application. Built by Team Amethyst.
| Name | Role |
|---|---|
| Neha Singh | Frontend + Backend |
| Palak Dasauni | Frontend + Backend |
| Ananya | ML |
| Dhruvika Rawat | ML |
Women today juggle 5+ separate apps for periods, diet, sleep, and wellness. Platforms give generic advice that doesn't adapt to their unique body or changing life stages. Tools only track the past instead of preparing you for tomorrow.
HerLife replaces the clutter. It gathers scattered health routines into one smart platform that finally connects the dots between your cycle, sleep, stress, and overall wellness β and predicts what comes next.
| Phase | Age Range | Features |
|---|---|---|
| Preteen | < 12 | Preteen |
| Young Women | 13β44 | Full cycle tracking, PCOS detection, period prediction |
| Pregnant | Any | Pregnancy tracking, week-by-week updates |
| Postpartum | Any | Recovery tracking, return of period detection |
| Menopause | 45+ | Symptom management, hormone health tracking |
- Algorithm: XGBoost (200 estimators)
- Target: Binary classification β PCOS risk (Yes/No)
- Features: 25 health indicators including BMI, cycle regularity, flow intensity, skin condition, hair fall, hormonal stress index
- Performance: ROC-AUC: 1.0 | F1 Score: ~1.0
- Class Imbalance: Handled via
scale_pos_weight
- Algorithm: SVR with RBF Kernel
- Target: Regression β days until next period
- Features: 22 indicators including stress level, sleep quality, mood, hydration, cycle history
- Performance: MAE: 2.18 days | RΒ²: 0.93
- Scaling: StandardScaler (mandatory for SVR)
User fills onboarding + daily log
β
Backend combines profile + 7-day log average
β
Auto-calculates: BMI, Age, Days Since Period,
Hormonal Stress Index, Wellness Score,
Cycle Irregularity Score
β
Model A β PCOS Risk Score (%)
Model B β Days Until Next Period
β
Homepage cards update in real time
- Size: 1,200 rows Γ 42 columns
- Source: Real form responses + synthetic expansion
- Life phases covered: Young Women, Pregnant, Postpartum, Menopause, Preteen
- Special features:
- Phase-aware null handling (Preteen/Menopause have no period data by design)
- 5% anomaly injection for robust pattern recognition
- NLP journal entries for sentiment analysis
- Clinical ML correlations (PCOS β BMI, irregular cycles, severe acne)
| Layer | Technology |
|---|---|
| Frontend | Next.js (TypeScript) |
| Backend | Flask (Python) |
| Database | Supabase (PostgreSQL) |
| ML Models | XGBoost, SVR (scikit-learn) |
| Auth | Supabase Auth |
| Hosting | Local / Render |
HerLife_HOF/
βββ frontend/ β Next.js app
β βββ components/
β β βββ auth/ β Login, Signup
β β βββ dashboard/ β Phase dashboards
β β βββ onboarding/ β Onboarding flow
β β βββ pregnant/ β Pregnancy features
β β βββ postpartum/ β Postpartum features
β β βββ menopause/ β Menopause features
β β βββ preteen/ β Preteen features
β βββ app/
β βββ onboarding/ β Phase-based question pages
β βββ dashboard/ β Homepage
β
βββ backend/ β Flask API
β βββ app.py β Main Flask application
β βββ .env β Supabase credentials
β βββ models/ β Trained ML models
β β βββ herlife_pcos_xgb_model.pkl
β β βββ herlife_pcos_features.pkl
β β βββ herlife_period_svr_model.pkl
β β βββ herlife_period_scaler.pkl
β β βββ herlife_period_features.pkl
β βββ venv/ β Python virtual environment
β
βββ README.md
| Method | Endpoint | Description |
|---|---|---|
| GET | / |
Health check |
| POST | /api/signup |
Create new user |
| POST | /api/update-phase |
Save life phase |
| POST | /api/onboarding |
Save health profile + calculate BMI |
| POST | /api/profile |
Update lifestyle data |
| POST | /api/daily-log |
Save daily log + run ML predictions |
| GET | /api/predictions/<user_id> |
Fetch latest predictions |
users β id, email, name, dob, age, life_phase, height, weight, bmi
health_profile β user_id, last_period_date, cycle_length, flow_intensity,
pcos_diagnosed, periods_regular, bleeding_duration,
clotting, pain_level, missed_periods_frequency,
exercise_frequency, sleep_duration, diet_type,
caffeine_intake, junk_food_frequency, sugar_intake,
water_intake, skin_condition, hair_fall,
hormonal_contraceptive
daily_logs β user_id, log_date, mood, stress_level, sleep_quality,
water_glasses, period_started, energy_level
predictions β user_id, cycle_phase, days_until_period,
pcos_risk_score, next_period_date, updated_atSign Up (name, email, DOB, password)
β
Life Phase Selection
β
Onboarding Questions (phase-specific, ~14 questions)
β
Profile Page (lifestyle questions, filled once)
β
Homepage Dashboard
βββ Current cycle phase card
βββ Period calendar
βββ Days until next period
βββ PCOS risk score
βββ Daily log (mood, stress, sleep, water)
β
β° Menu β Nutrition | Exercise | Education | Water tracker
| Field | Calculated From |
|---|---|
BMI |
height + weight |
Age |
date of birth |
Days_Since_Last_Period |
last period date vs today |
Hormonal_Stress_Index |
stress Γ sleep formula |
Wellness_Score |
sleep + mood + energy - stress - junk |
Cycle_Irregularity_Score |
regularity + missed + cycle length |
Current_Cycle_Phase |
days since period Γ· cycle length |
Next_Period_Date |
today + days until period |
cd backend
source venv/bin/activate
python3 app.py
# Running on http://127.0.0.1:5000cd frontend
npm install
npm run dev
# Running on http://localhost:3000Create backend/.env:
SUPABASE_URL=your_supabase_url
SUPABASE_KEY=your_supabase_secret_key
1. Data Collection β 1,200 row dataset from real form responses
2. Preprocessing β Phase-aware nulls, ordinal encoding,
symptom expansion, IQR outlier clipping
3. Feature Engineering β Hormonal Stress Index, Wellness Score,
Cycle Irregularity Score
4. Feature Selection β ANOVA F-score top 15 features per target
5. Model Training β XGBoost (PCOS) + SVR (Period prediction)
6. Evaluation β ROC-AUC 1.0 | MAE 2.18 days | RΒ² 0.93
7. Deployment β Flask REST API serving .pkl model files
- Lifelong companion β supports every phase from teen to menopause
- Proactive predictions β warns about delayed periods before they happen
- PCOS early detection β flags risk even for undiagnosed users
- 7-day averaging β predictions improve with daily use
- Phase-aware β questions, dashboard and features adapt to life stage
- Privacy first β all data stored securely in PostgreSQL
HerLife was built for a hackathon by Team Amethyst with the goal of creating a women's health platform that is lifelong, unified, and personal.
Made with π©· by Team Amethyst