DEV Community

Ishaan
Ishaan

Posted on

Shop Rate Bot: a one-page shop FAQ bot

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

What I Built

Shop Rate Bot: a one-page shop FAQ bot. A shopkeeper sets a small rate card (atta, rice, milk, chai, sugar, eggs); customers ask "rice price?" or "open?" and get an instant answer. A status dot shows whether the answer came from the local model (green, Gemma via Ollama) or the built-in stub (grey).

Someone would pay for this: a neighbourhood kirana that fields the same rate/hours questions all day. No app to install, no per-query bill, answers in seconds.

Demo

  • Live: https://shop-rate-bot.onrender.com/
  • Try: "rice price?", "open?", "chai price?"
  • Note: Render free tier serves the deterministic stub (no Ollama there, no per-token budget). Run ollama run gemma3n:e2b locally and the same questions get warmer Gemma-written answers, dot flips green.

Code

https://github.com/ishaan-jindal/shop-rate-bot

FastAPI + one HTML page, no DB, no auth. MIT licensed.

How I Built It

src/brain.py tries Ollama first ($OLLAMA_HOST, $GEMMA_MODEL, default gemma4:e2b) with a strict short-JSON prompt grounded in the rate card, and falls back to a keyword stub on any failure — the endpoint never 500s and the app boots with zero keys. src/app.py exposes /health, /api/ask, /api/status. The page is 15 lines of inline JS. Docker image deploys to Render free tier with /health as the healthcheck.

Why Does Open Innovation Matter?

Two reasons this only works open. First, cost: a closed per-token API makes a Rs 499/month price for a kirana impossible; a local Gemma costs nothing per query. Second, privacy and offline: rate questions and customer patterns never leave the shop laptop, and the stub keeps answering with the Wi-Fi off. Open-weight models turn a shop laptop into the whole backend.

Prize Categories

Best Use of Render, Best Use of Gemma

Top comments (0)