Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a Recipe book #3

Open
DemonusPC opened this issue Jun 17, 2020 · 0 comments
Open

Implement a Recipe book #3

DemonusPC opened this issue Jun 17, 2020 · 0 comments
Labels
enhancement New feature or request
Milestone

Comments

@DemonusPC
Copy link
Owner

Adding single products is sufficient for most cases. This has also been extended with custom portion sizes. However for more complex objects this can be tedious, especially if dieting or meal prepping where the recipie sizes will be quite standard.
This issue proposes:

Backend

  • Adding a recipies back end api
    • A separate search api for recipies
    • Listing all recipies
    • Getting a single recipie
    • Createing a new recipie
    • Updating an existing recipie
    • Deleting a recipie

Three more tables:

  • Recipes, this is the top level table containing the general recipe details
  • RecipeEntries this table will contain all the product and mass relationships to the recipes
    • It will contain the foreign key to the recipe
    • Foreign key to the product id
    • The mass in grams/ml of the product
  • Servings: this will be the portions table but for Recipies

There are 2 ways of doing this:

  • Perform 2 db queries. One for the top level recipe and one a join select for the recipie entries
  • Perform a union select and return a large flat structure that I will then be filtered out. (As with hierarchies)

Frontend

  • A new page: Recipe

  • The page should be similar to the Products page.

    • There should be a search bar
    • The user should be able to search all available recipes by name
  • Instead of in page product information the user shuld be redirected to the single recipe page

  • The recipe page should contain

    • Name
    • Total Nutritional information
    • Products in the recipe
  • The page should not include instructions on how to make the recipe.

  • The user should be able to recalculate the nutritional information based off

    • Grams
    • Serving
    • Or any other portion size the user can add
  • The recipe page should have a link to delete the recipe

  • Add Recipie page

    • A form similar to the product one
    • Additionally there should be a product form similar to the portions form where the user can enter products and their sizes. (In fact they will most likelly be identical)
@DemonusPC DemonusPC added the enhancement New feature or request label Jun 17, 2020
@DemonusPC DemonusPC added this to the V1.0 milestone Jun 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant