manupatel007 / mychef

:seedling: Recommend recipes based on what ingredients you have at home

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🌱 MyChef

tests

📦 Overview

MyChef is an application that helps you decide what meal to make based on what you have at home. Simply enter in ingredients you have at home and get back tasty plant-based recipes from top recipe websites.

⚙️ Setup

FYI: an installation of docker and docker-compose is required to run the application.

Define .env configuration in root directory of project to develop locally:

POSTGRES_USER=mychef
POSTGRES_PASSWORD=mychef
POSTGRES_DB=mychef_db
POSTGRES_HOST=db

⌨️ Commands

# Download trained ingredient extraction model
make download

# Pull application images
make pull

# Start application containers
make run

# Scrape recipes
make scrape

When you refresh the UI, you should start seeing recipes populating the DB and the ingredients search bar should be showing which ingredients the application has extracted thus far. To stop the scraper just CTR-C in the terminal with the running service.

🧭 Project Structure

Api

  • Developed with FastAPI - fast (async support), simple and very intuitive.
  • Endpoints:
    • /sources: website source for recipes
    • /sources/<id>/recipes: list of recipes from given source id
    • /ingredients: unique ingredients extracted from recipes (extractor trained using spaCy)

Frontend

  • Developed with Nuxt.js an intuitive framework built on top of Vue that supports server side rendering.
  • Also uses Vuetify for component styling

Scraper

  • Developed using Scrapy a framework for extracting data from websites.
  • For each source, a spider needs to be defined that extracts the data and makes post request to api with recipe

Search

  • Leverages MeiliSearch to filter recipes based on ingredient input

About

:seedling: Recommend recipes based on what ingredients you have at home

License:MIT License


Languages

Language:Python 73.9%Language:Vue 11.6%Language:JavaScript 7.4%Language:Shell 2.3%Language:Dockerfile 2.2%Language:Makefile 1.5%Language:Mako 0.8%Language:CSS 0.2%Language:HTML 0.2%