Skip to content

Repository files navigation

🍳 Smart Recipe Generator - AI-Powered Recipe App

GitHub Stars GitHub Forks License Vercel Deployment

Smart Recipe Generator is an AI-powered web application that uses OpenAI text models to generate unique recipes based on selected ingredients and dietary preferences (configurable via OPENAI_TEXT_MODEL, default: gpt-5-mini), OpenAI GPT Image to create custom recipe images (default: gpt-image-1), and TTS to narrate recipes. It's designed to make cooking easy, creative, and accessible for everyone.

🎥 App Demo

Smart Recipe Generator Demo

🌐 Live Demo →


⚡️ Key Features

🤖 AI-Powered Features

  • Configurable OpenAI Text Recipe Generation: Create unique recipes based on user-selected ingredients and dietary preferences (default text model: gpt-5-mini).
  • OpenAI GPT Image Generation: Automatically generate high-quality images of the recipes (default model: gpt-image-1).
  • Text-to-Speech (TTS): Narrate recipes aloud using AI-driven speech synthesis.
  • AI-Generated Tags: Recipes are automatically tagged with relevant keywords for better searchability.
  • Context-Aware Chat Assistant: Ask cooking-related questions about a recipe (e.g., substitutions, vegan options, prep time). Powered by the configurable OpenAI text model (default: gpt-5-mini), limited to the context of each recipe.

📋 Core Features

  • User Authentication: Secure login via Google OAuth using NextAuth.js.
  • Ingredient Selection: Choose from a database of ingredients or add your own.
  • Dietary Preferences: Support for vegan, gluten-free, keto, paleo, and more.
  • Recipe Management: Like, save, and share recipes.
  • Infinite Scrolling: Browse recipes seamlessly without pagination buttons.
  • Sort by Popularity or Newest: View recipes sorted by likes or creation date.
  • Tag-Based Search: Find recipes using AI-generated tags for ingredients and dietary relevance.
  • Notifications: Get real-time updates on activity (likes, comments, etc.).
  • Mobile-Responsive UI: Fully optimized for all devices.

🚀 Tech Stack

  • Frontend: Next.js, React, Tailwind CSS
  • Backend: Node.js, MongoDB
  • AI Integration: Configurable OpenAI text model (default: gpt-5-mini) for text features, OpenAI GPT Image (gpt-image-1) for images, TTS for narration
  • Authentication: NextAuth.js with Google OAuth
  • Cloud Storage: AWS S3 for storing images and audio
  • Deployment: Vercel

🛠️ Installation

1. Clone the Repository

git clone https://github.com/Dereje1/smart-recipe-generator.git
cd smart-recipe-generator

2. Install Dependencies

npm install

3. Set Up Environment Variables

Create a .env.local file and add:

NEXT_PUBLIC_API_BASE_URL=http://localhost:3000
NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=your-secret
GOOGLE_CLIENT_ID=your-google-client-id
GOOGLE_CLIENT_SECRET=your-google-client-secret
OPENAI_API_KEY=your-openai-api-key
OPENAI_TEXT_MODEL=gpt-5-mini
OPENAI_IMAGE_MODEL=gpt-image-1
AWS_ACCESS_KEY_ID=your-aws-access-key-id
AWS_SECRET_ACCESS_KEY=your-aws-secret-key
MONGO_URI=your-mongodb-uri
S3_BUCKET_NAME=your-s3-bucket-name
API_REQUEST_LIMIT=maximum-api-requests

4. Run the Development Server

npm run dev

App will be live at http://localhost:3000.


💡 Usage

  1. Log in with Google.
  2. Select Ingredients and Dietary Preferences.
  3. Generate Recipes powered by the configurable OpenAI text model (default: gpt-5-mini).
  4. View AI-Generated Images and Play Narrations.
  5. Search Recipes using AI-generated tags.
  6. Browse Recipes with infinite scrolling and sorting by newest or most liked.
  7. Save, Like, and Share your favorite recipes.
  8. Use the Chat Assistant to ask follow-up questions about a recipe (e.g. substitutions, dietary changes, or cook time).

🧪 Testing & Building

Unit Tests

Run Jest tests:

npm test

Generate a coverage report:

npm run coverage

Compile TypeScript

Check the entire project for type errors:

npm run compileTS

End-to-End Tests

Run all Cypress tests with the provided script which automatically starts the development server:

npm run test:e2e

For the interactive UI:

npx cypress open

📊 Contributing

Pull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.

If you like this project, give it a star!

It helps more people discover it.


🏆 Acknowledgements

About

Smart Recipe Generator is an AI-powered web app that creates unique recipes based on user-selected ingredients and dietary preferences. Built with Next.js and MongoDB, and deployed on Vercel.

Topics

Resources

Stars

64 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages