Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

39 Commits
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Zenny - AI Recipe Assistant ๐Ÿณ

Your intelligent cooking companion powered by Google Gemini AI

An advanced web application that transforms your available ingredients into delicious recipes, helps plan your meals, tracks nutrition, and provides personalized cooking advice. Built with Next.js, Python Flask, and Google Gemini 2.0.

๐ŸŒ Live Demo

Try it now! No installation required: https://twistedzenny.netlify.app/

๐ŸŽ‰ Anyone can use the live site for free - just visit the link and start discovering recipes!

Zenny Logo

Next.js React TypeScript Python Flask Gemini Tailwind CSS

๏ฟฝ Whatโ€™s New

  • ๐ŸŽฏ Autoโ€‘plan your week to calorie/macro goals
  • ๐Ÿฅซ Pantry manager with pantryโ€‘aware recipe prioritization
  • ๐Ÿ’ฐ Cost per serving on cards + Budget filter and Budget Mode
  • ๐Ÿ” Smart ingredient substitutions with oneโ€‘tap apply/reset (used in shopping list)
  • ๐Ÿ—บ๏ธ Region selector (US/EU/IN) for cost estimates and currency display
  • ๐Ÿ“ฐ "Whatโ€™s New" strip on the homepage with quick actions
  • ๐Ÿ†š Ingredient swap comparison: "Original" vs "Your list"

๏ฟฝ๐ŸŒŸ What Makes Zenny Special?

  • ๐ŸŽฏ Smart AI Recipe Generation - Get personalized recipes from your ingredients
  • โญ Favorites System - Save and organize your favorite recipes
  • ๐Ÿ“… Weekly Meal Planner - Plan 7 days of meals with automatic shopping lists
  • ๐Ÿ’ช Nutritional Tracking - View calories, protein, carbs, and fats per serving
  • ๐Ÿฝ๏ธ Recipe Scaling - Adjust servings with automatic ingredient recalculation
  • ๐Ÿ” Advanced Filters - Filter by time, difficulty, cuisine, and diet type
  • ๐Ÿค– AI Chat Assistant - Get cooking advice and substitution suggestions
  • โญ Community Ratings - Rate recipes and see what others love
  • ๐ŸŽจ Beautiful UI - Modern dark theme with smooth animations
  • ๐Ÿš€ Lightning Fast - Optimized for speed with progressive image loading
  • ๐Ÿฅซ Pantryโ€‘Aware Suggestions - Prioritize recipes that use what you already have
  • ๐Ÿ’ฐ Costโ€‘Aware Cooking - See $/serving, filter by budget, and prefer cheaper swaps
  • ๐Ÿ” Smart Substitutions - Oneโ€‘tap ingredient swaps with reasons and reset
  • ๐ŸŽฏ Goalโ€‘Based Planning - Autoโ€‘fill the week to hit your calories/macros

โœจ Features

๐Ÿ” Smart Recipe Discovery

  • Ingredient-Based Search: Enter your available ingredients and get personalized recipe recommendations
  • Dish Search: Find variations of specific dishes (e.g., "Pasta Carbonara")
  • Trending Recipes: Discover popular recipes from around the world
  • Deterministic Image System: Accurate food images using curated Unsplash photos with 24+ categories

๐Ÿค– AI-Powered Assistant

  • Interactive Chatbot: Get answers about recipes, substitutions, and cooking techniques
  • Context-Aware: Chat remembers your current recipe for relevant suggestions
  • Real-Time Streaming: Fast AI responses powered by Gemini 2.0 Flash

โญ Favorites & Collections

  • Save Recipes: Heart your favorite recipes for quick access
  • Persistent Storage: Favorites saved in browser localStorage
  • Quick View: Dedicated favorites page with all saved recipes

