This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady
What I Built
StockSage AI is a smart kitchen waste reducer for restaurants. Running a kitchen means checking stock, spotting what is about to expire, deciding what to cook, and writing shopping lists, every single day. StockSage does that work for you.
You tell it what you have (type it, paste a messy note like "got 5kg tomatoes, 2kg chicken expires tomorrow", or snap a shelf photo), and it:
- Flags expiring and expired ingredients and shows the money lost to waste (Rs)
- Suggests dishes you can cook right now, using the soon-to-expire ingredients first
- Accepts your own menu dishes, so suggestions match what you actually sell
- Builds a supplier-wise shopping list for low-stock items, with cost estimates
- Generates a daily inventory report you can copy or print
- Writes a morning brief with two "use it up" specials when the page opens
The lazy part: nobody types an inventory by hand or plans waste. You open the page and the work is already done.
Demo
Click Load sample data to see the full flow. The AI card talks to Ollama on your own machine, so it only works from the downloaded file.
Code
It is a single stocksage.html file: vanilla JS, no backend, no build step, data in localStorage.
How I Built It
-
Model:
qwen2.5:3b, an open-weight model, run locally with Ollama. The model name is a field in the UI, so any Ollama model can be swapped in. A vision model (likellava) can be set for shelf photos. -
Auto-fill stock: the note or photo is sent to the local model with a prompt asking for a strict JSON array (
name, qty, unit, days_to_expiry). The page parses it and adds the items. If expiry is not mentioned, the model guesses a typical shelf life. - Morning brief: the page builds its own inventory report, sends it to the model, and shows a short brief plus two creative specials.
- Everything else is plain code, not AI: expiry checks, dish matching, shopping lists, and waste cost. They are fast and predictable, so the model only does the typing and the writing.
- Graceful fallback: with no Ollama running, the whole app still works.
I tested it on a modest laptop: 7.7 GB RAM, CPU only, no GPU. A 3B model was enough for this job.
Why Does Open Innovation Matter?
- Private by default. Stock levels, supplier names, and prices are sensitive for a small restaurant. With a local open-weight model, none of it leaves the laptop.
- No per-request bill. A kitchen can run it all day at zero cost.
-
Works without cloud. Everything runs on one laptop at
localhost. - Swappable. The model is one text field. A bigger model, a different family, or a fine-tune on a restaurant's own menu is a one-line change.
A closed API would have meant uploading business data to someone else's server and paying for every note and photo.
Top comments (0)