An AI-powered mobile app that generates creative recipes from ingredients you have at home. Built with Flutter and OpenAI's GPT API.
- 🥘 Smart Recipe Generation: Input your available ingredients and get personalized recipes
- 🌍 Cuisine Preferences: Choose from Italian, Chinese, Indian, Mexican, Japanese, Thai, American, or any cuisine
- 🥗 Dietary Options: Support for Vegetarian, Vegan, Gluten-Free, Keto, and Low-Carb diets
- 📖 Detailed Instructions: Step-by-step cooking instructions with prep time and difficulty level
- 💾 Save Favorites: Bookmark your favorite recipes for quick access
- 📊 Nutritional Info: Get approximate calorie and macro information for each recipe
- Framework: Flutter
- State Management: Provider
- AI Integration: OpenAI GPT-3.5 Turbo API
- HTTP Client: http package
- Environment Variables: flutter_dotenv
- UI Fonts: Google Fonts (Poppins)
- Flutter SDK (3.0.0 or higher)
- Dart SDK
- Android Studio / Xcode (for emulators)
- OpenAI API Key
-
Clone the repository
git clone https://github.com/yourusername/chefgpt_ai_recipe.git cd chefgpt_ai_recipe -
Install dependencies
flutter pub get
-
Set up environment variables
- Create a
.envfile in the root directory - Add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here - Get your API key from: https://platform.openai.com/api-keys
- Create a
-
Run the app
flutter run
lib/
├── main.dart # App entry point
├── models/
│ └── recipe.dart # Recipe data model
├── services/
│ └── openai_services.dart # OpenAI API integration
├── screens/
│ ├── home_screen.dart # Home screen with navigation
│ ├── recipe_generator_screen.dart # Recipe generation interface
│ ├── recipe_detail_screen.dart # Detailed recipe view
│ └── saved_recipes_screen.dart # Saved recipes list
└── widgets/
├── ingredient_chip.dart # Ingredient tag widget
└── recipe_card.dart # Recipe card component
This project was built using AI-assisted development (Vibe Coding) to accelerate the development process:
- Code Generation: Used AI tools (GitHub Copilot, ChatGPT) to generate boilerplate code and UI components
- API Integration: AI helped structure the OpenAI API calls and JSON parsing logic
- Error Debugging: Quick troubleshooting of import paths and dependency issues
- UI/UX Design: AI suggestions for color schemes, layouts, and user flow
- Documentation: AI-assisted README and code comments generation
- "Create a Flutter recipe model with all necessary fields"
- "Generate a service class for OpenAI API integration with error handling"
- "Build a Material 3 UI for ingredient input with chips"
- "Fix import path errors in Flutter project structure"
- Add Ingredients: Enter ingredients you have (e.g., "chicken, tomatoes, onions")
- Set Preferences: Optionally choose dietary restrictions and cuisine type
- Generate Recipe: Tap "Generate Recipe with AI" and wait for your personalized recipe
- View Details: See ingredients, step-by-step instructions, and nutritional info
- Save Favorites: Bookmark recipes you love for later
The app uses OpenAI's GPT-3.5-turbo model. To use your own API key:
- Sign up at https://platform.openai.com
- Generate an API key
- Add it to your
.envfile (never commit this file!) - The app will automatically load it on startup
Note: API calls cost money. Monitor your usage at https://platform.openai.com/usage
Run the app in debug mode to test features:
flutter run --debugFor production build:
flutter build apk --release # Android
flutter build ios --release # iOSMulaveesala Pranaveswar
- GitHub: @Pranaveswar19
MIT License - see LICENSE file for details
Made with ❤️ using Flutter and AI