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
- 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.
- 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.
- 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
git clone https://github.com/Dereje1/smart-recipe-generator.git
cd smart-recipe-generatornpm installCreate 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-requestsnpm run devApp will be live at http://localhost:3000.
- Log in with Google.
- Select Ingredients and Dietary Preferences.
- Generate Recipes powered by the configurable OpenAI text model (default: gpt-5-mini).
- View AI-Generated Images and Play Narrations.
- Search Recipes using AI-generated tags.
- Browse Recipes with infinite scrolling and sorting by newest or most liked.
- Save, Like, and Share your favorite recipes.
- Use the Chat Assistant to ask follow-up questions about a recipe (e.g. substitutions, dietary changes, or cook time).
Run Jest tests:
npm testGenerate a coverage report:
npm run coverageCheck the entire project for type errors:
npm run compileTSRun all Cypress tests with the provided script which automatically starts the development server:
npm run test:e2eFor the interactive UI:
npx cypress openPull requests are welcome! For major changes, please open an issue first to discuss what you would like to change.
It helps more people discover it.
