A web application built with ASP.NET Core that leverages AI to generate unique recipes based on the ingredients selected by the user. The recipes are generated through API calls and can be saved to a database for future reference.
- Ingredient-Based Recipe Generation: Select ingredients, and the AI generates creative recipes tailored to your input.
- Database Integration: Save recipes to your account for future access.
- User-Friendly Interface: Intuitive design to make recipe discovery fun and easy.
Follow these instructions to get a local copy of the project up and running.
- .NET 8.0 SDK
- Cohere API Key (required for recipe generation)
- A database (e.g., SQL Server or another supported by ASP.NET Core EF Core)
-
Clone the repository:
git clone https://github.com/yourusername/ai-recipe-generator.git cd ai-recipe-generator
-
Set up the API Key:
- Open the
appsettings.json
file in the root directory. - Add your Cohere API key under the
ApiKey
field:"CohereSettings": { "ApiKey": "Your_API_Key" }
- Open the
-
Restore dependencies:
dotnet restore
-
Set up the database:
- Update the connection string in
appsettings.json
underConnectionStrings
:{ "ConnectionStrings": { "database": "Your_main_database", "identityDatabase": "Your_user_info_database" } }
- Apply migrations to set up the database schema:
dotnet ef database update
- Update the connection string in
-
Run the application:
dotnet run
The application will be available at
http://localhost:44154
.
- Login.
- Navigate to the Ingredients page using the navbar.
- Select the ingredients you have on hand.
- Click the "Generate Recipe" button on the home page to receive AI-powered recipe suggestions.
- Optionally, save recipes to your account for future use.
- ASP.NET Core: Backend framework
- Entity Framework Core: ORM for database operations
- Cohere API: AI-powered recipe generation
- Bootstrap: Frontend styling
Contributions are welcome! To contribute:
- Fork the repository.
- Create a new branch for your feature/bugfix:
git checkout -b feature-name
- Commit your changes:
git commit -m "Add feature-name"
- Push to your branch:
git push origin feature-name
- Open a pull request.
Enjoy using the AI-Powered Recipe Generator! 🍳