Get a random combination of ingredients for an inspirational recipe.
Check the checkbox to hold that ingredient.
I recently tried HelloFresh and it was really fun! I decided not to continue with my subscription because I didn't get enough value out of it but I found the weekly recipes really fun and inspiring. Prior to this, I mostly cooked practical meals - meals that were healthy, easy, tasty and had leftovers but HelloFresh showed me that cooking random recipes can be really fun.
I've decided to cook my practical meals going forward but also cook some fun meals as well.
I looked for inspiration on websites like taste.com.au as well as some I found on HackerNews but then I realised I don't really need a full recipe, I just need some combination of ingredients to use as a guide.
I realised I already kind of cook like this. Every week I cook about 1kg of chicken breast on the barbecue then put it in burgers, wraps or with rice and frozen veggies with a random sauce. So far I'm pretty satisfied with the variety I'm getting.
The more I thought about it, the more interesting the problem space became. There's constraints on the combinations of ingredients you can have e.g you don't usually have baby spinach in bologense but you might have any combination of vegetables with it in a salad. Tasty!
As someone looking to cook a fun meal (Cadell), I want to get a random combination of ingredients to form an inspirational recipe.
As someone looking to cook a fun meal (Cadell), I want to re-roll any or all of the ingredients, similar to a slot machine, to find an inspirational recipe.
As Cadell, I want to turn an idea for an app into an mvp within a few hours.
What data structure would support these requirements? Maybe this would be a good excuse to try a graph database?
Calm down, let's just build a frontend app to start with then go from there.
How should we store the 'rules' for which ingredients go in which meal? I think let's keep it simple and manual for now. I'll specify which ingredients can go in a bologense and which can go in a salad. This can then be updated with PRs which might be fun.
I've created a few NextJS apps already so I think I'll create a NextJS template and use it for this project as well.
This was pretty straightforward for an MVP, no big technical challenges.
Writing the simple algorithm to find a random combination of ingredients was fun.