This document defines the foundational business concepts and relationships that form the backbone of the recipe system.
A CulinaryItem is any discrete food-related object—raw or prepared—that can appear in a recipe system.
-
IsRawIngredient (
bool)trueif the item cannot be broken down into other CulinaryItems (in-app).- Examples: Salt, Olive Oil, Basil Leaves
-
IsIngredient (
bool, read-only)trueif the item appears as an input in at least one Recipe.- Derived dynamically based on system data.
-
IsRecipe (
bool, read-only)trueif the item is produced as an output of at least one Recipe.- Derived dynamically based on system data.
A Recipe is a transformation rule that defines how to create one CulinaryItem from others.
-
InputItems:
List<CulinaryItem>
Items required to produce the output. -
OutputItem:
CulinaryItem
The resulting item after following the recipe. -
Instructions:
List<string>
Steps to combine or transform the inputs.
- Any item listed in
InputItemswill haveIsIngredient = true - The
OutputItemof a recipe will haveIsRecipe = true
Recipe: Make Pesto
- Inputs:
- Basil (IsRawIngredient)
- Olive Oil (IsRawIngredient)
- Parmesan (IsRawIngredient)
- Garlic (IsRawIngredient)
- Pine Nuts (IsRawIngredient)
- Output:
- Pesto Sauce
Resulting Flags:
- Basil, Olive Oil, etc. →
IsIngredient = true,IsRawIngredient = true - Pesto Sauce →
IsRecipe = true,IsIngredient = false,IsRawIngredient = false
If later used in a new recipe (e.g., "Pesto Noodles"), Pesto Sauce would also have:
IsIngredient = true
This model supports modularity, reuse, nesting, and clean separation of concerns. It forms the conceptual spine of the recipe app.