A comprehensive web application that monitors your posture in real-time using TensorFlow.js and provides personalized stretch suggestions powered by Google's Gemini AI.
- Real-time Posture Detection: Uses TensorFlow.js with MoveNet for accurate pose estimation
- AI-Powered Stretch Suggestions: Gemini AI generates personalized exercises based on your posture issues
- Background Monitoring: Continues to work even when you switch browser tabs
- Smart Alerts: Posture and break reminders with customizable intervals
- Professional UI: Modern, clean interface built with React and Tailwind CSS
- Comprehensive Tracking: Monitor screen time, posture scores, and break patterns
🌐 View the application: https://drakewu.github.io/Break_reminder/
- Node.js 18+
- Modern web browser with camera access
- Google Gemini API key (for AI features)
- Clone the repository:
git clone https://github.com/DrakeWu/Break_reminder.git
cd Break_reminder- Install dependencies:
npm install- Set up environment variables:
# Create .env file
echo "VITE_GEMINI_API_KEY=your_api_key_here" > .env- Start development server:
npm run devThe application is automatically deployed to GitHub Pages when you push to the main branch. The workflow is configured in .github/workflows/deploy.yml.
- Build the application:
npm run build- Deploy using the provided script:
chmod +x deploy.sh
./deploy.sh- Gemini API Key: Get your free API key from Google AI Studio
- Add it to your
.envfile:
VITE_GEMINI_API_KEY=your_api_key_here
The application requires camera access for posture detection. Make sure to:
- Allow camera permissions when prompted
- Use a well-lit environment
- Position yourself 2-3 feet from the camera
- Frontend: React 18, TypeScript, Vite
- Styling: Tailwind CSS, Radix UI
- AI/ML: TensorFlow.js, Google Gemini AI
- Pose Detection: MoveNet model
- Deployment: GitHub Pages, GitHub Actions
src/
├── components/ # React components
│ ├── ModernDashboard.tsx
│ ├── PostureAlert.tsx
│ ├── BreakAlert.tsx
│ └── ...
├── services/ # Core services
│ ├── tensorflowPoseService.ts
│ ├── geminiService.ts
│ └── trackingService.ts
├── config/ # Configuration
│ └── apiKeys.ts
└── App.tsx # Main application
- Real-time analysis using TensorFlow.js
- Detects forward head posture, shoulder alignment, head tilt
- Smoothing algorithms for stable readings
- Background monitoring support
- Personalized exercises based on posture issues
- Creative and varied suggestions using Gemini AI
- Unlimited stretch generation
- Deletable exercise history
- Posture alerts for poor posture (score < 3/10)
- Break reminders (configurable intervals)
- Alarm sounds for immediate attention
- Cooldown periods to prevent spam
- Clean, modern design
- Responsive layout
- Professional icons and styling
- Intuitive user experience
- Ensure camera permissions are granted
- Check if another application is using the camera
- Try refreshing the page
- Use a different browser if issues persist
- Verify your Gemini API key is correct
- Check browser console for error messages
- Ensure you have an active internet connection
- Close other applications using the camera
- Ensure good lighting for better pose detection
- Use a modern browser with WebGL support
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -m 'Add feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is open source and available under the MIT License.
If you encounter any issues or have questions:
- Check the troubleshooting section above
- Review the browser console for error messages
- Create an issue on GitHub with detailed information
PostureGuard - Keep your posture healthy with AI-powered monitoring! 🧘♀️💻