The Recipe Generator is a web application that allows users to input the name of a dish and get the recipe for that dish. It combines a user-friendly frontend with a backend to provide recipe information using AI-generated responses.
You can explore the live site here: Recipe Generator
-
Frontend:
- Vite
- Vue.js
- Shadcn UI
- Tailwind CSS
-
Backend:
- Python FastAPI
- Gemini AI
-
Navigate to the client directory:
cd client
-
Install the dependencies:
npm install
-
Start the development server:
npm run dev
-
Install the required Python packages:
pip install -r requirements.txt
-
Start the FastAPI server:
uvicorn main:app --reload
- Open the frontend website in your browser.
- Enter the name of a dish into the input field.
- The website will display the recipe for the specified dish.
- Endpoint:
/generate
- Method:
POST
- Request Body:
{ "question": "string", "additional_instructions": "string", "dietary_restrictions": ["string"], "language": "string" }
- Response:
{ "status": "success", "message": "Recipe generated successfully", "data": { "recipe": { "name": "string", "ingredients": [ { "name": "string", "amount": "string" } ], "steps": [ { "description": "string", "tips": "string" } ], "suggested_pairings": [ { "dish_name": "string", "description": "string" } ] } } }
- Endpoint:
/generate_by_ingredients
- Method:
POST
- Request Body:
{ "ingredients": ["string"], "additional_instructions": "string", "dietary_restrictions": ["string"], "language": "string" }
- Response:
{ "status": "success", "message": "Recipe generated successfully", "data": { "recipe": { "name": "string", "ingredients": [ { "name": "string", "amount": "string" } ], "steps": [ { "description": "string", "tips": "string" } ], "suggested_pairings": [ { "dish_name": "string", "description": "string" } ] } } }
- Endpoint:
/upload_image
- Method:
POST
- Request Body:
FormData: { "file": File, "additional_instructions": "string", "dietary_restrictions": ["string"], "language": "string" }
- Response:
{ "status": "success", "message": "Recipe generated successfully", "data": { "recipe": { "name": "string", "ingredients": [ { "name": "string", "amount": "string" } ], "steps": [ { "description": "string", "tips": "string" } ], "suggested_pairings": [ { "dish_name": "string", "description": "string" } ] } } }
- Endpoint:
/
- Method:
GET
- Response:
{ "message": "Welcome to Recipe Generator" }
Contributions and feedback are welcome! If you would like to contribute to this project or have any comments, please feel free to open an issue or submit a pull request.