Skip to content
/ cuisine Public

Choose ingredients, choose the macros, let it do the rest

Notifications You must be signed in to change notification settings

yfe404/cuisine

Repository files navigation

Let R be a recipe composed of n ingredients. Each ingredient is denoted by its amount of calories c. The recipe R has a quantity q of each ingredient composing it. The goal is to find the right quantity q for each ingredient such that ∑i=0n c_i * q_i = T. T behing the target number of calories that you want for your recipe. Exemple: I want to make a recipe composed of oats, milk, eggs, flakseeds and peanut butter such that the total number of calories for the recipe is 600 kcal; how much of each ingredient should I take? This is the purpose of this repository.

How to use

Create a virtualenv

From within the directory of this readme:

python -m venv venv

Install dependencies

source venv/bin/activate
pip install -r requirements.txt

Run the server

bash run.sh

Access the web app

Go to https://localhost:7777/

If you need to add ingredients

Edit the variable datastore in the file templates/index.jinja2.

How it works

img/tuto.png

Roadmap

  • [X] Add ingredients
  • [X] Remove ingredients
  • [ ] Enable users to quickly find and select from a pre-populated list of values as they type an ingredient name
  • [ ] Handle more units (currently only grams, next: liters, units, etc.)
  • [ ] Can choose the range for proteins, carbohydrates and fats (eg. I want a 600kcal recipe with at least 30g of proteins)
  • [ ] Optimize the PRAL index (how acid the recipe is)
  • [ ] Error handling
  • … Don’t hesitate to add issues including the features you’d like to see

About

Choose ingredients, choose the macros, let it do the rest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published