Inspiration

We built EcoCart because making sustainable choices while shopping can be confusing and time-consuming. Labels are inconsistent, certifications are hard to verify, and it’s difficult to compare products beyond price and taste. We wanted to create a tool that puts sustainability front and center, helping users understand the environmental and ethical impact of the products they buy.

We were inspired by the growing need for transparency in everyday consumer decisions. Many people want to make eco-friendly choices but don’t have the time or information to do so reliably. By combining open data, semantic search, and an intelligent assessment system, we aimed to give users actionable insights in real time. The goal was to transform sustainability from an abstract concept into something concrete and usable, integrated directly into shopping workflows.

EcoCart was also inspired by the potential of modern AI and database technologies to make this possible at scale. We wanted to show that it’s possible to build a system that is fast, accurate, and user-friendly, while still making a meaningful impact on how people shop.

What it does

EcoCart helps people make more sustainable purchasing decisions when shopping for food and household products.

Users can search for products and instantly receive a sustainability assessment that reflects environmental impact, ingredient quality, and ethical considerations. Each product is scored from 0 to 100 and labeled with a clear verdict such as good, moderate, or poor. The reasoning explains the environmental footprint first, followed by ingredient and ethical concerns when relevant. Instead of vague ratings, users receive concrete, understandable explanations and practical alternatives such as choosing pasture-raised eggs or products with certified sourcing.

Sustainability is integrated directly into the shopping experience. Users can create and manage saved shopping lists, and every item added to a list is automatically evaluated. This allows users to see the sustainability profile of their entire cart at a glance rather than evaluating products one by one.

EcoCart also considers brand-level commitments and ingredient sourcing, so products are not judged in isolation. Environmental signals, certifications, and public sustainability efforts are factored into the final score when available

The goal is simple: make sustainable choices clearer, easier, and more actionable during everyday shopping.

How We built it

From frontend to backend, each part of EcoCart was intentionally designed for speed, clarity, and scalability. We built the application using Next.js as a full-stack framework, which allowed us to move quickly with file-based routing and built-in server-side rendering. This improved load time and strengthened SEO while keeping frontend and backend logic unified within a single codebase.

For product data, we sourced open data from Open Food Facts instead of repeatedly calling their public API. Direct network calls introduced noticeable latency that would have degraded the user experience. The raw dataset was over 19GB, so we wrote a preprocessing script to extract only the attributes essential for sustainability scoring and product identification. After trimming unnecessary fields, we reduced the dataset to roughly 300MB and seeded it into Supabase. We chose Supabase for its built-in authentication, rapid development workflow, and relational database structure, which fits well with structured product metadata and user-generated content such as shopping lists.

Our architecture separates structured storage from semantic retrieval. The master relational database stores all product metadata required for scoring and display. A separate vector database powered by Pinecone stores product embeddings used for semantic similarity search and retrieval. When a user submits a query, we perform vector search to identify the most relevant product candidates, then fetch the full structured records from the master database for scoring and rendering. This architecture reduced average search latency from nearly seven seconds to around one second, significantly improving responsiveness.

Search quality was a major focus. Results are not ranked solely by raw semantic similarity. We implemented intentional ranking logic that prioritizes branded products over generic entries and deduplicates unbranded duplicates with identical names. This prevents cluttered results such as multiple indistinguishable “Eggs” listings and ensures users see clearer, more actionable options.

Under the hood, we implemented a multi-namespace vector search strategy in Pinecone. Separate embeddings are maintained for product name, brand, and categories. During ranking, we apply a weighted combination of similarity scores across these namespaces. This weighted multi-signal semantic search balances textual similarity with brand relevance and product context, producing more intuitive and reliable search results.

A core component of Ecocart is our sustainability assessment agent. The agent is an LLM-based backend system that evaluates food and household products based on environmental and ethical impact. It receives structured product data including name, brand, categories, labels, ingredients, and ecoscore when available. It then produces a structured JSON assessment containing a verdict (good, moderate, or poor), a numerical score from 0 to 100, a concise explanation prioritizing environmental impact, concrete suggestions for better alternatives, and short summary tags for quick scanning.