๐Ÿ“… Meal Planning

  • 7-Day Calendar: Plan breakfast, lunch, and dinner for the entire week
  • Drag & Drop: Easy recipe assignment to meal slots
  • Shopping List Generator: Automatically aggregate ingredients from planned meals
  • One-Click Copy: Copy shopping list to clipboard instantly
  • Autoโ€‘Plan to Goals: Fill the week targeting your daily calories/macros

๐Ÿ“Š Advanced Filters

  • Time Filter: Filter by cooking time (15min, 30min, 45min, 1hr+)
  • Difficulty Filter: Choose Easy, Medium, or Hard recipes
  • Cuisine Filter: Browse by cuisine type (Indian, Italian, Chinese, Mexican, Thai, etc.)
  • Diet Filters: Filter by Veg, Non-Veg, or Vegan options
  • Budget Filter: Any, or under $2/$5/$8/$12 per serving

๐Ÿฝ๏ธ Recipe Scaling

  • Servings Adjustment: Scale recipes up or down with +/- buttons
  • Smart Scaling: Automatically recalculates ingredient quantities
  • Nutrition Scaling: Macros adjust proportionally with servings

๐Ÿ’ช Nutritional Information

  • Comprehensive Data: View calories, protein, carbs, and fats per serving
  • Visual Badges: Color-coded nutritional info on recipe cards
  • Detailed Panel: Full macro breakdown in recipe modal

โญ Rating System

  • 5-Star Ratings: Rate recipes to help others discover great dishes
  • Average Ratings: See community ratings with total count
  • Personal Tracking: Your ratings are remembered

๐ŸŽจ Modern UI/UX

  • Dark Theme: Beautiful dark interface with gradients
  • Glassmorphism: Modern backdrop blur effects
  • Smooth Animations: Hover effects, scale transitions, and loading states
  • Responsive Design: Works perfectly on mobile, tablet, and desktop
  • Gradient Accents: Signature yellow โ†’ pink โ†’ purple theme throughout

๐Ÿฅซ Pantryโ€‘Aware Cooking

  • Add pantry items (onions, rice, milk, etc.) and the app prioritizes recipes that use them.
  • Pantry items are excluded from shopping lists.
  • Toggle โ€œ๐Ÿ“ฆ Prioritize Pantryโ€ to sort by pantry match.

๐Ÿ’ฐ Costโ€‘Aware Cooking

  • Each recipe shows a rough โ€œ$X.XX per servingโ€ estimate.
  • Filter results by budget and enable โ€œ๏ฟฝ Budget Modeโ€ to prefer cheaper substitutions in the shopping list.
  • Uses a lightweight keyword price map (tunable/regionโ€‘aware in future).
  • Choose your region (US/EU/IN) to adjust costs and currency symbol.

๐Ÿ” Smart Ingredient Substitutions

  • In the recipe modal, ingredients offer oneโ€‘tap โ€œSwap โ†’ โ€ฆโ€ suggestions.
  • Reasons are provided; cheaper swaps are highlighted in green.
  • Applied swaps persist during the session and feed into the shopping list.
  • Toggle โ€œCompare swapsโ€ to view sideโ€‘byโ€‘side: Original vs Your list.

๏ฟฝ๐Ÿ“ธ Screenshots

Main Interface

  • Clean search interface with ingredient and dish search modes
  • Beautiful gradient buttons and dark theme
  • Trending recipes button for quick inspiration

Recipe Cards

  • Nutritional badges (calories, protein, carbs, fats)
  • Heart icons for favoriting
  • Diet type indicators (Veg/Non-Veg/Vegan)
  • Cooking time and difficulty display
  • Hover animations and gradient effects

Recipe Modal

  • Large hero image with gradient overlay
  • Servings scaler with +/- buttons
  • Nutrition panel with per-serving macros
  • Ingredient list with scaled quantities
  • Pantry indicators and oneโ€‘tap swaps on ingredients
  • Step-by-step instructions
  • Rating system (1-5 stars)
  • YouTube video search integration

