This is a submission for the Hacktoberfest Weekend Challenge: Build for a Friend
What I Built
A friend needs help while shopping at a supermarket: compare prices, understand how a kitchen or household item should be used, and weigh its advantages against the maintenance it brings home.
I built Shelf Friend, a small Chinese-language web app with two connected decisions: what costs less per usable unit, and what fits the intended use? My friend stays anonymous. I have not yet collected their feedback, so the results below are my implementation checks, not a claimed user study.
The calculator takes prices from the shelf, net quantity and pack count. The AI retrieves a relevant use guide or buying checklist from a small, visible corpus. A cheaper pan may still be a poor purchase if its weight, stove compatibility or care routine does not fit the person buying it.
Demo
Open the live demo — no account or API key needed.
Try this short walkthrough:
- Click 试试演示价格 (“Try demo prices”). The fictional rice offers are 2 kg for 2.50 OMR and 500 g for 0.75 OMR. They become 1.25 and 1.50 OMR/kg; the first is 16.7% cheaper per kg. These are demonstration prices, not retailer quotes.
- Click 铸铁锅保养 (“Cast-iron care”). The browser downloads the model on first use, then retrieves a guide scoped to Lodge's seasoned cast iron, with a source link and a maintenance tradeoff.
- Try 保鲜盒怎么用 (“Food-container use”) or ask in English, “How should I clean and oil a cast iron skillet?” The interface and guides are Chinese, but query matching is multilingual.
Code
Public repository · MIT application code and original checklists.
I started this project and its repository on October 2, 2026, inside the weekend challenge window. It is separate from my weekly challenge work and uses no employer resources.
How I Built It
The AI core is Transformers.js running the quantized ONNX conversion of the open-weight multilingual MiniLM model. A web worker embeds the question and the guide descriptions, then ranks them by cosine similarity. This is model inference, not a keyword lookup. The app displays only the highest-ranking guide above its threshold, or says the corpus has no sufficiently relevant content. Similarity is labelled as similarity, not a probability or factual-accuracy score.
The eight-guide corpus covers cookware, pantry packaging, cleaners, food containers, small appliances, tissue multipacks and batteries. Most entries are my original buying checklists. The cast-iron entry is a concise, linked summary of Lodge's care instructions, with its scope explicit. Unknown product specifications are left unknown.
Price arithmetic is deterministic JavaScript. It normalizes grams/kilograms and millilitres/litres, accounts for multipacks, and rejects comparisons between mass, volume and count. The model never calculates the winning price.
In Edge, I checked Chinese cast-iron, bulk-rice and food-container queries, an English cast-iron query, and an unrelated football question that returned no guide. I also checked the public deployment, a small-phone layout and landscape layout. Automated tests cover unit conversion, incompatible quantities, invalid inputs, zero prices, ties and similarity arithmetic. These checks are limited; I have not benchmarked retrieval accuracy or tested every phone.
The first model download is about 118 MB. It took 13.3 seconds in my public-demo test; one later query completed in about 0.1 seconds. That is one browser observation, not a speed promise. I would load it before entering a supermarket with weak reception. Caches may help later use, but I do not promise offline availability on every device.
Why Does Open Innovation Matter?
Open weights make the semantic search usable inside the shopper's own browser. I can inspect and change the corpus, pin the model revision, and keep shopping questions away from a remote inference service. I do not need a subscription, an API secret on the page, or a server that stores my friend's questions. Initial runtime and model downloads still contact public CDNs and produce ordinary request metadata.
The base model and Transformers.js use Apache-2.0 licenses. Their open distribution made this small, reproducible deployment possible. The application and checklists can be inspected and improved independently of the model.
This first version supports manual shelf-price comparison and a small guide library. It does not scrape live retailer prices, recognize product photos or barcodes, certify materials, or invent a product manual. My next useful step is to let my friend try it on a real shopping trip, then use their feedback to decide which products and instructions to add.