The agent is implemented as a tool-using LLM loop built on OpenAI’s gpt-5-mini model. We provide a strict system prompt that defines the assessor role and enforces a structured output schema. During evaluation, the model can call two tools. The first retrieves full product data by barcode from Open Food Facts when initial information is incomplete. The second uses Serper to perform Google searches, enabling the agent to gather additional context such as brand-level sustainability commitments, environmental impact details when ecoscore is missing, or ingredient-level concerns like palm oil sourcing and animal welfare. The model can call tools multiple times within a capped loop until it returns a final structured JSON response. We then validate and normalize the output before sending a single SustainabilityAssessment object to the frontend.

Several design decisions shaped this system. Ecoscore is treated as one signal rather than absolute authority, allowing the agent to reconcile conflicting brand or web data. When certifications or claims are missing, the agent explicitly states that they are not specified rather than making assumptions. Ingredients are evaluated for environmental and ethical implications, and brand-level sustainability context is incorporated so products are not judged in isolation.

Beyond individual product lookups, Ecocart includes persistent shopping lists as a major user-facing feature. Users can create, rename, and delete lists, as well as add or remove products from them. Lists are stored in Supabase and support full CRUD operations. When a product is added to a list, the sustainability agent runs in the background and attaches a per-item score, verdict, reasoning, and summary tags. These results are stored alongside each item, allowing users to evaluate the sustainability of their entire cart at a glance. This transforms sustainability from a one-time check into an ongoing, structured decision-making process.

Together, this architecture combines structured relational data, weighted semantic search, and a tool-augmented LLM system to deliver fast, explainable, and scalable sustainability assessments in real time.

Challenges We ran into

One of the hardest parts of building EcoCart was getting the sustainability agent to behave reliably. On paper, it sounded straightforward: send product data to the model, receive a structured score. In reality, it took repeated iterations to make the system consistent and production-ready.

Early versions of the agent produced outputs that were technically correct but structurally inconsistent. Sometimes the reasoning was too long. Sometimes tags were formatted differently. Occasionally the verdict conflicted with the numerical score. Because the frontend depended on strict JSON parsing, even small formatting deviations would break the pipeline. We had to repeatedly refine the system prompt, tighten the output schema, and add validation layers to normalize scores and tags. It became a loop of testing edge cases, adjusting instructions, re-running products, and refining constraints until the model reliably produced structured, predictable output. What seemed like a simple LLM call evolved into a carefully controlled multi-turn tool loop with validation and guardrails.

Another major challenge was working within infrastructure constraints. The original Open Food Facts dataset exceeded 19GB, which was impossible to store directly under the limits of our Supabase free plan. We had to engineer a preprocessing pipeline that aggressively trimmed irrelevant attributes while preserving everything required for scoring and search. The goal was to shrink the dataset without weakening the agent’s reasoning ability. Through iterative field selection and testing, we reduced the dataset to roughly 300MB while keeping the essential signals intact.

Search latency also posed a serious obstacle. Our initial implementation relied more heavily on traditional database queries, and average search times approached seven seconds. That delay made the product feel unresponsive. We restructured the architecture to separate semantic retrieval from structured storage and introduced a vector layer powered by Pinecone. Designing weighted multi-signal search across name, brand, and categories required tuning similarity thresholds and ranking weights until results felt intuitive rather than purely mathematical. After optimization, search latency dropped to around one second.

Balancing model flexibility with strict structure, compressing a massive dataset into workable limits, and redesigning search under performance pressure forced us to rethink several core components mid-development. Each challenge pushed the architecture toward a more deliberate, scalable system rather than a quick prototype.

Accomplishments that We're proud of

One of our biggest accomplishments is the embedding-based search system. We transformed a massive open dataset from Open Food Facts into a streamlined, production-ready semantic search pipeline. By preprocessing 19GB of raw data down to roughly 300MB of essential fields, generating embeddings, and deploying a multi-namespace vector index in Pinecone, we built a weighted multi-signal search system that combines name, brand, and category similarity. This reduced search latency from several seconds to around one second while producing results that feel intuitive and high quality. On top of semantic similarity, we implemented ranking logic such as brand prioritization and duplicate removal so users see clean, useful results instead of noise. The system was engineered not just for technical performance, but for clarity and trust in the user experience.