Meal Planner

  • 7-day calendar view with "TODAY" badge
  • Breakfast, lunch, dinner slots per day
  • Custom dropdown styling with animations
  • Shopping list generator
  • Goals panel with Autoโ€‘Fill button
  • Beautiful gradient cards with hover effects
  • Ingredient swaps are reflected in the shopping list; pantry items are autoโ€‘excluded

Favorites

  • Grid view of all saved recipes
  • Quick access to favorite dishes
  • One-click to view full recipe
  • Empty state with helpful message

๐Ÿ”ง Setup Instructions

Prerequisites

  • Node.js (v18 or higher)
  • Python (v3.8 or higher)
  • Google Gemini API Key (Get one here)

Frontend Setup

  1. Install dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Open http://localhost:3000 in your browser

Backend Setup

  1. Navigate to the backend directory:
cd backend
  1. Create and activate a virtual environment:
python -m venv venv
# On Windows:
.\\venv\\Scripts\\activate
# On Mac/Linux:
source venv/bin/activate
  1. Install Python dependencies:
pip install Flask flask-cors google-generativeai python-dotenv
  1. โš ๏ธ IMPORTANT - Configure Gemini API Key:

    • Open the .env file in the backend directory
    • Replace your_gemini_api_key_here with your actual Gemini API key:
      GEMINI_API_KEY=your-actual-api-key-here
      
    • Save the file
    • Get your FREE API key from: https://aistudio.google.com/app/apikey
  2. Start the Flask server:

python app.py

The backend will run on http://127.0.0.1:5000

๐Ÿš€ How to Use

Basic Recipe Search

  1. Choose Search Mode:

    • ๐Ÿฅ˜ By Ingredients: Enter what you have (e.g., chicken, rice, tomatoes)
    • ๐Ÿฝ๏ธ By Dish: Search for specific dishes (e.g., Chicken Biryani)
  2. Apply Filters (Optional):

    • Select diet type: Veg / Non-Veg / Vegan
    • After recipes load, use advanced filters for time, difficulty, and cuisine
  3. Get Recipes: Click "Get Recipes" and wait for AI-generated suggestions

  4. View Details: Click any recipe card to see:

    • Full ingredient list with quantities
    • Step-by-step instructions
    • Nutritional information
    • Adjustable servings

Advanced Features

โญ Using Favorites

  1. Click the heart icon (๐Ÿค) on any recipe card
  2. Access favorites anytime via the โญ Favorites button at the top
  3. Favorites are saved in your browser automatically

๐Ÿ“… Meal Planning

  1. Generate some recipes first
  2. Click ๐Ÿ“… Meal Planner button
  3. Use dropdowns to assign recipes to meal slots
  4. Click ๐Ÿ“‹ Generate Shopping List to get all ingredients
  5. Shopping list is copied to clipboard automatically
  6. Set daily calories/macros and click โšก Autoโ€‘Fill Week to Goals to populate the plan

๐Ÿฝ๏ธ Scaling Recipes

  1. Open any recipe modal
  2. Use +/- buttons to adjust servings
  3. Ingredients and nutrition update automatically
  4. Click "Reset" to return to original serving size

๐Ÿ’ฌ AI Chat Assistant

  1. Click the ๐Ÿ’ฌ Chat Assistant button in header
  2. Ask questions about recipes, substitutions, or cooking techniques
  3. Chat remembers context from your current recipe
  4. Get instant AI-powered cooking advice

โญ Rating Recipes

  1. Open any recipe modal
  2. Click stars to rate (1-5 stars)
  3. Your rating is saved and contributes to average rating
  4. See community ratings on recipe cards

๐Ÿฅซ Using the Pantry

  1. Click ๐Ÿฅซ Pantry in the filters row.
  2. Add items like onion, rice and close the panel.
  3. Toggle ๐Ÿ“ฆ Prioritize Pantry to sort recipes by pantry match.
  4. Shopping lists automatically skip items that are already in your pantry.

