💡 Inspiration
The challenge posed by HelloFresh was to create a recommender system that generates personalized suggestions for recipes and meals. Based on this, we have explored various ways of ranking dishes based on personal preference, as well as additional features. In the end, we have settled on a solution that we think is both powerful as well as realistic to be implemented within a weekend.
❓ What it does
flavorscape automatically assembles weekly meal plans, tailor-made for the taste of its users. Our intuitive onboarding process guides users through the selection of dietary preferences and allergens. Then, a small selection of sample recipes can be rated to build their personal flavor profile.
After less than two minutes, users receive their first suggested weekly meal plan. Unwanted recipes can be discarded and will be replaced by fresh suggestions. This way, a suitable menu can be found in a matter of minutes.
👷 How we built it
🧑💻️ Tech Stack
- Front-End (App/Web/...) using Dart with Flutter
- API Back-End using Python with FastAPI
- Ranking/Recommender using Python with SciKit-Learn (PCA + Random Forest, K-Means Clustering for Onboarding)
🚧 Challenges we ran into
🧑🍳️ Gathering recipes
Initially, we couldn't find a public API for recipes on HelloFresh. Thus, we tried to scrape the data we needed off the HTML recipe pages. This was moderately successful, yielding usable but at times inconsistent results. Furthermore, this approach didn't scale well, as we didn't have a good source of recipe URLs, thus having to resort to manually collecting them.
Luckily however, we stumbled upon this Markdown document in a HelloFresh GitHub repo, which mentions a recipes API. To our delight, were able to use this endpoint to fetch more than 10000 recipes (around 3000 after deduplication) with lots of parameters. We even got the image URLs to work after some tinkering.
⚙️ Building the Recommender System
With a lot of data on our hands, we needed to use it wisely. We had access to the recipes' ingredients. However, those were often very specific. Instead of directly knowing whether a meal had beef inside, it was labeled with e.g. grass-fed-ground-beef or beef-tenderloin-steak. We resorted to grouping the attributes into manually chosen ingredient classes. However, the exact ingredients were retained as additional data.
Finally, to get tailored recommendations we went through many iterations and trial-and-error to get to a working flavor matching algorithm. In short, we first reduce the recipes drastically in their dimensionality. This is done with Principal Component Analysis (PCA). The condensed information is then sent through a Random Forest Regressor trained on the user's past likes and dislikes. In the end, each meal gets assigned a personalized taste score.
🏅 Accomplishments that we're proud of
- Using a large real-world dataset gathered from the HelloFresh API
- Managing to predict recipe similarity with classic ML methods
🎓 What we learned
- Importance of reducing the solution to a minimum at first to have something working quickly
- Division of tasks among team members worked very well (front-end, back-end, machine learning)
- Never stop having fun 🎈
✅ What's next for flavorscape
- 🍽 Dinner party: Invite your friends and use the power of your combined flavor profiles to find the perfect menu for your dinner party!
- ⭐️ Post-meal review: Review meals at the end of the week to improve recommendations.
- 🎁 Go ham! Break out of a culinary rut: This button will surprise you with a meal plan with dishes you normally wouldn't choose.
- ♻️ Incorporate leftovers: Tell flavorscape which ingredients you have left in your fridge, and let it suggest recipes where you can incorporate them, reducing food waste.
- 🍷 Flavor pairing: Let flavorscape suggest wines and desserts that go well with your weekly meals.

Log in or sign up for Devpost to join the conversation.