Skip to content

Implement a Recipe book #3

@DemonusPC

Description

@DemonusPC

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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions