🎯 Open-source, self-hosted fitness tracking with streak-based motivation
This project was created using modern AI-powered development tools, demonstrating the power of human-AI collaboration in software development:
- ⚡ Live Coding Sessions: Built live using AI pair programming and systematic debugging
- 🧠 Claude (Anthropic): Primary AI assistant for architecture, code generation, documentation, and problem-solving
- 👨💻 GitHub Copilot: Code completion and intelligent suggestions
- 🏗️ Human Expertise: AECO/BIM industry knowledge and project direction by The BIMsider
Why this matters: This showcases how AI tools can help domain experts (like AECO professionals) create sophisticated web applications without traditional programming backgrounds, while maintaining high code quality and best practices through systematic debugging and iterative development.
Sometimes when you're trying to lose weight or be more active, you need accountability. But accountability means different things to different people. For some, it's just tracking numbers. For others - like me - you need an incentive, a motive, a real reason for doing something.
Back in the 2000s when The Biggest Loser was popular, friends would get together for weight loss competitions. There'd be something on the line - $50, a night out, bragging rights - and the winner would take it all. That external motivation helped people actually track their stats, log their weights, and do the work.
But here's the thing: Not everyone is motivated by money or new clothes or the same rewards. Every person's fitness journey is different.
That's why BribeYourselfFit was born - a fitness tracker that lets you set your own rewards, your own "bribes" for hitting your goals. Whether it's a cheat meal after a 7-day streak, new workout gear at 30 days, or a weekend getaway at 100 days - you decide what motivates you.
BribeYourselfFit combines simple daily tracking with powerful motivation:
- Weight: Log weekly (because daily fluctuations are noise)
- Steps: Your daily movement goal
- Exercise: Minutes + type (cardio, strength, yoga, etc.)
- Water: Hydration tracking
- Wellness Score: 5-point daily checklist:
- ✅ Avoided sugary drinks
- ✅ 5+ servings fruits & vegetables
- ✅ Practiced portion control
- ✅ No eating after 8 PM
- ✅ 7+ hours of sleep
- Individual streaks for each goal (steps, exercise, water, wellness)
- Overall streak when you hit ALL daily goals
- Visual progress with streak calendars and charts
- Built-in milestones at 7, 14, 30, 50, 100+ days
The magic happens in the rewards system. Set your own "bribes":
- 7-day streak: Favorite cheat meal
- 14-day streak: New workout playlist
- 30-day streak: New athletic shoes
- 50-day streak: Massage or spa day
- 100-day streak: Weekend vacation
You know what motivates you. The app just helps you stay accountable to your own system.
(localStorage version shown)

