AI-Powered Food Health Analyzer
Snap a photo of your food → get instant health insights, nutrient breakdown, and smarter alternatives.
BiteWise uses Google Gemini AI to analyze food images and deliver:
- 🏷️ Food Detection — identifies the food item from a photo
- 🟢🟡🔴 Health Score — Healthy / Moderately Healthy / Unhealthy
⚠️ Warnings — high sugar, sodium, saturated fat, processed ingredients- 🧬 Allergen Detection — gluten, dairy, nuts, soy, eggs
- 🩺 Disease Risk Assessment — diabetes, heart disease, obesity links
- 💡 Healthier Alternatives — practical suggestions for better choices
- 📊 Nutrient Breakdown — calories, protein, carbs, fat, fiber
- 🎯 Daily Nutrition Tracker — calorie ring, macro progress bars, food log
| Layer | Technology |
|---|---|
| Frontend | React 18 · Vite · Framer Motion · Axios |
| Backend | Flask · Flask-CORS · Flask-SQLAlchemy |
| AI Engine | Google Gemini 2.5 Flash (with 2.0 Flash fallback) |
| Database | SQLite |
| Styling | Tailwind CSS · Inline health-themed design system |
- Python ≥ 3.8
- Node.js ≥ 18
- Gemini API Key — get one free at Google AI Studio
git clone https://github.com/devv04/BiteWise.git
cd BiteWisecd bitewise_backend
# Create & activate virtual environment
python -m venv venv
venv\Scripts\activate # Windows
# source venv/bin/activate # macOS/Linux
# Install dependencies
pip install -r requirements.txt
# Configure API key
echo GEMINI_API_KEY=your_key_here > .env
# Start server
python server.pyBackend runs at http://localhost:5001
cd bitewise_frontend/foodscan
# Install dependencies
npm install
# Start dev server
npm run devFrontend runs at http://localhost:3000
| Method | Endpoint | Description |
|---|---|---|
GET |
/ |
Health check |
POST |
/analyze |
Analyze a food image (multipart form: image) |
GET |
/history |
Get last 50 scan results |
GET |
/daily-summary |
Today's nutrition totals and food log |
BiteWise/
├── bitewise_backend/
│ ├── server.py # Flask API + Gemini AI integration
│ ├── test_server.py # Pytest test suite
│ ├── requirements.txt # Python dependencies
│ ├── .env # API key (not committed)
│ └── instance/
│ └── bitewise.db # SQLite database (auto-created)
│
├── bitewise_frontend/
│ └── foodscan/
│ ├── src/
│ │ ├── App.jsx # Main application component
│ │ ├── main.jsx # React entry point
│ │ └── index.css # Global styles
│ ├── public/
│ │ └── logo.png # BiteWise logo
│ ├── package.json
│ └── vite.config.js
│
├── .gitignore
└── README.md
cd bitewise_backend
.\venv\Scripts\python.exe -m pytest test_server.py -v- Fork the repo
- Create a feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m "Add your feature") - Push (
git push origin feature/your-feature) - Open a Pull Request
This project is open source and available under the MIT License.
Dev — devg55030@gmail.com
Got issues or ideas? Open an issue →
