AI-Powered Recipe Generation Platform
Flavor Fusion is an innovative AI-powered recipe generation platform that helps users create delicious recipes based on their preferences, ingredients, and dietary requirements. Whether you're looking to use up leftovers or explore new culinary adventures, Flavor Fusion makes cooking accessible and exciting for everyone.
- Smart Recipe Creation: Generate personalized recipes using advanced AI (Groq/OpenAI)
- Ingredient-Based Recipes: Turn your available ingredients into delicious meals
- Dietary Preferences: Support for vegetarian, vegan, gluten-free, and other dietary restrictions
- Indian Cuisine Focus: Specialized in generating authentic Indian recipes with detailed instructions
- Ingredient Photo Recognition: Upload photos of ingredients to get matching recipes
- Recipe Gallery: Browse through curated recipe collections
- Visual Recipe Cards: Beautiful presentation of generated recipes
- Secure Authentication: Google OAuth integration via NextAuth.js
- User Profiles: Personalized cooking preferences and dietary restrictions
- Recipe Cookbook: Save and organize your favorite generated recipes
- Password Recovery: Secure forgot password functionality
- Payment Integration: Subscription-based premium features
- Advanced Recipe Options: Enhanced AI capabilities for premium users
- Priority Support: Faster recipe generation for subscribers
- Framework: Next.js 15.1.6 with App Router
- Language: TypeScript 5
- Styling: Tailwind CSS with custom components
- UI Components: Radix UI primitives
- Icons: Lucide React & React Icons
- Authentication: NextAuth.js with Google provider
- Database: PostgreSQL with Prisma ORM
- API Routes: Next.js API routes
- Authentication: NextAuth.js with Prisma adapter
- Password Hashing: bcrypt
- Primary AI: Groq API (llama3-70b-8192 model)
- Fallback: OpenAI API
- Image Processing: Streamlit app for ingredient recognition
- Linting: ESLint with Next.js configuration
- Package Manager: npm
- Version Control: Git
- Node.js 18+ and npm
- PostgreSQL database
- Groq API key (or OpenAI API key)
- Google OAuth credentials (for authentication)
-
Clone the repository
git clone <repository-url> cd PR2012/pr201
-
Install dependencies
npm install
-
Environment Setup
Create a
.envfile in thepr201directory:# Database DATABASE_URL="postgresql://username:password@localhost:5432/flavor_fusion" # NextAuth NEXTAUTH_SECRET="your-nextauth-secret" NEXTAUTH_URL="http://localhost:3000" # Google OAuth GOOGLE_CLIENT_ID="your-google-client-id" GOOGLE_CLIENT_SECRET="your-google-client-secret" # AI APIs (use one or both) NEXT_PUBLIC_GROQ_API_KEY="your-groq-api-key" OPENAI_API_KEY="your-openai-api-key"
β οΈ Security Note: Never commit API keys to version control. Use environment variables and add.envto.gitignore. -
Database Setup
npx prisma generate npx prisma db push
-
Start the development server
npm run dev
-
Access the application
- Main app: http://localhost:3000
- Ingredient recognition: http://localhost:8501 (if Streamlit app is running)
-
Text-Based Generation:
- Enter a recipe idea or list of ingredients
- Specify dietary preferences (vegetarian, vegan, etc.)
- Click "Generate" to create personalized recipes
-
Ingredient Photo Upload:
- Use the "FIND INGREDIENT" feature
- Upload photos of available ingredients
- Get matching recipe suggestions
-
Recipe Customization:
- Specify serving sizes
- Include cooking time preferences
- Add allergy restrictions
- Sign Up/Login: Use Google OAuth for secure authentication
- Profile Management: Set dietary preferences and cooking skill level
- Recipe Cookbook: Save and organize favorite recipes
- Sharing: Share recipes with friends and family
POST /api/recipe
Body: { "prompt": "recipe description or ingredients" }
Response: { "recipe": "generated recipe content" }
POST /api/register # User registration
POST /api/auth/[...nextauth] # Authentication (Google OAuth)
POST /api/forgot-password # Password recovery
POST /api/payment # Handle subscription payments
npm run dev # Start development server
npm run build # Build for production
npm run start # Start production server
npm run lint # Run ESLintnpx prisma studio # Open Prisma Studio
npx prisma generate # Generate Prisma client
npx prisma db push # Push schema changes
npx prisma db pull # Pull schema from database- API Key Management: Store all API keys in environment variables
- Authentication: Secure OAuth implementation with NextAuth.js
- Database Security: Use Prisma for safe database queries
- Password Security: bcrypt hashing for user passwords
- CORS: Proper CORS configuration for API endpoints
- Connect your GitHub repository to Vercel
- Configure environment variables in Vercel dashboard
- Deploy automatically on push to main branch
-
Build the application:
npm run build
-
Start the production server:
npm start
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
- Follow TypeScript best practices
- Use Tailwind CSS for styling
- Write meaningful commit messages
- Test your changes thoroughly
- Ensure API keys are never hardcoded
This project is licensed under the ISC License.
If you encounter any issues or have questions:
- Check the FAQ section in the app
- Review the troubleshooting guide below
- Open an issue on GitHub
- Contact the development team
Recipe generation fails:
- Verify your Groq/OpenAI API key is valid
- Check API rate limits
- Ensure proper environment variable configuration
Authentication issues:
- Verify Google OAuth credentials
- Check NEXTAUTH_URL configuration
- Ensure database connection is working
Database connection errors:
- Verify PostgreSQL is running
- Check DATABASE_URL format
- Run
npx prisma generateafter schema changes
- Next.js Team for the amazing framework
- Groq for powerful AI capabilities
- Prisma for excellent database tooling
- Tailwind CSS for beautiful styling
- NextAuth.js for secure authentication
Made with β€οΈ by the Flavor Fusion Team
Bringing AI-powered cooking to kitchens worldwide ππ¨βπ³π©βπ³