A modern web application that uses AI to analyze food through images and text descriptions, providing accurate calorie and nutritional information.
The app can analyze food images and provide detailed nutritional information:
-
📸 Image-Based Food Analysis
- Take photos directly or upload from gallery
- AI-powered food recognition
- Accurate calorie estimation based on USDA database
-
🎙️ Voice/Text Food Logging
- Natural language food description
- Voice input with real-time transcription
- Continuous voice mode for hands-free logging
-
🔍 Nutritional Analysis
- Detailed calorie breakdown
- Macronutrient information (protein, carbs, fat)
- Portion size estimation
- Evidence-based calculations using USDA standards
-
📱 Mobile-Friendly Design
- Responsive interface
- Touch-optimized controls
- Works on all modern devices
- Node.js 18+ installed
- A Gemini API key from Google AI Studio
-
Clone the repository:
git clone [your-repo-url] cd calorie-counter
-
Install dependencies:
npm install
-
Create a
.env.local
file in the root directory:NEXT_PUBLIC_GEMINI_API_KEY=your_api_key_here
Get your API key from Google AI Studio
-
Run the development server:
npm run dev
-
Open http://localhost:3000 in your browser
- Frontend: Next.js 14 with React
- Styling: Tailwind CSS
- AI: Google Gemini API
- UI Components: Headless UI
- Icons: Heroicons
The application works best in modern browsers that support:
- Web Speech API (for voice input)
- Modern CSS features
- JavaScript ES6+
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.