- Fork this repository to your GitHub account
- Choose your storage (see backend options below)
- Enable GitHub Pages in repository settings
- Open your app and start your first streak!
- Download your preferred version
- Open
index.html
in any web browser - Set your goals and rewards
- Log your first day!
- Set your profile: Starting weight, goal weight, daily targets
- Choose your rewards: What will you "bribe" yourself with?
- Log today: Hit those daily goals and start your streak
- Check back tomorrow: The streak magic begins with day 2
BribeYourselfFit offers multiple storage options to fit your needs:
Version | Storage | Setup | Best For | Branch | Status |
---|---|---|---|---|---|
🏠 localStorage | Browser only | None | Simple setup, offline use | main |
✅ v1.1 Ready |
🌐 JSONBin.io | Cloud API | API key | Cross-device sync, simple cloud | jsonbin-version |
✅ v1.1 Ready |
📊 Airtable | Structured DB | API setup | Rich data features, sharing | airtable-version |
✅ v1.1 Ready |
🔥 Firebase | Real-time DB | Project setup | Enterprise scale, real-time sync | firebase-version |
✅ v1.1 Ready |
- Daily Logging: Weight (weekly), steps, exercise minutes, water intake
- Exercise Types: Multi-select from cardio, strength, yoga, sports, walking, cycling, swimming, other
- Food & Wellness Score: 5-point daily checklist system
- ✅ Avoided sugary drinks
- ✅ 5+ servings fruits & vegetables
- ✅ Practiced portion control
- ✅ No eating after 8 PM
- ✅ 7+ hours of sleep
- Streak Tracking: Individual streaks for each goal + overall streak
- Achievement System: Default milestones + claimable custom rewards
- Progress Visualization: Weight trends, activity charts, streak calendar
- Milestone Celebrations: 7, 14, 30, 50, 100+ day streaks
- Weight Loss Rewards: Every 10 lbs + bonus at 25 & 50 lb marks
- Interactive Charts: Weight trends with goal projection and unit conversion
- Activity Summaries: Daily metrics with 7/30/all-time views
- Streak Calendar: Monthly heatmap showing completion status
- Data Export: Full JSON backup and restore capabilities
- Progressive Web App: Install like a native app
- Responsive Design: Works perfectly on phone, tablet, desktop
- Offline Capable: localStorage version works without internet
- Touch Optimized: 44px touch targets, mobile-friendly forms
- App Preferences: Theme selection, units (Imperial/Metric) with real-time conversion, date formats
- Goal Management: Modify daily targets and weight goals without losing streak history
- Data Management: Complete backup/restore system with import/export
- Wellness Customization: View wellness checklist details and customize goal thresholds
- Streak Management: Reset options with granular control (streaks only, logs only, etc.)
- Processing Indicators: Real-time feedback during operations (saving, loading charts, exports)
- Smart Form Handling: Auto-load today's data, weight unit conversion in all inputs
- Error Recovery: Graceful handling of network issues and data validation
- Accessibility: Enhanced keyboard navigation, screen reader support, focus indicators
- 🌓 Dark/Light mode toggle with system preference detection
- ♿ Accessible design with keyboard navigation and screen reader support
- 🎨 Modern styling with smooth animations and micro-interactions
- 📱 Mobile-first responsive layout
- Dashboard: Daily logging and streak overview with real-time processing feedback
- Progress: Charts and analytics with weight unit conversion
- Rewards: Achievements and milestone management with custom reward claiming
- Settings: Comprehensive preferences and data management (v1.1)
- Processing Indicators: ⏳ "Saving daily log..." → ✅ "Complete!"
- Real-time Validation: Instant feedback on form inputs with unusual value confirmation
- Progressive Loading: Charts and data load with visual progress indicators
- Error Recovery: Clear error messages with suggested solutions
- Frontend: Vanilla HTML, CSS, JavaScript (no frameworks!)
- Charts: Custom Canvas-based visualization with unit conversion
- Storage: Multiple backend options (see versions above)
- PWA: Service Worker + Web App Manifest
- ✅ Loads in <3 seconds on mobile
- ✅ Handles 2+ years of daily data efficiently
- ✅ Mobile performance: 86/100 Lighthouse score
- ✅ Accessibility: Enhanced keyboard navigation and focus indicators
- ✅ Smooth operations: Processing indicators prevent user confusion during longer tasks
- 📝 Well-documented: Comprehensive comments for beginners
- 🏗️ Modular architecture: Clean ES6 class-based structure
- 🧪 Production-ready: Error handling and data validation
- 📦 2,500+ lines of clean, maintainable code (updated for v1.1)
✅ No setup required!
- Data stored in browser only
- Works offline
- Perfect for getting started
- New in v1.1: Advanced settings, goal management, data import/export, processing indicators
🌐 JSONBin.io Cloud v1.1 (Readme)
git checkout jsonbin-version
- Get free API key from jsonbin.io
- Enter API key during app setup
- Data syncs across devices automatically
📊 Airtable Database v1.1 (Readme)
git checkout airtable-version
- Create Airtable base with provided template
- Get Personal Access Token and base ID
- Enjoy structured database with:
- 5 fully functional tables (Users, Daily Logs, Settings, Custom Rewards, Achievements)
- Weight unit conversion (lbs ↔ kg) with real-time UI updates
- Custom reward claiming with milestone integration
- Real-time database sync across all tables
- Enterprise-level field validation and error handling
🔥 Firebase Real-time v1.1 (Readme)
git checkout firebase-version
- Create Firebase project
- Enable Realtime Database with test rules
- Get API Key and Database URL
- Enjoy real-time synchronization with:
- Instant sync across all devices and browser tabs
- Real-time updates without page refresh
- Offline persistence with automatic sync when reconnected
- Enterprise-grade infrastructure with Google's security
- Complete weight unit conversion (lbs ↔ kg) with instant updates
- Live custom rewards integration with real-time milestone claiming
- 👤 Personal fitness tracking with complete data ownership
- 🎓 Learning web development with real-world project
- 🏠 Self-hosted solutions without dependency on fitness apps
- 🔧 Customization - modify goals, rewards, and features
- 👨💻 Developers wanting to understand PWA and data storage patterns
- 📊 Database enthusiasts who want structured fitness data (Airtable version)
- 🔥 Real-time enthusiasts who want instant sync across devices (Firebase version)
- Individuals who want to own their fitness data
- People learning web development
- Users preferring open-source, self-hosted solutions
- Anyone wanting a simple, customizable fitness tracker
- Teams/families wanting to share fitness data (Airtable/Firebase versions)
- Tech enthusiasts wanting real-time synchronization (Firebase version)
# Clone repository
git clone https://github.com/TheBIMsider/BYF.git
cd BYF
# Choose your branch
git checkout main # localStorage v1.1
git checkout jsonbin-version # JSONBin.io v1.1
git checkout airtable-version # Airtable v1.1
git checkout firebase-version # Firebase v1.1
# Open in browser
open index.html
BYF/
├── index.html # Main app structure
├── styles.css # Complete styling with themes
├── script.js # Core application logic (2,500+ lines)
├── manifest.json # PWA manifest
├── sw.js # Service Worker for PWA
├── README.md # This file
- Fork the repository
- Create feature branch (
git checkout -b feature/amazing-feature
) - Commit changes (
git commit -m 'Add amazing feature'
) - Push to branch (
git push origin feature/amazing-feature
) - Open Pull Request
// User Profile
{
startingWeight: 180,
goalWeight: 160,
dailySteps: 8000,
dailyExercise: 30,
dailyWater: 2
}
// Daily Log Entry
{
date: "2025-07-30",
weight: 175,
steps: 8500,
exerciseMinutes: 45,
exerciseTypes: ["cardio", "strength"],
water: 2.5,
wellnessScore: 4,
wellnessItems: ["sugary-drinks", "fruits-vegetables", "portion-control", "sleep"]
}
// Streak Tracking
{
overall: 15, // All goals met
steps: 20, // Individual streaks
exercise: 18,
water: 22,
wellness: 16
}
// Settings (v1.1)
{
themePreference: "system",
weightUnit: "lbs", // Real-time conversion support
dateFormat: "US",
weekStart: "sunday",
allowPartialSteps: false,
allowPartialExercise: false,
strictWellness: false
}
// Custom Rewards (with claiming integration)
{
type: "weight",
description: "New workout shoes",
weightLoss: 10,
claimed: false,
createdDate: "2025-07-30"
}
- ✅ You own your data - stored in your chosen backend
- ✅ No tracking - zero analytics or user monitoring
- ✅ Open source - audit the code yourself
- ✅ Self-hosted - deploy on your own infrastructure
- localStorage: Data stays in your browser only - ultimate privacy
- JSONBin.io: API keys stored locally, HTTPS encryption
- Airtable: Personal Access Tokens with granular permissions, enterprise-grade security
- Firebase: Google's enterprise security infrastructure with real-time encryption
Browser | Version | Status |
---|---|---|
Chrome | 80+ | ✅ Full support |
Firefox | 75+ | ✅ Full support |
Safari | 13+ | ✅ Full support |
Edge | 80+ | ✅ Full support |
iOS Safari | 13+ | ✅ PWA installable |
Chrome Mobile | 80+ | ✅ PWA installable |
- localStorage advanced features (v1.1)
- JSONBin.io cloud storage (v1.1)
- Airtable structured database (v1.1)
- Firebase real-time sync (v1.1) ✅ NEW
- Custom wellness checklists
- Social sharing capabilities
- Advanced analytics dashboard
- Nutrition tracking integration
- Workout routine templates
- Firebase Authentication for secure user accounts
- Push notifications for fitness reminders
- React Native mobile app
- Apple Watch companion
- Android Wear support
- 📖 Branch READMEs: Each version has detailed setup instructions
- 🏠 localStorage v1.1: Setup Guide - No setup required!
- 🌐 JSONBin v1.1: Setup Guide
- 📊 Airtable v1.1: Setup Guide
- 🔥 Firebase v1.1: Setup Guide ✅ NEW
- 🐛 Bug Reports: Create GitHub Issue
- Check the README for your specific branch
- Search existing GitHub issues
- Create new issue with:
- Branch/version you're using
- Browser and version
- Steps to reproduce the problem
- Screenshots if applicable
BSD-3-Clause License - see LICENSE file for details.
TL;DR: You can use, modify, and distribute this freely. Just keep the license notice.
- Fitness tracking community for feature inspiration
- Open source contributors for best practices
- Web development community for modern standards
- Beta testers for real-world feedback
- AI development tools for enabling rapid iteration and systematic debugging
- Firebase & Google Cloud for providing enterprise-grade real-time infrastructure
If BribeYourselfFit helps you on your fitness journey, please star this repository to help others discover it!
- ⭐ Star this repository to bookmark it
- 🍴 Fork it to your GitHub account
- 🌿 Choose your branch based on storage needs:
- Simple start:
main
(localStorage v1.1) - Cloud sync:
jsonbin-version
(JSONBin v1.1) - Database power:
airtable-version
(Airtable v1.1) - Real-time sync:
firebase-version
(Firebase v1.1) ✅ NEW
- Simple start:
- 🚀 Deploy to GitHub Pages or run locally
- 💪 Start tracking and building streaks!
- ✅ Processing indicators with real-time operation feedback
- ✅ Complete weight unit conversion (lbs ↔ kg) throughout entire app
- ✅ Smart form handling with auto-loading and validation
- ✅ Enhanced error recovery with graceful degradation
- ✅ Improved accessibility and mobile experience
- ✅ Real-time synchronization across all devices and browser tabs
- ✅ Complete weight unit conversion (lbs ↔ kg) with instant updates
- ✅ Full custom rewards integration with live claiming
- ✅ Enterprise-grade Firebase infrastructure with Google's security
- ✅ Offline persistence with automatic sync when reconnected
- ✅ Production-ready with comprehensive error handling
- ✅ localStorage v1.1: Enhanced settings, offline functionality, and processing indicators
- ✅ JSONBin v1.1: Simple cloud sync with JSON storage
- ✅ Airtable v1.1: Structured database with 5 tables and enterprise features
- ✅ Firebase v1.1: Real-time sync with Google's infrastructure ✅ NEW
Questions? Problems? Success stories?
We'd love to hear from you! Create an issue.
localStorage v1.1 - Enhanced settings, enhanced UX, processing indicators and your data stays in your browser only - ultimate privacy
Made with ❤️ & 🤖 assistance for the fitness and open-source communities