🛒 BazaarIQ
Smart Grocery Expense Tracker with OCR & Price Alerts
BazaarIQ is a Progressive Web App (PWA) that helps families track grocery expenses, compare prices over time, and save money using OCR-powered bill scanning, manual entry, and intelligent price-drop alerts.
✨ Key Features 📸 Bill Scanning (OCR)
Scan printed grocery bills (Blinkit, D-Mart, Zepto, BigBasket, etc.)
Automatically extracts:
Item name
Quantity
Unit
Price
Shows extracted data for review & editing before saving
✍️ Handwritten Bills
Detects handwritten bills
Switches to manual review mode (no hallucinated data)
Optimized fast manual entry UX
⚡ Hyper-Fast Manual Entry
One-tap “Add Item”
Auto-focus on item name
Enter-key support → Save & add next
Remembers last used unit
Designed for speed (<10 seconds for 3 items)
🔔 Price Drop Alerts
Smart normalized price comparison
Alerts when price drops compared to last purchase
Works across different units (g vs kg, ml vs L)
Real-time alerts via notification bell
🌐 Multi-Language Support
Full English 🇬🇧 / Hindi 🇮🇳 support
Language persists across:
Login / Signup
Install prompt
Entire app UI
Toggle anytime from settings
👨👩👧 Family Expense Tracking
Shared family dashboard
Track who added what
Combined insights for all members
📊 Insights & Analytics
Cheapest prices
Monthly / weekly spend
Category-wise breakdown
Shop-wise comparison
📱 Progressive Web App (PWA)
Installable on mobile & desktop
Works offline (syncs later)
Fast and lightweight
🧠 Tech Stack Frontend
Next.js (App Router)
React + TypeScript
Tailwind CSS
shadcn/ui
PWA support
Backend
Next.js API Routes
MongoDB + Mongoose
Session-based auth
OCR & AI
Tesseract.js (OCR)
Google Gemini 1.5 Flash (structured extraction fallback)
Hybrid heuristic + AI pipeline for accuracy
🏗️ OCR Pipeline (High Level)
Image preprocessing (grayscale + contrast)
OCR text extraction (Tesseract)
Bill type detection:
Printed
Handwritten
Line filtering (remove totals, GST, metadata)
Deterministic parsing (vendor-aware)
LLM fallback (only if needed)
User review & manual correction
🚀 Getting Started 1️⃣ Clone the repo git clone https://github.com/amisha002/BazaarIQ.git cd BazaarIQ
2️⃣ Install dependencies npm install
3️⃣ Environment Variables
Create .env.local:
MONGODB_URI=your_mongodb_uri GEMINI_API_KEY=your_gemini_api_key
4️⃣ Run locally npm run dev
App runs at: 👉 https://bazaar-iq.vercel.app/
🧪 Testing Checklist
✅ Printed bill → items auto-extracted
✅ Handwritten bill → manual mode
✅ Price drop alert triggers correctly
✅ Hindi/English toggle works everywhere
✅ Manual entry is fast & smooth
✅ GitHub build passes (npm run build)
📌 Roadmap
🔄 Improve handwritten OCR accuracy
📷 Real-time camera crop assist
📤 Export to Excel / PDF
🔔 Push notifications
🧾 Store-wise historical charts
🙌 Author
Amisha Student • Full-stack Developer Building real-life problem solving products 🚀