Skip to content

rulkimi/recipe-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

55 Commits
 
 
 
 
 
 

Repository files navigation

Recipe Generator

Project Overview

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

Tech Stack

  • Frontend:

    • Vite
    • Vue.js
    • Shadcn UI
    • Tailwind CSS
  • Backend:

    • Python FastAPI
    • Gemini AI

Installation

Frontend

  1. Navigate to the client directory:

    cd client
  2. Install the dependencies:

    npm install
  3. Start the development server:

    npm run dev

Backend

  1. Install the required Python packages:

    pip install -r requirements.txt
  2. Start the FastAPI server:

    uvicorn main:app --reload

Usage

  1. Open the frontend website in your browser.
  2. Enter the name of a dish into the input field.
  3. The website will display the recipe for the specified dish.

API Documentation

  • 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"
            }
          ]
        }
      }
    }

Generate Recipe by Ingredients

  • 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"
            }
          ]
        }
      }
    }

Upload Image for Recipe

  • 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"
            }
          ]
        }
      }
    }

Root

  • Endpoint: /
  • Method: GET
  • Response:
    {
      "message": "Welcome to Recipe Generator"
    }

Contributing

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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published