Giter VIP home page Giter VIP logo

mikeheft / bread_shop Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 0.0 384 KB

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.

Ruby 93.96% JavaScript 0.92% CSS 0.58% HTML 4.54%
baking bakingapp bread bread-baking

bread_shop's People

Contributors

mikeheft avatar

bread_shop's Issues

List breads by family

GET /family - Returns list of all breads broken up by family
GET /family/:name - Return all breads for specific family

assign family

Based on percentages in the recipe, perform a call_back to assign the recipe to a family

Tags for recipes

Add Tag model to allow users posting new recipes to select tags to describe their recipe

total percentage

#total_percentage

Returns total percentage of all ingredients. Number WILL be over 100%

schema

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

Create user recipe - endpoint

POST /users/:name/recipes

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.

Return is JSON:

{
    recipe_name: {
        total_percentage: integer,
        ingredients: [
            ingredient_name: string,
            amount: integer,
            unit: string,
            bp: integer,
        ]
    }
}

Comments

Add an endpoint that accepts comments for a recipe.
Comment - has_many RecipeComment belongs_to -Recipe and User

Welcome page

Add to welcome page to show routes, the format for consuming endpoints, and what the expected return should look like.

Stream.io

Utilize stream gem to have a feed for users

Error Handling

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

Nutrition Label

Research Nutrion Label APIs to be able to generate label based on ingredient list for a recipe

Weight calculcations

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.

Admin

Create Admin attribute to restrict who can see all users

Family

Create Family model which has a name and procedure

Stream.io Delete feeds in spec

Need a delete request to the stream api to delete feeds in the spec to ensure it doesn't become too bloated.

Specifically in feeds_request_spec.rb in feeds#flat spec. Maybe in a before or after all hook.

CI/CD

Setup up CI/CD with Travis or Circle.
Should run test suite and when merged to master push to production.

Would love if on successful builds, auto merge to master.
Also on each push to a branch, it runs the tests without having to submit PR

User login

GET /login
Should find or create a user based on incomming params.
Returned payload should contain JWT for authentication in interaction on further endpoints

user recipe show

GET /users/:name/recipes/:recipe_name

Returns JSON with recipe information, rating, favorite count, comments

{recipe_name: {
  ingredients: [...],
  total_percentage: integer,
  favorite_count: integer,
  rating: integer,
  comments: [...]
  }
}

ratings

POST /recipes/:id/rating

Takes an integer in the post body. On the server it is added to the aggregate and averaged with the other ratings.

Edit README

Edit README to show new endpoint for nutrition label.

Comments on recipe

Create Comment model for Recipe, allowing users to leave comments on recipes.

flour amounts

#flour_amts

Returns total amount of flour for a given recipe

Like/follows

Serializer response for the likes and follows for a recipe/user

show users recipes

GET /users/:name/recipes

Show a list of users recipes that they've created
Takes in params the JWT created when the user logs in through the client app.

{recipes: {
    id: integer,
    recipe_name: {
        total_percentage: integer,
        ingredients: [
            ingredient_name: string,
            amount: integer,
            unit: string,
            bp: integer,
        ]
    }
  }
}

conversion

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.