Features β’ Tech Stack β’ Quick Start β’ Documentation β’ Contributing
FlowSync is a comprehensive, full-stack menstrual health tracking platform that empowers users to monitor, analyze, and understand their reproductive health through data-driven insights. Built with modern web technologies, FlowSync combines intelligent cycle predictions, symptom monitoring, mood tracking, and personalized wellness analytics to provide a holistic view of menstrual health.
- Health-First Approach: Wellness scoring based on actual health metrics, not just tracking frequency
- Intelligent Predictions: Machine learning-powered cycle predictions using historical data
- Comprehensive Analytics: Detailed insights into cycle regularity, symptoms, and mood patterns
- Privacy-Focused: Secure authentication with data encryption and user-controlled storage
- Educational Resources: Built-in guides about menstrual health, PMS management, and product selection
- Responsive Design: Seamless experience across desktop, tablet, and mobile devices
- Period Logging: Track menstrual cycle start/end dates with flow intensity
- Cycle Predictions: AI-powered predictions for next period, ovulation, and fertile window
- Symptom Monitoring: Log 15+ common symptoms (cramps, headaches, fatigue, etc.)
- Mood Tracking: Monitor emotional health throughout your cycle
- Health Metrics: Track temperature, weight, and other vital health indicators
- Wellness Score: Health-based scoring system (0-100) evaluating:
- Cycle regularity and hormonal balance
- Cycle and period length normalcy
- Symptom burden severity
- Emotional health patterns
- Cycle Statistics: Average cycle length, regularity analysis, and trend visualization
- Symptom Analysis: Frequency charts and pattern identification
- Mood Patterns: Emotional health tracking across cycle phases
- Interactive Dashboard: Real-time cycle status with visual progress indicators
- Calendar View: Month-by-month visualization of periods and logs
- Quick BMI Calculator: Instant BMI calculation with health categorization
- Test Mode: Explore the app with pre-populated sample data
- Responsive Design: Optimized for mobile, tablet, and desktop
- Understanding Your Cycle: Comprehensive guide to menstrual phases
- PMS Management: Evidence-based tips for symptom relief
- Product Guide: Information on menstrual products and sustainability
- JWT Authentication: Secure token-based authentication system
- Password Hashing: bcrypt encryption for user credentials
- HTTP-Only Cookies: Protection against XSS attacks
- Rate Limiting: DDoS and brute-force attack prevention
- Input Validation: Comprehensive validation to prevent injection attacks
| Technology | Purpose |
|---|---|
| React 19 | UI framework with hooks and context API |
| React Router 7 | Client-side routing and navigation |
| Vite 6 | Lightning-fast build tool and dev server |
| React Calendar | Interactive calendar component |
| CSS3 | Custom styling with CSS variables and flexbox/grid |
| Technology | Purpose |
|---|---|
| Node.js 18+ | JavaScript runtime environment |
| Express.js 4 | Web application framework |
| MongoDB | NoSQL database for flexible data storage |
| Mongoose | ODM for MongoDB with schema validation |
| JWT | Secure authentication with JSON Web Tokens |
| bcryptjs | Password hashing and encryption |
| Technology | Purpose |
|---|---|
| ESLint | Code quality and consistency enforcement |
| Prettier | Automatic code formatting |
| Helmet | Security headers and protection |
| Morgan | HTTP request logging |
| Winston | Application-level logging |
| Express Validator | Request validation middleware |
| Express Rate Limit | API rate limiting |
- RESTful API design principles
- JWT-based authentication with refresh tokens
- Role-based access control (RBAC) ready
- Comprehensive error handling with custom error classes
- Request validation at controller level
- Node.js 18.0.0 or higher (Download)
- MongoDB 5.0+ (Installation Guide)
- npm or yarn package manager
- Git for version control
-
Clone the repository
git clone https://github.com/AmanCrafts/Menstrual-Health-Tracker.git cd Menstrual-Health-Tracker -
Install Backend Dependencies
cd backend npm install -
Install Frontend Dependencies
cd ../frontend npm install -
Environment Configuration
Backend - Create
backend/.env:# Server Configuration NODE_ENV=development PORT=5000 # MongoDB Configuration MONGODB_URI=mongodb://localhost:27017/flowsync # JWT Configuration JWT_SECRET=your_super_secret_jwt_key_here_min_32_chars JWT_REFRESH_SECRET=your_refresh_token_secret_here JWT_EXPIRE=7d JWT_REFRESH_EXPIRE=30d # CORS Configuration CLIENT_URL=http://localhost:5173
Frontend - Create
frontend/.env:VITE_API_URL=http://localhost:5000/api
-
Start MongoDB
# macOS (Homebrew) brew services start mongodb-community # Linux sudo systemctl start mongod # Windows net start MongoDB
-
Seed Database (Optional)
cd backend npm run seed -
Start Development Servers
Terminal 1 - Backend:
cd backend npm run devBackend runs on
http://localhost:5000Terminal 2 - Frontend:
cd frontend npm run devFrontend runs on
http://localhost:5173 -
Access the Application
Open your browser and navigate to
http://localhost:5173
Want to explore without creating an account? Enable Test Mode from the login page to use pre-populated sample data and explore all features instantly!
MHT/
βββ backend/ # Express.js API server
β βββ src/
β β βββ config/ # Configuration files
β β β βββ database.js # MongoDB connection setup
β β β βββ index.js # Central config exports
β β βββ controllers/ # Request handlers
β β β βββ authController.js
β β β βββ periodController.js
β β β βββ symptomController.js
β β β βββ moodController.js
β β β βββ healthController.js
β β βββ middleware/ # Custom middleware
β β β βββ auth.js # JWT verification
β β β βββ errorHandler.js
β β βββ models/ # MongoDB schemas
β β β βββ User.js
β β β βββ PeriodLog.js
β β β βββ SymptomLog.js
β β β βββ MoodLog.js
β β β βββ HealthLog.js
β β βββ routes/ # API routes
β β β βββ authRoutes.js
β β β βββ periodRoutes.js
β β β βββ symptomRoutes.js
β β β βββ moodRoutes.js
β β β βββ healthRoutes.js
β β βββ utils/ # Utility functions
β β β βββ logger.js # Winston logger
β β βββ validators/ # Input validation
β β βββ seed.js # Database seeding
β β βββ server.js # Express app entry point
β βββ .env # Environment variables
β βββ .eslintrc.cjs # ESLint configuration
β βββ .prettierrc # Prettier configuration
β βββ package.json
β
βββ frontend/ # React application
β βββ public/ # Static assets
β βββ src/
β β βββ assets/ # Images, icons
β β βββ components/ # React components
β β β βββ dashboard/
β β β β βββ CycleProgressBar.jsx
β β β β βββ PredictionCard.jsx
β β β β βββ QuickBmiCalculator.jsx
β β β β βββ RecentLogs.jsx
β β β β βββ StatusCard.jsx
β β β β βββ LogButton.jsx
β β β βββ trackers/
β β β β βββ Calendar.jsx
β β β β βββ PeriodTracker.jsx
β β β β βββ SymptomTracker.jsx
β β β β βββ MoodTracker.jsx
β β β β βββ HealthTracker.jsx
β β β βββ Alert.jsx
β β β βββ LoadingSpinner.jsx
β β β βββ Navbar.jsx
β β β βββ ProtectedRoute.jsx
β β β βββ TestModeToggle.jsx
β β βββ contexts/ # React Context providers
β β β βββ AuthContext.jsx
β β β βββ DataContext.jsx
β β β βββ useAuth.jsx
β β βββ pages/ # Page components
β β β βββ Home.jsx
β β β βββ Signin.jsx
β β β βββ Signup.jsx
β β β βββ Dashboard.jsx
β β β βββ Trackers.jsx
β β β βββ Analytics.jsx
β β β βββ Education.jsx
β β β βββ Profile.jsx
β β β βββ education/
β β β βββ UnderstandingCycle.jsx
β β β βββ PMSManagement.jsx
β β β βββ ProductGuide.jsx
β β βββ services/ # API integration
β β β βββ api.js
β β βββ styles/ # CSS modules
β β βββ utils/ # Helper functions
β β β βββ cycleCalculations.js
β β β βββ testData.js
β β βββ App.jsx # Root component
β β βββ main.jsx # React entry point
β βββ .env # Environment variables
β βββ eslint.config.js # ESLint configuration
β βββ .prettierrc # Prettier configuration
β βββ vite.config.js # Vite configuration
β βββ package.json
β
βββ CODE_OF_CONDUCT.md # Community guidelines
βββ CODE_QUALITY.md # Code standards documentation
βββ CONTRIBUTING.md # Contribution guidelines
βββ LICENSE # MIT License
βββ README.md # This file
- Code Quality Guide - ESLint, Prettier, and coding standards
- Contributing Guidelines - How to contribute to the project
- Code of Conduct - Community standards and expectations
POST /api/auth/register - Create new user account
POST /api/auth/login - Authenticate user
POST /api/auth/logout - Logout current user
POST /api/auth/refresh-token - Refresh JWT access token
GET /api/auth/me - Get current user profile
PUT /api/auth/update-profile - Update user profile
PUT /api/auth/update-password - Change password
GET /api/periods - Get all period logs
POST /api/periods - Create new period log
GET /api/periods/:id - Get specific period log
PUT /api/periods/:id - Update period log
DELETE /api/periods/:id - Delete period log
GET /api/symptoms - Get all symptom logs
POST /api/symptoms - Log new symptoms
PUT /api/symptoms/:id - Update symptom log
DELETE /api/symptoms/:id - Delete symptom log
GET /api/moods - Get all mood logs
POST /api/moods - Log new mood entry
PUT /api/moods/:id - Update mood log
DELETE /api/moods/:id - Delete mood log
GET /api/health - Get all health logs
POST /api/health - Log health metrics
PUT /api/health/:id - Update health log
DELETE /api/health/:id - Delete health log
Cycle Prediction Algorithm
- Uses historical period data (minimum 2 cycles)
- Calculates average cycle length and variance
- Predicts next period with Β±2 day accuracy window
- Estimates ovulation (14 days before next period)
- Identifies fertile window (5 days before to 1 day after ovulation)
Wellness Score Calculation
- Starts at 100 (perfect health)
- Deducts points for health concerns:
- Cycle Irregularity: -8 to -30 points
- Abnormal Cycle Length: -5 to -15 points
- Abnormal Period Length: -3 to -10 points
- Symptom Burden: -5 to -25 points
- Negative Moods: -5 to -20 points
- Score Categories:
- 85-100: Excellent
- 70-84: Good
- 55-69: Fair
- 40-54: Needs Attention
- 0-39: Concerning
Backend (cd backend)
npm run dev # Start development server with nodemon
npm start # Start production server
npm run lint # Check code quality with ESLint
npm run lint:fix # Auto-fix ESLint issues
npm run format # Format code with Prettier
npm run seed # Seed database with sample data
npm test # Run test suiteFrontend (cd frontend)
npm run dev # Start Vite dev server
npm run build # Build for production
npm run preview # Preview production build
npm run lint # Check code quality with ESLint
npm run lint:fix # Auto-fix ESLint issues
npm run format # Format code with PrettierThis project enforces strict code quality standards:
- ESLint for code quality and consistency
- Prettier for automatic formatting
- Single quotes for strings
- Template literals for string interpolation
- 4-space indentation
- 100-character line width
Run npm run lint:fix and npm run format before committing!
See CODE_QUALITY.md for detailed guidelines.
# Backend tests
cd backend
npm test
# Frontend tests (if configured)
cd frontend
npm testGenerate sample data for testing:
cd backend
npm run seedThis creates 5 test users with different health profiles and 12 months of tracking data.
Environment Variables Required:
NODE_ENV=production
PORT=5000
MONGODB_URI=<your-production-mongodb-uri>
JWT_SECRET=<secure-secret-key>
JWT_REFRESH_SECRET=<secure-refresh-key>
CLIENT_URL=<your-frontend-url>Recommended Platforms:
- Railway
- Render
- Heroku
- DigitalOcean App Platform
- AWS EC2/Elastic Beanstalk
Environment Variables Required:
VITE_API_URL=<your-backend-api-url>Recommended Platforms:
- Vercel (Recommended)
- Netlify
- Railway
- AWS Amplify
- GitHub Pages
Recommended MongoDB Hosting:
- MongoDB Atlas (Free tier available)
- Railway PostgreSQL (Alternative)
We love contributions! π
- Fork the repository
- Clone your fork:
git clone https://github.com/YOUR_USERNAME/Menstrual-Health-Tracker.git
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and commit:
git commit -m 'Add: amazing new feature' - Push to your fork:
git push origin feature/amazing-feature
- Open a Pull Request
- Read CONTRIBUTING.md before starting
- Follow the Code of Conduct
- Write clear, descriptive commit messages
- Add tests for new features
- Update documentation as needed
- Run linters before committing
- π Bug Fixes: Report or fix bugs
- β¨ Features: Implement new features
- π Documentation: Improve docs
- π¨ UI/UX: Enhance design
- π§ͺ Testing: Add test coverage
- π Internationalization: Add translations
- βΏ Accessibility: Improve a11y
This project is licensed under the MIT License - see the LICENSE file for details.
MIT License
Copyright (c) 2026 Amanjeet
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
- React - UI framework
- Vite - Build tool
- Express.js - Backend framework
- MongoDB - Database
- Mongoose - ODM
- JWT - Authentication
- Font Awesome - Icons
- The menstrual health tracking community
- Healthcare professionals providing guidance
- Open source contributors worldwide
- All contributors who have helped shape this project
- Beta testers providing valuable feedback
- The React and Node.js communities
- π« Email: amancrafts@example.com
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- β Star this repo if you find it helpful!
- π Watch for updates and new features
- π΄ Fork to create your own version
- Multi-language support (i18n)
- Data export (PDF, CSV formats)
- Medication reminders and tracking
- Partner sharing features
- Doctor appointment integration
- Dark mode theme
- Mobile apps (iOS & Android)
- AI-powered health insights
- Community forums for support
- Wearable device integration
- Mobile calendar swipe gestures need improvement
- Chart responsiveness on very small screens
- Test mode data persistence across sessions
See Issues for detailed tracking.
If this project helped you, consider giving it a β
Report Bug β’ Request Feature β’ Documentation