A comprehensive web application for planning and tracking your complete daily nutrition with a focus on Indian foods. This enhanced version includes advanced features like food image recognition, barcode scanning, and integration with free nutrition APIs, plus a comprehensive Indian foods database.
- Complete Meal Planning: Plan breakfast, lunch, dinner, and snacks
- Real-time Nutrition Tracking: Track calories, protein, carbs, and fats
- Daily Goals Management: Set and monitor nutrition targets
- Progress Visualization: Visual progress bars and nutrition summaries
- USDA Food Database API: Search from a comprehensive food database with excellent Indian food coverage (no API key required)
- Indian Foods Database: Comprehensive local database of Indian dishes, snacks, and traditional foods
- Image Capture & Recognition: Take photos of food for automatic recognition
- Barcode Scanning: Scan product barcodes for quick food lookup using USDA and Open Food Facts databases
- Manual Barcode Entry: Enter barcode numbers manually
- Smart Search: Debounced search with loading states and error handling
- Responsive Design: Works on desktop, tablet, and mobile devices
- Modern UI: Clean, intuitive interface with smooth animations
- Real-time Updates: Instant nutrition calculations and progress tracking
- Data Persistence: Save meal plans locally in your browser
- Export Functionality: Download meal plans as JSON files
- Preset Goals: Quick setup for weight loss, maintenance, muscle gain, and athletic performance
- Meal Breakdown: Visual breakdown of calories by meal
- Keyboard Shortcuts: Quick actions with keyboard commands
- Error Handling: Comprehensive error messages and fallback options
- Modern web browser with camera access (for image capture)
- Internet connection (for food database API)
- Clone or download the repository
- Open
index.htmlin your web browser - Allow camera permissions when prompted (for image capture feature)
- Click "Add Food Item" in any meal section
- Use one of these methods:
- Search: Type food name and select from results
- Camera: Click camera icon to capture food image
- Barcode: Click barcode icon to scan product barcode
- Adjust portion size and unit
- Click "Add Food" to add to your meal
- Navigate to "Daily Goals" tab
- Choose a preset or set custom values
- Click "Save Goals" to apply
- Save Plan: Stores current meal plan in browser
- Export: Downloads meal plan as JSON file
- Clear All: Removes all foods from all meals
- USDA Food Database API: Free, no authentication required
- Provides comprehensive nutrition data with excellent Indian food coverage
- Includes Foundation and SR Legacy datasets
- Automatic data transformation for app compatibility
- Barcode lookup support for quick product identification
- Open Food Facts API: Free fallback for international products
- Provides global nutrition data for packaged products
- Used as secondary source for barcode scanning
- Indian Foods Database: Local comprehensive database
- 48+ traditional Indian dishes and foods
- Includes rice dishes, curries, breads, snacks, and desserts
- Accurate nutrition information for Indian cuisine
- Simulated Recognition: Currently shows common foods for demonstration
- Extensible: Ready for integration with real AI services
- Error Handling: Graceful fallback to manual search
- Modern Browsers: Chrome, Firefox, Safari, Edge
- Mobile Support: iOS Safari, Chrome Mobile
- Camera Access: Required for image capture feature
To integrate with a real food recognition API:
- Sign up for a free API service (e.g., Imagga, Clarifai)
- Replace the simulated recognition in
recognizeFoodFromImage()method - Update API keys in the constants section
- Modify
styles.cssfor custom appearance - Uses CSS Grid and Flexbox for responsive layout
- Custom CSS variables for easy theming
{
id: "unique_id",
name: "Food Name",
portion: 100,
unit: "g",
calories: 150,
protein: 10,
carbs: 20,
fats: 5
}{
calories: 2000,
protein: 150,
carbs: 250,
fats: 67
}- Local Storage: All data stored locally in your browser
- No Server: No data sent to external servers (except food database API)
- Camera Access: Only used for image capture, not stored or transmitted
Camera not working:
- Ensure browser has camera permissions
- Try refreshing the page
- Check if camera is being used by another application
Food search not working:
- Check internet connection
- Try different search terms
- USDA API may have temporary issues
- Try searching for specific Indian food names (e.g., "dal", "roti", "biryani")
Data not saving:
- Ensure browser supports localStorage
- Check if private/incognito mode is enabled
- Chrome: Full support
- Firefox: Full support
- Safari: Full support (iOS 11+)
- Edge: Full support
- Fork the repository
- Create a feature branch
- Make your changes
- Test thoroughly
- Submit a pull request
This project is open source and available under the MIT License.
- USDA Food Database for providing comprehensive nutrition data
- Open Food Facts for providing global nutrition data
- Font Awesome for icons
- Google Fonts for typography
- Quagga.js for barcode scanning functionality
Note: This application is for educational and personal use. Always consult with healthcare professionals for dietary advice.