/CookBook

Primary LanguageTypeScriptMIT LicenseMIT

License: MIT Build DOI Github Issues Github Issues Github Pull Requests Github Pull Requests Commit Status codecov
MongoDB FastAPI React TypeScript Python



What is Cook Book ?

CookBook is a platform to search for recipes that can be made using the available ingredients.

  • Easy: CookBook is a very user friendly website, where you can just enter the ingredients available and the platform will suggest various recipes that can be made using these ingredients.

  • Convenient: Apart from saving you from the dilemma of deciding what to cook, it is meant to make your cooking experience convenient by suggesting detailed step-by-step recipes.

  • Flexible: You can add as little or as many ingredients as you want.

With over recipes, there is something in the store for everyone !

Content

| What's New | Installations | Examples | Style Checker & Code Fomatter | Code Coverage | Why CookBook? | Team | Support |



Demo



What's New?

improvements introduction

New features:

  • Make CookBook come online as a website: Cook Book Users don't need to install the backend and frontend anymore.
  • Add filtering system based on nutrition.
  • Created ingredient tags to simplify the searching.

Better Software Design

Installations

Access the website

Access this link Cook Book.

Trouble Shooting

If this page failed, try to change your network environment. Typically, we noticed some DNS resolve failures under NC State network. That may caused by NCSU's DNS server problem. You may try your home network or mobile hotspot instead.

If you still fail to load the site, try the following steps.

Backend Installation

To set up the back end, do:
Make sure you are in the base folder.

In order to run the application server, run the following commands:

cd api
pip install -r requirements.txt
python -m uvicorn main:app --reload

Refer to the Swagger section for sample API calls.

Trouble Shooting

In case you run into any issues running the above commands, some operating systems may require you to use python3 instead of python and pip3 instead of pip.

Frontend Installation

To set up the front end React app, do:

cd frontend
npm install

// if npm install fails, try this
npm install --legacy-peer-deps

To run the front end React app, do:

cd frontend
npm start

Examples

Old Functions

  • This is the CookBook HomePage that should automatically open in a browser after executing the command: 'npm start'

HomePage


  • The user can use the search bar to enter the ingredients one by one, and then proceed by clicking the arrow on the right.

HomePage


  • The user would then be redirected to the page showing the recipe suggestions.

HomePage


  • The details of a recipe can be viewed by simple clicking on a recipe from the list of recipes being displayed.

HomePage



New Functions Tutorials

  • Start the App by URL. case

  • Above content mentions that users may manually input keyword, and click on 'search tag' to create some keyword search tags to search recepies. Besides, users may also click on some "food tags" to search receipes without specific input. For example, we may select "milk" tag:

case


  • Then, we may have results shown as below:

case


  • What is more, if users are not sure that tags to be chosen, they are able to use sliders to set some values for [Calorie, Fat, Suger, Protain]. The filtered recepies will be shown after using this kind of search. For example, if we want receipes that fulfill some requirements as:

case


  • As former example cases, filtered results are displayed:

case

Style Checker and Code Fomatter

  • IDE and Style Checker: VSCode

  • Code Style Formatter: Beautify

  • Code Syntax Checker : Eslint for Vscode plugin.

Following extensions have to be added to you VS Code editor:

  • For Eslint: Install - dbaeumer.vscode-eslint
  • For Prettier: Install - esbenp.prettier-vscode
  • Update the settings.json of your VS Code editor to include these statements (you can add them to your existing ones):
{
  "editor.defaultFormatter": "esbenp.prettier-vscode",
  "eslint.alwaysShowStatus": true,
  "editor.formatOnSave": true,
  "editor.codeActionsOnSave": {
    "source.fixAll.eslint": true
  },
  "[json]": {
    "editor.defaultFormatter": "esbenp.prettier-vscode",
    "editor.formatOnSave": true
  }
}

Code Coverage

Codecov civ

Why CookBook?

  • Most of us might have been in a situation where you are craving for something to eat and due to some reason it won't be delivered to your place. And then you decide to cook it yourself you can't find a recipe with the ingredients you have.
  • In this fast-paced world, we are often confused about what can be cooked with the ingredients that are available right away.
  • CookBook addresses this issue and is designed to suggest recipes to you which would use the key ingredients that are available with you.
  • It not only suggests the recipe based on the ingredients entered by you, it also gives the ratings, step-by-step cooking instructions and other granular details about the recipe.
  • Apart from giving the user a smooth and a stress-free experience, it also serves as a platform to find recipes across multiple cuisines and cultures.
  • The interface of CookBook is somewhat similar to most of the search-engines, giving a sense of familiarity to the user. The user would have to just enter the available ingredients in a search bar and click on the proceed icon to get a list of suggestions for recipes.

Meet the Team

Version 1.0

Team

Version 2.x

  • Pinxiang Wang
  • Yuheng Zhu
  • Mengzhe Wang
  • Jiayuan Huang
  • Yiran Zhu

Support

You can find the dataset used for this project here

In case of any queries and for additional help, please email us at: help.cookbook@gmail.com