We are also proud of building a fully orchestrated sustainability assessment agent. Rather than relying on a single LLM call, we implemented a structured, tool-using loop powered by OpenAI’s gpt-5-mini model. The agent can retrieve missing product data, search the web for brand-level sustainability context, and return a strictly validated JSON assessment containing a verdict, score, reasoning, alternatives, and tags. The orchestration layer and schema validation transform the model into a controlled backend decision system instead of a generic text generator. This ensures assessments are explainable, consistent, and directly actionable for users.

We are especially proud that every technical decision ties back to user impact. Sustainability scoring is not presented as abstract information. It is embedded directly into search results and saved shopping lists, stored through Supabase, so users can evaluate the environmental and ethical footprint of their entire cart at a glance. The goal was not only to build with modern AI technologies such as embeddings, vector databases, and tool-calling LLMs, but to use them in a way that meaningfully improves everyday purchasing decisions.

At its core, Ecocart is not just a technical demonstration. It is a system designed to make sustainable choices easier, faster, and more transparent. We are proud that the architecture balances performance, structure, and real-world impact, delivering a product that prioritizes both user experience and long-term environmental responsibility.

What we learned

Through building Ecocart, we gained hands-on experience working with embedding models and understanding how they power semantic search. we learned how to generate embeddings at scale, store them efficiently in a vector database, and design weighted similarity ranking across multiple signals such as name, brand, and category. Moving from traditional keyword search to embedding-based retrieval gave me a much deeper understanding of how modern search systems are structured.

We also learned how to preprocess large real-world datasets. Reducing the 19GB dataset from Open Food Facts into a compact, production-ready format required careful feature selection, data cleaning, and performance tradeoffs. Working within the constraints of Supabase pushed me to think critically about storage limits, indexing strategy, and schema design.

Most importantly, We learned how to design an intelligent agentic system. Instead of treating an LLM as a simple text generator, We built a structured, tool-using loop powered by OpenAI’s model. This involved prompt iteration, output schema enforcement, tool orchestration, and validation layers to ensure consistent structured results. We learned how to balance model flexibility with strict formatting requirements and how to integrate external tools into a controlled decision pipeline.

Overall, this project taught us how modern AI systems are engineered in practice, from embeddings and vector search to multi-step LLM orchestration, all within a full-stack production environment.

What's next for EcoCart

The next step for EcoCart is expanding data coverage and improving scoring depth. We plan to ingest additional sustainability datasets beyond Open Food Facts to improve accuracy, especially for household products and brand-level commitments. Integrating more structured environmental signals such as supply chain transparency, packaging impact, and third-party certifications will allow the sustainability agent to produce even more grounded and comprehensive assessments.

To ensure the data remains current, EcoCart will implement a caching system with timestamped updates. Each product or brand entry will store the last updated timestamp, allowing the system to refresh only stale data rather than re-fetching everything continuously. This keeps sustainability scores accurate while reducing unnecessary API calls and improving performance.

We also want to improve personalization. Future iterations could tailor sustainability recommendations based on user preferences, such as prioritizing carbon footprint, animal welfare, or ingredient safety. This would make scores adaptive rather than one-size-fits-all, turning EcoCart into a personalized sustainability assistant.

On the search side, we plan to refine ranking signals and experiment with hybrid retrieval methods that combine keyword filtering with embedding similarity. Expanding the multi-namespace vector system in Pinecone could further improve precision for edge cases and niche products.

For the agent itself, we aim to enhance explainability and confidence scoring. By improving orchestration and evaluation techniques with models from OpenAI, we can make the reasoning clearer and more transparent to users.

Finally, we want to move beyond static scoring and introduce real-world integrations. This could include browser extensions, grocery store integrations, or barcode scanning, making EcoCart accessible at the exact moment purchasing decisions are made.

Our long-term goal is to transform EcoCart from a sustainability lookup tool into a real-time decision companion that helps people make environmentally responsible choices effortlessly.

Tracks:

We are submitting for sustainability, and Gemini API.

Built With

  • next.js
  • openai-api
  • react
  • supabase
  • tailwind-css
Share this project:

Updates