Inspiration

As hobbyist home cooks, our team often found ourselves stuck—not because we didn’t want to cook, but because we couldn’t decide what to cook. That indecision led to forgotten pantry items, overbuying ingredients, and ultimately, food waste. While similar apps exist to help us find recipes based on ingredients, we found they didn’t go far enough: lacking features like quantity-specific matching, serving size customization, or standardized units.

When we saw this hackathon’s theme—Consumption and Environment—we realized we could build something more meaningful. We envisioned EcoPantry as a full-cycle kitchen and shopping assistant: from pantry tracking and sustainable recipe discovery to shopping for the right brands and reducing waste at every step. We also wanted to promote another under-discussed angle of sustainability—healthier home-cooked meals.

EcoPantry Intended Features:

MVP Features

  1. [WIP] Recipe Recommendation: EcoPantry stores a database of recipes. As a user, you can indicate which ingredients you currently have in your pantry, and our application will recommend recipes based on what you have!
  2. [COMPLETE] Sustainable Products Recommendation: Say you're missing a chicken and a fish for your recipe. EcoPantry can recommend to you various products from a marketplace (e.g FairPrice), provide information on each product (e.g price per gram), provide sustainability scores on each product. This allows YOU to not only choose products within your budget, but also assist in being environmentally conscious!
  3. [COMPLETE] Recipe Guidance and Simplification: Receive in-recipe guidance for complex cooking terms or techniques using Gemini AI.

Future Features

  1. Ease of Usage: Customize servings and toggle between imperial and metric units, and modify the recipe according to serving size.

How we built it

  • Frontend: React, Vite, TypeScript, Tailwind, ShadCN UI, TanStack Router
  • Backend: Express, Prisma, PostgreSQL
  • DevOps/Infra: Docker, GitHub Actions, AWS (S3, ELB)
  • APIs:
    • TheMealDB – for recipe data
    • FairPrice API – to retrieve ingredient varieties and brand metadata
  • Design: Figma

Challenges we ran into

Exploratory Data Analysis to Obtain Sustainability Scores for Products

We wanted to attached a sustainability score to each product for each brand but this data is not contextualised to Singapore markets and brands. While we may have a Nutri-Grade label, sustainability indicators such as Eco-Score (EU): Grades food products A to E based on environmental impact, Carbon Trust labels: Show the carbon footprint per product, are not as easily accessible or available.

To do so, we relied on Poore and Nemecek's (2018) dataset, which contains the impacts of five environmental metrics of certain key categories of food: Greenhouse gas emissions, water usage, land usage, biodiversity impact, and eutrophication impact.

Next, we log-normalised the values of each metric for each product, giving us a "score" for each food type. For example, Wheat Bread may be especially efficient in terms of Greenhouse Gas emissions (e.g with a score of 77.57), but performs terribly in terms of water use (e.g 29.55).

Finally, to allow the consumer to easily understand the overall impact of a product, we give each product an overall weighted score from a score range of A (most environmentally conscious food) to E (worst environmentally conscious food).

API Scraping Recipes and Ingredients Data

Another problem we encountered was obtaining recipe data. It was difficult to obtain a reliable list of recipes (with their ingredients and steps) as most existing datasets and APIs did not have a "free" tier. However after much searching, we chanced upon themealDB which provided a free API to obtain recipes from. We had to not only perform scraping via food categories, we had to multithread our scraping to ensure we could complete it in a realistic amount of time. We also did a lot of data preprocessing, which included:

  • Keeping track of ingredients
  • Cleaning up text data, e.g splitting up instruction text via newlines and cleaning up erroneous texts
  • Importantly, we relied on NLP libraries like ingredient-parser to tokenize, lemmatize, and extract core ingredient steps. This is because the ingredients' representations were not standardised (e.g "3kg of lamb shank, deboned" vs "1 tomato") by representing them as Python Objects, with standardised fields (e.g units, amounts, name). We had to find a way to easily represent "Ingredients" so they can be stored in a database.

After much scraping and preprocessing, we were able to complete this. From here, we've obtained a list of "Root Ingredients" that we can now find existing FairPrice products to suggest.

Web Scraping Product Information from FairPrice

Say a recipe now calls for certain ingredients, e.g chicken or fish, that's missing from your pantry but needed in your recipe. We wanted to recommend to users real products that they can consider purchasing.

We first defined a set of "root" ingredients (e.g Chicken) from the previous step in scraping recipes. Now, we want to find products that represent these root ingredients (e.g FairPrice Whole Range Chicken, Aw Market's Whole Chicken). As such, we web scraped the FairPrice website to get a list of existing products.

This took a long time, and we again had to multithread to ensure we could scrape sufficient information in a reasonable amount of time.

After scraping, we had to further preprocess each product: Importantly, we had to provide sustainability scores for each product by defining the "root" ingredient of each product (e.g Aw Market's Whole Chicken's root ingredient would be Chicken), and then giving that product an estimated sustainability score (which we previously obtained from Poore and Nemecek's (2018) dataset.

Deployment with AWS ECS and GitHub Actions

We wanted to provide continuous deployment. As such, we spent some time configuring deployment of our backend and frontend.

The backend is dockerised in a Dockerfile and deployed to AWS ECS using GitHub Actions on a modification to the main branch. The frontend is deployed on an S3 bucket due to the static nature of our web application. This took some time to set up. We also rely on AWS RDS for a deployment database.

Lack of Time in Integrating our Features Fully

Unfortunately, we did not have sufficient time to fully integrate all our existing features: Our frontend / backend currently only has authentication fully set up. The datasets we have carefully curated have not been uploaded to AWS RDS, which renders the filtering function incomplete. Nevertheless, we believe if there was an additional day provided, we would be able to complete it.

Accomplishments that we're proud of

We’re proud to have attempted a deployed product, despite many time and resource constraints faced by our team (e.g most of us are currently interning, with only a couple of hours each day to work on it). Even in its early stages, EcoPantry makes sustainable, healthier home cooking easier and encourages users to think twice before wasting food or overbuying.

It’s intuitive, helpful, and genuinely something we would (and will) use ourselves.

What's next for EcoPantry

  • Expand the recipe database with better coverage of local Asian recipes.
  • Add pantry photo recognition: Users can snap a picture of their fridge or pantry to detect ingredients using image recognition.
  • Integrate grocery platforms like RedMart, FairPrice, GrabMart, Giant, and Cold Storage for one-click, sustainable ingredient purchases.
  • Support budget-conscious users with price comparisons and low-cost sustainable options.

Built With

Share this project:

Updates