Your AI Kitchen Companion. Transform ingredients into delicious meals in seconds.
ChefMate is an intelligent recipe generator powered by AI that helps you create personalized recipes from ingredients you have on hand. Reduce food waste, save time meal planning, and discover new dishes tailored to your dietary preferences.
π Live Demo: https://ai-recipe-generator-raj.vercel.app/
- π€ AI-Powered Recipe Generation - Generate 3-5 personalized recipes in seconds using OpenAI
- π₯ Dietary Restrictions - Support for 10+ dietary preferences (vegan, keto, gluten-free, etc.)
- π Multi-Cuisine Support - 13 cuisines from Italian to Vietnamese
- β‘ Smart Ingredient Matching - Works with partial lists and suggests missing ingredients
- π± Mobile-First Design - Fully responsive with dedicated mobile navigation
- π Dark Mode - System-aware theme switching
- πΎ Local Storage - Save recipes, history, and preferences (privacy-first, no server storage)
- π Bookmark System - Save your favorite recipes for quick access
- π Recipe History - Track the last 20 recipes you've generated or viewed
- π Search & Filter - Find recipes by name, cuisine, meal type, or difficulty
- π² Surprise Me - Random recipe generation for when you're feeling adventurous
- π¨οΈ Print-Friendly - Clean print layouts optimized for A4 paper
- π Easy Sharing - Share recipes via Twitter, Facebook, WhatsApp, or copy link
- π Serving Size Adjuster - Scale recipes from 0.5x to 3x servings
- π Nutritional Information - Estimated calories, protein, carbs, and fat per serving
- β±οΈ Cooking Time Filters - Filter by prep time (15min, 30min, 60min+)
- π½οΈ Occasion-Based Browsing - Quick weeknight dinners, meal prep, party appetizers
- βΏ Full Accessibility - WCAG AA compliant with keyboard navigation and screen reader support
- π Performance Optimized - Server-side rendering, code splitting, and optimized bundles
- Node.js 18+
- pnpm (recommended) or npm
- OpenAI API key (Get one here)
-
Clone the repository
git clone https://github.com/D-Raj-Grg/AI-Recipe-Generator.git cd AI-Recipe-Generator -
Install dependencies
pnpm install # or npm install -
Set up environment variables
cp .env.local.example .env.local
Edit
.env.localand add your OpenAI API key:OPENAI_API_KEY=sk-your-actual-api-key-here NEXT_PUBLIC_APP_URL=http://localhost:3000
-
Run the development server
pnpm dev # or npm run dev -
Open in browser Navigate to http://localhost:3000
- Next.js 15 - React framework with App Router
- TypeScript - Type-safe JavaScript
- React 19 - UI library
- Tailwind CSS - Utility-first CSS framework
- shadcn/ui - Re-usable component library
- Radix UI - Accessible component primitives
- Lucide React - Beautiful icon library
- Framer Motion - Animation library
- Zustand - Lightweight state management
- localStorage - Client-side recipe persistence
- OpenAI API - GPT-4o for recipe generation
- Vercel Analytics - Privacy-friendly analytics
- Speed Insights - Real user monitoring
AI-Recipe-Generator/
βββ src/
β βββ app/ # Next.js App Router pages
β β βββ api/ # API routes
β β β βββ recipe/
β β β βββ generate/ # Recipe generation endpoint
β β βββ contact/ # Contact page
β β βββ explore/ # Recipe exploration page
β β βββ faq/ # FAQ page
β β βββ generate/ # Main recipe generator
β β βββ history/ # Recipe history page
β β βββ preferences/ # User preferences page
β β βββ privacy/ # Privacy policy
β β βββ recipe/[id]/ # Recipe detail pages
β β βββ saved/ # Bookmarked recipes
β β βββ terms/ # Terms of service
β β βββ layout.tsx # Root layout
β β βββ page.tsx # Landing page
β β βββ globals.css # Global styles
β β βββ not-found.tsx # 404 page
β β βββ error.tsx # Error boundary
β β βββ sitemap.ts # Sitemap generation
β β βββ robots.ts # Robots.txt
β βββ components/ # React components
β β βββ filters/ # Filter components
β β βββ navigation/ # Navigation components
β β βββ recipe/ # Recipe-related components
β β βββ ui/ # shadcn/ui components
β βββ lib/ # Utility libraries
β β βββ analytics.ts # Event tracking utilities
β β βββ openai.ts # OpenAI client
β β βββ prompts.ts # Recipe generation prompts
β β βββ types/ # TypeScript types
β β βββ utils.ts # Helper functions
β βββ store/ # State management
β βββ useRecipeStore.ts # Zustand store
βββ public/ # Static assets
β βββ icon.svg # Favicon
β βββ manifest.json # PWA manifest
βββ .env.local.example # Environment variables template
βββ tailwind.config.ts # Tailwind configuration
βββ tsconfig.json # TypeScript configuration
βββ components.json # shadcn/ui configuration
βββ CLAUDE.md # Development guide
βββ PRD.md # Product requirements
βββ PLANNING.md # Product planning
βββ TASKS.md # Task tracker
- Primary: Orange/Amber gradient (
hsl(32 95% 44%)) - Appetizing warmth - Secondary: Emerald (
hsl(160 84% 39%)) - Fresh, healthy - Accent: Rose (
hsl(346 77% 50%)) - Spicy, exciting - Background (Light): Warm cream (
hsl(33 100% 97%)) - Background (Dark): Deep slate (
hsl(222 47% 11%))
All colors use CSS variables with separate light/dark mode values. Components reference colors via Tailwind classes like bg-primary, text-muted-foreground.
- System Fonts - Native font stack for optimal performance
- Font Sizes - Minimum 16px for readability
- Line Height - Optimized for reading recipes
# Development
pnpm dev # Start dev server (localhost:3000)
pnpm build # Create production build
pnpm start # Run production build locally
pnpm lint # Run ESLint
# Testing
pnpm lint # Check code quality
# Dependencies
pnpm install # Install all dependencies
pnpm add <package> # Add new dependency- Push your code to GitHub
- Import your repository on Vercel
- Add environment variables:
OPENAI_API_KEY- Your OpenAI API keyNEXT_PUBLIC_APP_URL- Your production URL
- Deploy!
Vercel automatically enables:
- β Analytics
- β Speed Insights
- β Automatic HTTPS
- β CDN distribution
- β Preview deployments
- Netlify: Use
next buildand deploy the.nextfolder - Docker: Dockerfile can be added for containerized deployment
- Self-hosted: Run
pnpm build && pnpm starton your server
ChefMate follows a privacy-first approach:
- β No server-side storage - All recipes stored locally in your browser
- β Minimal data collection - Only anonymous analytics via Vercel
- β OpenAI API - Ingredient data sent temporarily for generation only
- β No tracking cookies - GDPR compliant by design
- β Open source - Full code transparency
See Privacy Policy for details.
- GPT-4o: ~$0.005 per recipe generation (recommended)
- GPT-4o-mini: ~$0.0001 per recipe generation (budget-friendly)
With 15 recipes/hour rate limiting:
- GPT-4o:
$0.075/hour max ($54/month at full capacity) - GPT-4o-mini:
$0.0015/hour max ($1/month at full capacity)
- Hobby Plan: FREE (includes 100GB bandwidth, Analytics)
- Pro Plan: $20/month (for production apps with custom domains)
We welcome contributions! Please see CONTRIBUTING.md for guidelines.
Quick start for contributors:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run
pnpm lintandpnpm buildto verify - Commit your changes (
git commit -m 'Add amazing feature') - Push to your branch (
git push origin feature/amazing-feature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- OpenAI - For the amazing GPT-4o model
- Vercel - For hosting and deployment platform
- shadcn/ui - For the beautiful component library
- Tailwind CSS - For the utility-first CSS framework
- Issues: GitHub Issues
- Discussions: GitHub Discussions
- Email: [email protected]
- Website: https://ai-recipe-generator-raj.vercel.app/
- Recipe generation
- Ingredient input
- Dietary restrictions
- Recipe detail pages
- Bookmark system
- Recipe history
- Preferences management
- Serving size adjustment
- Explore page
- Search functionality
- Print/share features
- Mobile navigation
- Legal pages (Terms, Privacy, FAQ, Contact)
- Footer with links
- Analytics integration
- Performance optimization
- Cross-browser testing
- User accounts (optional cloud sync)
- Shopping list generation
- Meal planning calendar
- Recipe ratings and reviews
- Social features (share recipes with community)
- Mobile app (React Native)
- Recipe image generation (DALL-E)
- Voice input for ingredients
- Multi-language support
Made with β€οΈ by the ChefMate Team
β Star us on GitHub if you like ChefMate!
Website β’ Report Bug β’ Request Feature