Calorie Tracker Pro is an AI-powered web application that analyzes food images to estimate calories and macronutrients (protein, carbs, fats). It combines a modern glassmorphic UI with computer vision and LLM-based reasoning to deliver an interactive, user-friendly nutrition tracking experience.
Tracking calories manually is time-consuming and error-prone. Calorie Tracker Pro simplifies this by allowing users to upload or capture a food image, automatically identify food items, and receive a nutritional breakdown with visual insights.
The app is fully frontend-based, lightweight, and deployable for free using static hosting platforms.
- 📸 Image Upload & Camera Capture (Web Camera API)
- 🤖 AI-based Food Analysis using Groq Vision (LLaMA models)
- 🔥 Calorie & Macronutrient Estimation per food item
- 📊 Interactive Charts (Pie / Doughnut / Bar) with Chart.js
- 🕘 Analysis History Tracking (LocalStorage)
- 📁 CSV Export for calorie history
- 🎨 Dark / Light Theme Toggle
- ⚙️ Customizable Settings Panel
- 🧊 Glassmorphic UI with Tailwind CSS
- HTML5
- Tailwind CSS
- Vanilla JavaScript (ES Modules)
- Groq API (LLaMA Vision Models)
- ImgBB API (Temporary Image Hosting)
- Chart.js
- Firebase Analytics
- Browser LocalStorage (History Persistence)
User
│
▼
Browser (UI)
│
├─ Image Upload / Camera Capture
│
▼
ImgBB Image Hosting
│
▼
Groq Vision API (LLaMA)
│
▼
JSON Nutrient Response
│
▼
Charts + History + CSV Export
UI Components
├── Image Input (Upload / Camera)
├── Preview Module
├── Analyze Button
├── Result Cards
├── Chart Modal
├── History Panel
└── Settings Modal
- User uploads or captures a food image
- Image is uploaded to ImgBB
- Image URL is sent to Groq Vision API
- LLM returns structured nutrition JSON
- App renders:
- Food cards
- Nutrient charts
- History entries
- Data is stored in LocalStorage
- User can export data as CSV
- Pie / Doughnut / Bar charts
- Dynamic theme-aware rendering
- Interactive modal-based breakdown
- API keys are exposed in the frontend (for demo purposes only)
- For production:
- Use a backend proxy
- Store keys securely in environment variables
# Clone repository
git clone https://github.com/your-username/calorie-tracker-pro.git
# Open index.html directly in browserNo build tools or servers required.
calorie-tracker-pro/
├── index.html
└── README.md
- Backend proxy for secure API usage
- User authentication
- Daily calorie goals & progress tracking
- Food database integration
- Mobile PWA support
- Improved food recognition accuracy
This tool provides approximate nutritional estimates using AI models and should not replace professional dietary advice.
If you find this project useful:
- ⭐ Star the repository
- 🍴 Fork it
- 🧠 Contribute improvements
Ayan Chattopadhyay
Built as a modern frontend + AI demo project showcasing computer vision, UI/UX, and API integration.