Bite is an AI-powered food scanning application designed specifically for Singapore and Asian food products. Unlike existing Western-focused nutrition apps, Bite analyzes local packaged foods using ingredient-level understanding aligned with Health Promotion Board (HPB) dietary guidance.
The MVP validates the core pipeline:
- Barcode scanning
- Ingredient label OCR
- Ingredient understanding
- Health risk flagging
- Self-improving product database
This repository contains both the backend (AI + API) and a React Native frontend (Expo) for end-to-end demonstration.
- Scan or manually enter food barcodes
- Retrieve product information from a Singapore-focused database
- Handle unknown products by creating pending entries
- Capture ingredient labels via camera or photo upload
- OCR extracts raw ingredient text
- Designed for real-world packaging (varied fonts, lighting, layouts)
-
Normalizes ingredient text into structured components
-
Flags potential health risks based on ingredient cues:
- Added sugars
- High sodium indicators
- Saturated fat sources
- Additives and allergens
-
Produces non-medical, explainable health guidance
- Products not found via barcode can be enriched using label scans
- Each scan improves coverage and accuracy over time
- Enables network effects as usage grows
Mobile App (React Native / Expo)
↓
Flask REST API (Backend)
↓
OCR (EasyOCR) + Ingredient Parsing
↓
Health Scoring Engine (HPB-aligned rules)
↓
SQLite Product & Ingredient Database
Bite/
├── backend/
│ ├── app.py # Flask API server
│ ├── db.py # SQLite database logic
│ ├── scoring.py # Ingredient normalization & health scoring
│ ├── ocr.py # OCR pipeline
│ ├── seed.py # Seed database script
│ ├── requirements.txt
│ └── data/
│ └── products_seed.csv
│
├── frontend/
│ ├── App.tsx # React Native Expo app
│ ├── src/
│ │ ├── api.ts
│ │ └── config.ts
│ └── package.json
│
└── README.md
- Python 3.9+
pip- Virtual environment recommended
cd backend
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txtpython seed.pyThis seeds the database with a small set of Singapore/Asian products for demo purposes.
python app.pyBackend runs at:
http://localhost:5000
- Node.js 18+
- Expo CLI
- Expo Go app (iOS / Android)
cd frontend
npm installEdit src/config.ts:
export const API_BASE = "http://<YOUR_LAPTOP_IP>:5000";Note:
localhostdoes not work on physical mobile devices. Use your computer’s local IP (same Wi-Fi network).
npx expo startScan the QR code using Expo Go.
- Open the app
- Scan a barcode using the camera
- If product exists → view health analysis
- If product is new → prompted to upload ingredient label
- Take or upload a photo of the ingredient list
- OCR extracts ingredients
- App displays health risk flags
- Product is saved and enriched in the database
Bite provides ingredient-based health guidance, not medical advice.
- No calorie counting or diagnosis
- No disease-specific recommendations
- Designed for awareness and informed choices
Users should always consult packaging labels and healthcare professionals when needed.
-
OCR pipeline optimized for noisy, real-world images
-
Rule-based ingredient interpretation (ML-ready)
-
Clear upgrade path to:
- YOLO-based ingredient panel detection
- Multilingual OCR (Chinese/English)
- Personalized dietary profiles
- YOLO-powered ingredient region detection
- Expanded Singapore supermarket coverage
- FairPrice product data integration
- Premium features (personalized goals, history)
- Corporate wellness pilots