Recipe picker + discovery. 'What to Cook' uses current stock + mealplan to rank feasible meals (have-it/close-to-it/missing-it). 'Discover' searches + filters curated dataset.
{
"schema_version": "visual-recipe-v0.5",
"module_id": "recipes",
"name": "Recipes",
"source_nav_ids": [
"whattocook",
"discover"
],
"user_facing_names": [
"What to Cook",
"Discover"
],
"purpose": "Recipe discovery + selection. 'What to Cook' picks recipes based on stock + mealplan. 'Discover' searches and surfaces new recipes.",
"behaviour": {
"what_to_cook": {
"input": "current stock + current week mealplan",
"output": "ranked list of feasible meals",
"scoring": "have-it / close-to-it / missing-it"
},
"discover": {
"input": "search query + filters",
"output": "recipe feed",
"search": "name + ingredient + tag fuzzy"
},
"recipe_details_modal": "shows ingredients, steps, substitutions, nutrition",
"recipe_drag_into_mealplan": true,
"recipe_subs": "per-ingredient substitution preferences (pantry_subPrefs)",
"image_cache": "lazy-loaded, cached as base64 in localStorage",
"nutrition_cache": "calculated on demand, cached"
},
"data": {
"custom_recipes": "pantry_customRecipes (localStorage)",
"saved_recipes_key": "pantry_favorites (localStorage)",
"substitutions": "pantry_recipeSubs (localStorage)",
"visibility": "pantry_recipeVisibility (localStorage)",
"sub_prefs": "pantry_subPrefs (localStorage)",
"image_cache": "pantry_recipeImageCache (localStorage)",
"nutrition": "pantry_recipeNutrition (localStorage)",
"quick_ideas": "pantry_quickIdeas, pantry_pinnedQuickIdeas, pantry_highlightedQuickIdeas (localStorage)",
"pinned_collapsed": "pantry_pinnedCollapsed (localStorage)"
},
"key_functions": [
"getAllRecipes",
"getRecipe",
"openDiscoverRecipe",
"getVariantRecipe",
"findBestVariant",
"editRecipeSubs",
"deleteCustomRecipe",
"getAutoRecipeImage",
"getRecipeGradient",
"getRecipeNutrition",
"getLastCookedDate",
"getDaysSinceLastCooked",
"handleRecipeDragStart",
"handleRecipeDragEnd",
"handleRecipeDrop",
"renderDiscoverFeed",
"renderDiscoverCard",
"renderDiscoverCardCompact",
"filterDiscover",
"searchRecipesAndFilter"
],
"files": {
"html": "app/index.html#whattocook-tab, discover-tab",
"css": "app/styles.css (recipe card + modal classes)",
"js": "app/modules/recipes.js"
},
"tests": [
"What to Cook ranks recipes by stock match",
"Discover search filters recipes correctly",
"Recipe modal shows ingredients + steps",
"Drag recipe to mealplan adds it",
"Substitution preference is honoured",
"Image cache works for repeated views"
]
}
Part of the SmartPantry module-organised rebuild. Authored by hand following the FvRE Recipe Book pattern. Source: /workspace/smartpantry-app/recipe-book/recipes/recipe.json