flauschtrud / broccoli

Broccoli is a free recipe app that lets you build your own personal recipe collection and helps you cook in a more eco-friendly way.
GNU General Public License v3.0
74 stars 8 forks source link

Ingredient based recipe selection feature #195

Open rubikscuber opened 1 year ago

rubikscuber commented 1 year ago

As a user I would like to be able to select a few ingredients that I have at home and get a filter for all the recipes that include this list, so that I can find recipes to cook without the need to search each ingredient after the other.

There is a nice implementation done in the drinkable app - see second and third screenshot: drinkable app fdroid

flauschtrud commented 1 year ago

You can actually search for multiple ingredients at once. The native search that comes with the database is actually quite good (although it unfortunately can't find prefixes and suffixes at its current state).

The title, description, URL and ingredient list are indexed. So you can search for multiple ingredients, specific URLs in combination with ingredients, hashtags and so on. You can also filter by category first and then do your search.

So you can already accomplish quite a lot without the need for an ingredient management system. Does this help with your usecase?

rubikscuber commented 1 year ago

Well, yes this does kind of solve my very basic usecase. However, this does not reflect the "synonyms"/plurals for some ingredients. E.g. if I search for "Karotten" I do not get recipes with "Möhren" - or in case I would import an English recipe - it would also not match "carrots" - unless my testcase was not good.

Furthermore, it would be nice to not have to think about the query, but just select the parsed (or predefined by the app) ingredients in a list. This list could then be the basis of another filter "from ingredients". Also the hastag feature is nice, I did only try it after I read it here. Here I could imagine a similar feature as well (list+selection of hashtags instead of only a single hashtag). I know that this is possible using the search, so it would be just more convenient.

I get that the feature might be confusing at first - especially with no recipes imported.

flauschtrud commented 1 year ago

Yes, the synonyms are tough. Theoretically the search index could be built including synonyms but I think that does not make sense without accessing an online service which provides the synonyms.

Regarding the hashtags: I just created an issue for collecting ideas for improving stuff like this #197 Would be happy to hear if you have anything more to add to this.