Inspiration
Grocery prices vary significantly between stores, but comparing them means opening three different apps or driving between locations. At the same time, sustainability is becoming much more important for shoppers, but there's no easy way to weigh "cheapest" against "healthiest" against "most eco-friendly" in one place. We wanted to build something that answers a simple question: for what I actually need to buy, where should I go, and what should I get?
What it does
GreenCart lets a user search for either a single grocery item (like "spaghetti") or a full recipe (like "spaghetti and meatballs"). It pulls matching products from multiple popular supermarkets and ranks them by total price, unit price, health score, environmental score, and an overall balanced score. This allows users to know which store offers the better deal and product, not just the lower sticker price.
How we built it
We combined a curated multi-retailer product dataset with AI-powered interpretation and deterministic scoring. Gemini breaks down user queries by parsing recipes into ingredient lists, matching ambiguous searches to the right products, and explaining trade-offs in plain language. Open Food Facts enriches our product data with real nutrition and environmental scores. The actual price, health, and environmental rankings are calculated with deterministic code. Gemini is only used as a method to unpack the information, while the significant values are computed without AI.
The dataset itself was built manually and semi-automatically from real product listings across Walmart, Publix, and Target for a single ZIP code, covering categories like pasta, sauce, milk and milk alternatives, cereal, bread, rice, and cheese. Each product record includes its source URL, collection date, price, package size, and a normalized unit price, so every comparison in the app can be traced back to a verifiable, real-world listing rather than a guess. We layered Open Food Facts on top for nutrition and environmental grades, matching by UPC (corresponding to an item's barcode) where available and falling back to name matching with an explicit confidence level when it wasn't. On the frontend, we kept the architecture simple by design to allow for a clean user interface. The app searches a local curated dataset rather than hitting live retailer APIs, which lets us focus our time on making the comparison and scoring experience genuinely useful instead of fighting scraping infrastructure.
Challenges we ran into
Sourcing accurate, verifiable product data from live supermarket websites was more difficult than expected. Some retailers' data was easy to access; others required manual collection. We had to ensure never to fabricate a price, UPC, or product detail, and build fallback rules (like setting fields to null when data couldn't be verified) so the dataset is reliable and accurate.
We also underestimated how much retailer-to-retailer inconsistency there would be in the raw data itself. Package sizes were described differently across sites, promotional pricing wasn't always clearly separated from regular pricing, and availability signals ranged from precise ("pickup available") to vague or missing entirely. Designing a single normalized schema that could accurately show this took several iterations. On the AI side, keeping Gemini strictly in an interpretation role, rather than letting it "helpfully" fill in missing facts or override the deterministic scoring, required careful prompt design and testing to make sure explanations stayed grounded in the actual data we supplied.
Accomplishments that we're proud of
We built a dataset and scoring pipeline that offers insight into our project goal of allowing users to pick the most "green" product. Every product traces back to a real source URL and collection date, and every ranking is calculated with auditable code rather than an opaque model output. We are also proud that GreenCart offers reasoning behind the score - not just a meaningless number.
We're also proud of how well the recipe-to-shopping-list pipeline came together end-to-end in the short amount of time we had. It was a genuinely ambitious scope for a hackathon, and getting every piece (parsing, search, enrichment, scoring, and explanation) working together cleanly, rather than as disconnected demos, felt like a real milestone.
What we learned
We learned a lot about the gap between "data that looks available" and "data that's actually usable". We learned this through various scraping restrictions, inconsistent product schemas across retailers, and the importance of designing for missing or unverifiable data before even testing the pipeline. We also learned how much clearer AI-generated explanations become when they're grounded in deterministic numbers instead of being asked to reason about facts on their own.
We came away with a much better appreciation for how much invisible design work goes into a "simple" comparison feature. We had to make decisions like how to handle a missing UPC, how to fairly compare a 16 oz box against a 1 lb bag, or how to represent a promotional price without misleading the user, all of which turned out to matter far more than we expected going in.
What's next for GreenCart
Expanding to more retailers and ZIP codes, adding live pricing where retailers offer legitimate APIs, and building out a larger recipe library. We would also implement the Instacart API to offer a more refined solution (was not doable in this hackathon due to required developer approval). We would also add a leaderboard to allow for friendly competition between groups to see who can buy the most "green" carts.
Built With
- geminiapi
- javascript
- mongodb
- node.js
- react
- serp
Log in or sign up for Devpost to join the conversation.