A premium, dark-mode calorie tracking PWA built with Python Flask. Track your daily food intake, monitor macros, view history charts, earn achievements, and compete on the leaderboard!
- 🔍 Instant Food Search — 100+ foods (Indian & Western cuisine)
- 📊 Animated Dashboard — Calorie ring, macro bars (protein, carbs, fat, fiber)
- 🎯 Custom Goals — Set and track daily calorie targets
- 📈 History Charts — Weekly & monthly bar charts with goal line
- 🏆 Achievements — Streak tracking & 8 unlockable badges
- 🏅 Leaderboard — Community rankings by streak & consistency
- 📱 PWA — Install on your phone like a real app
- 🌙 Dark Mode — Premium glassmorphic UI
- 💾 Offline Ready — Data persists in localStorage
# Clone the repo
git clone https://github.com/YOUR_USERNAME/SnapCal.git
cd SnapCal
# Install dependencies
pip install -r requirements.txt
# Run the app
python app.pyOpen http://localhost:5000 in your browser.
- Open in Chrome on your phone
- Tap ⋮ menu → "Install app" or "Add to Home Screen"
- Enjoy SnapCal as a standalone app!
- Backend: Python, Flask
- Frontend: HTML5, CSS3, JavaScript (Vanilla)
- Storage: localStorage (no database needed)
- PWA: Service Worker + Web App Manifest
SnapCal/
├── app.py # Flask server & API routes
├── food_data.py # Nutrition database (100+ foods)
├── requirements.txt # Python dependencies
├── templates/
│ └── index.html # Main page with PWA tags
└── static/
├── manifest.json # PWA manifest
├── sw.js # Service worker
├── icons/ # App icons
├── css/style.css # Premium dark UI
└── js/app.js # Frontend logic + charts
MIT License — feel free to use and modify!