DEV Community

Hrishi Mehta
Hrishi Mehta

Posted on • Edited on

AI-Powered Recipe Discovery with Intelligent Search

Too much of tech, tired huh, lets do fun with bud Algolia :)

🍳 Auto-Yum: AI-Powered Recipe Discovery with Intelligent Search

Turn pantry chaos into gourmet meals β€” instantly.

Link - https://nutra-blond.vercel.app/

Auto-Yum Demo GIF

Auto-Yum is an AI-powered recipe platform that generates personalized meals based on the ingredients you already have, your dietary needs, and the time you can spare. Every recipe the AI creates becomes searchable for the entire community through lightning-fast intelligent search.

This isn’t just recipe generation.
It’s AI creation + smart discovery infrastructure working together.

🚩 The Problem

Home cooks struggle with three everyday challenges:

😡 Decision Fatigue

β€œWhat can I make with these random ingredients?”

🧩 Discovery Gap

Existing recipe sites rarely match your exact ingredients, diet, and time limit.

πŸ” Search Limitations

Traditional search can’t understand:

Ingredient substitutions

Dietary nuances

Fuzzy matches like β€œpasta” β†’ spaghetti or penne

πŸ’‘ Our Solution: AI Generation + Intelligent Indexing

Auto-Yum combines AI creativity with powerful search infrastructure so every generated recipe becomes part of a growing, searchable ecosystem.

Algolia Capabilites

Auto Sync - Synchronize all recipes from MongoDB to Algolia search index

Link - https://nutra-blond.vercel.app/admin/sync

πŸ€– How the AI Works

Technology: Google Gemini 2.5-flash via Genkit

Generation Flow

User inputs:

Available ingredients

Dietary preferences

Time constraints

AI produces a complete, structured, nutritionally analyzed recipe.

🧠 AI Capabilities

βœ” Ingredient Intelligence – Suggests substitutions and flavor pairings
βœ” Nutritional Precision – Calculates macros per serving
βœ” Food Safety Awareness – Cooking warnings & storage tips
βœ” Professional Quality – Equipment lists and pro techniques
βœ” Flavor Profiling – Describes taste and texture experience

Example Input:
"chicken, spinach, garlic, rice" + high-protein + 30 minutes

AI Output:
A full recipe with:

15 structured steps

35g protein per serving

Equipment list

Variations

Storage instructions

πŸ” How We Use Algolia (The Brain of Discovery)

Algolia powers instant, intelligent discovery across all AI-generated recipes.

1️⃣ Automatic Indexing Pipeline

Every recipe is indexed with rich searchable attributes:

title, description

mainIngredients

ingredients.item (nested search)

searchKeywords (from original user input)

category, difficulty, source

2️⃣ Faceted Navigation

Users can filter recipes by:

πŸ₯— Dietary Tags (Vegan, Keto, Gluten-Free, High-Protein)

πŸ§‘β€πŸ³ Difficulty (Easy / Medium / Hard)

⏱ Time Range (Quick meals vs slow-cooked)

πŸ”₯ Nutritional Goals (Calorie-conscious)

Each filter shows live result counts.

3️⃣ Smart Ranking

Popular and highly viewed recipes rise to the top using:

customRanking: ['desc(views)']

This creates a community feedback loop where the best AI recipes get discovered more often.

4️⃣ InstantSearch Experience

Using react-instantsearch, users get:

πŸ”Ž Real-time search results

🎯 Multi-select filters

πŸ“Š Live stats ("Showing 12 of 47 recipes")

πŸ–Ό Beautiful recipe cards

⚑ Sub-50ms search response time

5️⃣ Smart Searchable Attributes

Searching for β€œpasta” can return recipes containing:

Spaghetti

Penne

Fusilli

…even if β€œpasta” isn’t in the title.

That’s ingredient-level intelligence, not keyword matching.

πŸ— Technical Architecture
Layer Technology
Frontend Next.js 15, React 19, TypeScript, Tailwind CSS
AI Engine Google Gemini 2.5-flash via Genkit
Search Algolia InstantSearch
Database MongoDB (source of truth)
Images Pexels API (auto-fetch per recipe keywords)
Sync Strategy

βš™οΈ Config Sync: Index settings applied on every batch sync

🌟 What Makes Auto-Yum Original
🀝 Dual Intelligence System

AI generates recipes β†’ Algolia organizes and makes them discoverable.

Most recipe apps are static databases.
Auto-Yum is an ever-growing AI-powered food ecosystem.

🎯 Constraint-Based Discovery

β€œI have only vegetables and 20 minutes.”

β†’ AI creates the recipe
β†’ It gets indexed
β†’ Others can find it using filters later

πŸ“ˆ Community Learning Loop

Great AI recipes get more views β†’ Ranked higher β†’ Discovered more often.

The system learns from user engagement, not just data.

πŸš€ Proactive (Non-Chatbot) Intelligence

No chat conversation needed.

Input constraints β†’ Get solution β†’ Discover similar recipes instantly.

🎨 Usability Highlights

βœ… 3-Step Flow: Enter ingredients β†’ AI generates β†’ Recipe instantly searchable
βœ… <50ms Search: Instant results with live filters
βœ… Mobile-First Design
βœ… Accessible (keyboard + screen reader friendly)
βœ… Real-time visual feedback for filters and results

🌍 Impact

For Users:
Never waste ingredients again. Always have dinner ideas.

For the Community:
Every generated recipe improves discovery for everyone.

For Health:
Accurate nutritional data supports dietary goals.

For Search Innovation:
Demonstrates search as infrastructure for AI-generated content.

🎬 Demo Flow

Visit /discover

Enter: "tomatoes, basil, pasta"

AI generates Classic Margherita Pasta

Recipe is auto-indexed

Go to /search

Search "pasta" β†’ Find it instantly

Apply filters: Easy + Under 30 min β†’ Results refine in milliseconds

🧠 Why This Is a β€œNon-Conversational AI Experience”

❌ Not a chatbot
βœ… Proactive assistance
βœ… AI generation embedded in workflow
βœ… Intelligent retrieval via filters & search
βœ… Every AI output becomes searchable knowledge

Algolia acts as the memory layer for AI creativity.

Top comments (0)