๐Ÿ’ฐ Budget & Cost

  1. Choose a ๐Ÿ’ธ Budget filter (e.g., Under $5/serv).
  2. Toggle ๐Ÿ’ฐ Budget Mode to prefer cheaper substitutions in the shopping list.
  3. See perโ€‘serving cost on recipe cards, with regionโ€‘specific currency.
  4. Switch ๐Ÿ—บ๏ธ Region in the filters to adjust estimates.

๐Ÿ” Ingredient Swaps

  1. Open a recipe modal and scroll to Ingredients.
  2. Tap a โ€œSwap โ†’ โ€ฆโ€ chip to apply; tap Reset to undo.
  3. Toggle Compare swaps to see Original vs Your list.
  4. Applied swaps are reflected in your shopping list.

๐Ÿ› ๏ธ Technologies Used

Frontend

  • Framework: Next.js 16 with Turbopack
  • Language: TypeScript
  • Styling: Tailwind CSS v3 with custom animations
  • UI Components: React 19
  • Markdown: react-markdown with remark-gfm
  • Storage: Browser localStorage for favorites and meal plans

Backend

  • Framework: Python Flask 3.0+
  • AI Model: Google Gemini 2.0 Flash Experimental
  • APIs:
    • Gemini Generative AI
    • Unsplash (for curated food images)
  • CORS: flask-cors for cross-origin requests
  • Environment: python-dotenv for configuration
  • Data Storage: JSON files (ratings, image cache)
  • Server: Gunicorn-ready for production deployment

Key Features Implementation

  • Deterministic Images: Token-based category matching with confidence scoring
  • Recipe Scaling: Smart ingredient quantity recalculation
  • Meal Planning: Date-based recipe assignment with ingredient aggregation
  • Nutritional Data: AI-generated macro estimates per serving
  • Rating System: Persistent JSON storage with average calculation
  • Filters: Client-side filtering for instant results

๐Ÿ“Š Performance Optimizations

  • Fast Recipe Loading: Recipes displayed immediately, images load progressively
  • Reduced AI Load: 3 recipes per search (optimized from 5)
  • Parallel Image Fetching: Non-blocking image loads
  • Cached Images: Deterministic URLs prevent duplicate API calls
  • Client-Side Filtering: Instant filter application without backend calls

๐ŸŽจ Design Philosophy

  • Dark Theme: Easy on the eyes for late-night cooking
  • Gradient Accents: Signature yellow โ†’ pink โ†’ purple branding
  • Glassmorphism: Modern backdrop blur effects
  • Micro-interactions: Hover states, scale transitions, and smooth animations
  • Responsive: Mobile-first design that scales to any screen size

๐Ÿ“ Notes

  • โœ… The Gemini API is FREE to use with generous rate limits
  • โœ… Make sure both frontend and backend servers are running
  • โœ… Requires internet connection for AI API communication
  • โœ… Favorites and meal plans are saved in browser (localStorage)
  • โœ… Recipe ratings are stored in backend JSON file
  • โœ… Images are cached for faster subsequent loads

๐Ÿš€ Deployment

Netlify (Frontend)

The Next.js frontend is configured for Netlify deployment with netlify.toml.

Backend Options

  • Local: python app.py (development)
  • Gunicorn: Production-ready WSGI server included
  • Cloud: Deploy to Heroku, Railway, or any Python hosting

๐Ÿค Contributing

Contributions are welcome! Feel free to:

  • Report bugs
  • Suggest new features
  • Submit pull requests
  • Improve documentation

๐Ÿ“„ License

This project is open source and available for educational purposes.

๐Ÿ‘จโ€๐Ÿ’ป Developer

Built with โค๏ธ by TwistedVision518


Zenny - Your AI-powered cooking companion ๐Ÿณโœจ

You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.

This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.

Learn More

To learn more about Next.js, take a look at the following resources:

You can check out the Next.js GitHub repository - your feedback and contributions are welcome!

Deploy on Vercel

The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.

Check out our Next.js deployment documentation for more details.

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages