Rails API that takes in recipe information and calculates the baker's percentage to return a family for that recipe. With the family set, a user can see a basic procedure to make and bake that recipe for the family of bread. Also it will calculate new totals based on the desired amount of bread.
User has many recipes through user recipes
Recipe has many ingredients through recipe ingredients
Recipe has many ratings
Recipe has many comments
Comment belongs to recipe
Rating belongs to recipe
User has many favorites through recipes(Favorites is the joins table)
Recipe name user:references Ingredient name RecipeIngredient recipe_id, ingredient_id amount Like user_id recipe_id Favorite recipe_id user_id Comment title body recipe_id
Should take in params containing ingredients with amounts for each ingredient.
Takes in params the JWT created when the user logs in through the client app.
Need to ensure that errors are being handled in the best way possible.
Don't want the app to crash due to unhandled errors EDIT: focus on 3rd party services that have rate limits
Given a recipe w/ amounts alrady, when the user submits the amount of individual pieces and the weights of each piece with the return being the updated amounts for each ingredient.
Based off of the total percentage for a recipe, the request should be able to take in a number of units with a given weight for each to get a desired total dough weight.
With that dough weight and the percentages for each ingredient, the return should be the new amounts in the recipe.
GET /login
Should find or create a user based on incomming params.
Returned payload should contain JWT for authentication in interaction on further endpoints
If the incoming ingredient amount is less than zero convert to ounces.
Also convert decimals in between pounds to ounces.(1.25lbs == 1lbs 4oz) and vice versa.