GrocerScope is a Django app that scrapes local grocery stores, normalizes a user’s free-text query into a category (via Gemini with a robust fallback), streams live progress to the browser using Server-Sent Events (SSE), and displays the cheapest results with an AI shopping helper and CSV export.
- Zip + free-text search (e.g., “milk”, “frozen pizza”, “veggies”)
- AI category normalization (Gemini 2.5 Flash →
produce | dairy | meat | bakery | frozen | pantry | beverages; with fallback) - Live progress logs via SSE
- Scraping for multiple stores (Star Market, Trader Joe’s)
- Cheapest-first results + CSV export
- Built-in AI Shopping Assistant (quick summaries & tips)
Django · Custom scrapers (Selenium) · Google Gemini (google-generativeai) · SSE · Vanilla JS/CSS
- Python 3.10+
- Chrome/Chromium + matching ChromeDriver (if scrapers use Selenium)
- Google AI Studio Gemini API key
python -m venv .venv
# Windows:
. .venv/Scripts/activate
# macOS/Linux:
source .venv/bin/activateCreate a .env file in the project root:
GEMINI_API_KEY=your_api_key_here
- Run the app
python manage.py migrate
python manage.py runserver