Handling ingredients properly, both with short-term "do the simplest thing that works" in mind, and "what's the simplest thing for the user" in mind. In addition a key contributor to the value of Open Recipe is going to be the structure of its ingredients database, acting as a central lookup for ingredient names, with links to their equivalents in consumer bar-code databases, and user's own variants on core ingredients.
The proposal is we keep track of four kinds of Ingredient types.
A recipe contains a list of ActiveIngredients that carry an optional Quantity and a Unit, as well as being linked to an Ingredient which is a User generated name for an ingredient, with some sort of optional qualifying text such as 'chopped', or 'sliced' etc.
We will pre-seed and maintain a database of 'Core Ingredients' containing standardised, and internationalised names for recipes.
When the user starts typing in an ingredient name, the system will autocomplete, matching against other User entered Ingredients. This will help keep the number of ingredient names to a minimum, while allowing infinite expansion. When the user saves their recipe, any incoming Ingredient names that are unknown to the list of all User generated Ingredients will be analysed and assigned one or more a matching CoreIngredients
Handling ingredients properly, both with short-term "do the simplest thing that works" in mind, and "what's the simplest thing for the user" in mind. In addition a key contributor to the value of Open Recipe is going to be the structure of its ingredients database, acting as a central lookup for ingredient names, with links to their equivalents in consumer bar-code databases, and user's own variants on core ingredients.
The proposal is we keep track of four kinds of Ingredient types.
A recipe contains a list of
ActiveIngredient
s that carry an optionalQuantity
and aUnit
, as well as being linked to anIngredient
which is aUser
generated name for an ingredient, with some sort of optional qualifying text such as 'chopped', or 'sliced' etc.We will pre-seed and maintain a database of 'Core Ingredients' containing standardised, and internationalised names for recipes.
When the user starts typing in an ingredient name, the system will autocomplete, matching against other
User
enteredIngredient
s. This will help keep the number of ingredient names to a minimum, while allowing infinite expansion. When the user saves their recipe, any incomingIngredient
names that are unknown to the list of allUser
generatedIngredient
s will be analysed and assigned one or more a matchingCoreIngredient
sIn addition we will add, in Phase 2, a corresponding
ConsumerIngredient
s ingredient where:and which holds references to actual consumer products.
So if you know an ActiveIngredient,
ai
you can determineai.ingredient.core_ingredients
.Document this all in the wiki so we all understand how it works.