Skip to content

devv04/BiteWise

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BiteWise Logo

BiteWise

AI-Powered Food Health Analyzer
Snap a photo of your food → get instant health insights, nutrient breakdown, and smarter alternatives.


What It Does

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

Tech Stack

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

Quick Start

Prerequisites

  • Python ≥ 3.8
  • Node.js ≥ 18
  • Gemini API Key — get one free at Google AI Studio

1. Clone

git clone https://github.com/devv04/BiteWise.git
cd BiteWise

2. Backend Setup

cd 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.py

Backend runs at http://localhost:5001

3. Frontend Setup

cd bitewise_frontend/foodscan

# Install dependencies
npm install

# Start dev server
npm run dev

Frontend runs at http://localhost:3000

API Endpoints

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

Project Structure

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

Running Tests

cd bitewise_backend
.\venv\Scripts\python.exe -m pytest test_server.py -v

Contributing

  1. Fork the repo
  2. Create a feature branch (git checkout -b feature/your-feature)
  3. Commit your changes (git commit -m "Add your feature")
  4. Push (git push origin feature/your-feature)
  5. Open a Pull Request

License

This project is open source and available under the MIT License.

Contact

Devdevg55030@gmail.com

Got issues or ideas? Open an issue

About

A smart food monitoring app which detects your food's image and tells you if it's healthy or unhealthy. Thus forces you to opt for better food choices

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors