A procedural cooking engine that generates novel recipes using molecular flavor science, texture pairing, and taste balance analysis — with optional AI Chef integration.
FlavorForge doesn't just mash random ingredients together. It uses a database of 297 real ingredients mapped to 84 aroma compounds (linalool, furaneol, methylpyrazine, etc.) to find scientifically-grounded flavor pairings. Then it layers on texture contrast analysis and taste balance checking to make sure the dish actually works.
Send the result to your local Ollama instance or Claude API, and the AI gets a prompt loaded with molecular pairing data, texture gaps, taste balance issues, and cuisine direction — so it generates a recipe that's both creative and cookable.
Select any ingredient and see its top 25 molecular pairings ranked by shared aroma compound rarity. Discover that strawberry and tomato share 5 compounds, or that coffee and chocolate are connected through 6 different molecules.
Interactive network visualization of the entire ingredient database. Nodes are ingredients, edges are shared compounds. Adjust the similarity threshold, filter by category, click nodes to inspect.
Generate random recipe concepts filtered by dish type (Pizza, Pasta, Soup, Curry, etc.). Each recipe shows:
- What every ingredient is and why it's there
- Molecular connections between ingredients
- Texture and taste balance analysis with suggestions
- Novelty score
Choose a dish type → pick a template → fill in each slot with guided suggestions. The system recommends ingredients based on:
- Molecular pairing — shared aroma compounds
- Texture gaps — "missing crunch, try nuts or breadcrumbs"
- Taste balance — "no acid, consider lemon or vinegar"
Includes 24 noodle/pasta types, 9 breads, 7 rices, 8 broths, 11 cooking sauces, and 18 dressings.
Pick two ingredients that seem incompatible (chocolate + salmon) and find a third ingredient that shares compounds with both — bridging the gap.
Check off what's in your fridge/cupboard. Hit "What Can I Make?" to find recipes using only your ingredients. "Almost There" shows recipes where you're one ingredient short — your smart shopping list.
Pantry persists between sessions.
Send any generated recipe to Ollama or Claude API. The prompt includes:
- Ingredient profiles with texture tags and taste percentages
- Molecular pairing explanations
- Contrast pairing suggestions
- Texture/taste balance warnings with fix suggestions
- Cuisine direction and dietary flags
- Structured output format
Save AI-generated recipes as text files to ~/FlavorForge_Recipes/.
| Category | Count | Examples |
|---|---|---|
| Proteins | 22 | chicken, beef, duck, bacon, tofu, tempeh |
| Seafood | 12 | salmon, shrimp, scallop, lobster, anchovy |
| Vegetables | 42 | tomato, beet, fennel, bok choy, artichoke |
| Fruits | 23 | strawberry, fig, passion fruit, lychee |
| Herbs | 12 | basil, tarragon, lemongrass, sage |
| Spices | 36 | garam masala, za'atar, Old Bay, five spice |
| Seasonings | 13 | garlic powder, chili powder, sesame seeds |
| Cheeses/Dairy | 26 | gruyere, cotija, labneh, mascarpone |
| Grains | 35 | 24 noodles/pastas, 9 breads, 7 rices |
| Nuts/Seeds | 14 | tahini, macadamia, peanut butter |
| Mushrooms | 7 | chanterelle, morel, shiitake, truffle |
| Sauces | 19 | marinara, alfredo, curry paste, chimichurri |
| Broths | 8 | dashi, bone broth, coconut broth, miso broth |
| Fermented | 25 | miso, gochujang, kimchi, balsamic |
| Condiments | 10 | sriracha, aioli, guacamole, hummus |
| Total | 297 ingredients, 84 compounds, 1,632 flavor links |
One-Pot, Pasta & Noodles, Stir-Fry, Curry & Stew, Tacos & Wraps, Bowls, Soup (13 templates including chowders, ramen, pho, tom yum, gazpacho), Casserole & Bake (including mac & cheese), Grilled & Seared (including fried chicken), Salad & Slaw (including ceviche), Breakfast & Brunch, Sandwich (including burgers), Pizza & Flatbread, Dessert & Sweet, Snack & Appetizer (including wings, nachos, dumplings, empanadas, loaded fries), Sauce & Dip.
- Python 3.8+
- tkinter (included with Python on most systems)
- No pip packages required — 100% standard library
git clone https://github.com/jamesccupps/FlavorForge.git
cd FlavorForge
python flavorforge.pyDownload and double-click flavorforge.py, or:
python flavorforge.pytkinter may need to be installed separately:
# Ubuntu/Debian
sudo apt install python3-tk
# Fedora
sudo dnf install python3-tkinter
python3 flavorforge.pypython3 flavorforge.pyFlavorForge works standalone — the AI Chef tab is optional.
- Install Ollama
- Pull a model:
ollama pull qwen2.5:14b(or llama3, mistral, etc.) - In FlavorForge → AI Chef tab → set URL to
http://localhost:11434and model name - Hit "Test" → "Save"
- Get an API key from console.anthropic.com
- In FlavorForge → AI Chef tab → switch provider to "anthropic"
- Paste your API key
- Hit "Save"
Each ingredient is mapped to its key volatile aroma compounds. When two ingredients share compounds — especially rare ones — they harmonize on a molecular level. FlavorForge uses a rarity-weighted Jaccard similarity score: sharing a common compound like hexanal (appears in 60%+ of ingredients) scores low, while sharing gamma-decalactone (peach, coconut — appears in <5%) scores high.
Every ingredient has texture tags (crispy, creamy, chewy, tender, etc.). The balance system checks for missing texture dimensions and suggests fixes: "Missing crunch — try adding nuts, seeds, or crispy onions."
Ingredients carry taste profiles across 7 dimensions: salty, sweet, sour, bitter, umami, fatty, spicy. The system identifies gaps: "Heavy on salt but missing acid — add citrus, vinegar, or pickled element."
Templates use specialized slot types that filter to the right ingredients:
noodle→ 24 pasta/noodle options (spaghetti, udon, rice noodles, gnocchi...)bread→ 9 bread options (sourdough, ciabatta, naan, pita...)rice_type→ 7 rice options (jasmine, basmati, arborio, sticky...)broth→ 8 stock/broth options (dashi, bone broth, coconut broth...)cooking_sauce→ 16 sauces (marinara, pesto, alfredo, curry paste...)dressing→ 21 condiment dressings (gochujang, harissa, miso...)
FlavorForge saves user data to your home directory:
| File | Purpose |
|---|---|
~/.flavorforge_config.json |
AI Chef settings (provider, URL, model) |
~/.flavorforge_pantry.json |
Your pantry ingredient list |
~/.flavorforge_saved_recipes.json |
Saved recipe concepts |
~/FlavorForge_Recipes/ |
AI-generated full recipe text files |
- 4,874 lines of Python
- 297 ingredients across 17 categories
- 84 aroma compounds with descriptions
- 1,632 flavor links
- 102 recipe templates across 16 dish types
- 22 slot types including grain, sauce, and broth subtypes
- 7 tabs: Pairing Explorer, Flavor Graph, Recipe Generator, Build a Dish, Bridge Finder, My Pantry, AI Chef
- Zero external dependencies — pure Python stdlib + tkinter
MIT License — see LICENSE.
Flavor compound data is based on research from:
- FlavorDB — Indian Institute of Technology
- Ahn et al. (2011) — "Flavor network and the principles of food pairing" (Scientific Reports)
- Foodpairing.com methodology
Built by James Cupps.