The Rails cook book app keeps track of all your recipes, ingredients, and inventory. It will allow you to save ingredients, keep track of what you have, create recipes, and generate a shopping list based on what you have and what you are missing from a recipe.

  • By Ben Kiarie
  • Last update: Dec 22, 2022
  • Comments: 11

Rails-cook-book

The Rails cook book app keeps track of all your recipes and ingredients for the recipe. It will allow you to save ingredients, keep track of what you have, create recipes, and generate a shopping list based on what you have and what you are missing from a recipe. Also, since sharing recipes is an important part of cooking the app should allow you to make them public so anyone can access them.

Preview

Getting Started

To get a local copy up and running follow these simple steps.

  1. Clone the repo
    git clone https://github.com/your_username_/Project-Name.git
  2. Goto project directory
    cd recipe-app
  3. Configure Database
    change the .env credentials with your postgres username and password 
    run rails db:reset
    
  4. Run app
    rails server
    or
    rails s

Testing

bundle exec rspec will run all the tests.

This project was built with

  • Ruby on Rails

  • PostgreSQL

  • Bootstrap CSS Framework

Author 1

👤 Ben

Author 2

👤 Ezekiel Utshudi

🤝 Contributing

Contributions, issues, and feature requests are welcome!

Feel free to check the issues page.

Show your support

Give a ⭐️ if you like this project!

Acknowledgement

📝 License

This project is MIT licensed.

Github

https://github.com/Benmuiruri/rails-cook-book

Comments(11)

  • 1

    RoR group project: set up your Kanban board

    In this first milestone, our group was able to:

    • Successfully create and copy our Kanban cards
    • Create issues for group tasks and each group member Assign tasks to the group and group members

    Our group consists of 2 members and we are:

    1. @EzekielUtshudi - Team Member # 1
    2. @Benmuiruri Team Member # 2

    The Link to our project is Rails Cook Book

    Thank you for taking the time to review this Issue 🙏

  • 2

    Rails-cook Book version 1

    Hello Reviewer 👋 , thank you for taking the time to review our PR.

    What does this PR do?

    • Add Login page and registration page built with Devise.

    Food list:

    • display a list of food added by the logged-in user as in the wireframe
    • lead to a form that allows users to add new food.

    Recipes list:

    • display a list of recipes created by the logged-in user as in the wireframe.
    • lead to recipe details.
    • If the user is the owner of the recipe, it allows the user to delete it.

    Public recipe list:

    • display a list of all public recipes ordered by newest as in the wireframe.
    • lead to recipe details.

    Recipe details:**

    • If the recipe is public or the user is the owner of the recipe, it displays the recipe details as in the wireframe.
    • If the user is the owner of the recipe, it will lead to the form that allows the user to add new food.

    General shopping list view :

    • show the list of food that is missing for all recipes of the logged-in user
    • count the total food items and total price of the missing food.

    We made sure there are no N+1 queries happening.

    • Create a navigation menu that allows users to open all of the pages you created.

    We worked in a group of two:

    @Benmuiruri and @EzekielUtshudi

    Thanks for your time and effort to review our code ,

  • 3

    Final touches

    Hello @EzekielUtshudi :wave: , thank you for taking the time to review my PR.

    What does this PR do?

    :heavy_check_mark: Check and fix N+1 query issues :heavy_check_mark: Authenticate only recipe creator can see delete button :heavy_check_mark: Authenticate only recipe creator can see generate shopping list button :heavy_check_mark: Excempt public_recipes from authentication :heavy_check_mark: Install font awesome gem and import it in application.css.scss :heavy_check_mark: Add patch route for recipe :heavy_check_mark: Add update action in recipe controller :heavy_check_mark: Add font awesome toggle button in recipe show page

    How should it be tested

    • checkout the branch git checkout final-touches -install gems bundle install
    • start server rails s

    Thanks for your time and effort to review my code.

  • 4

    Optimization using bullet gem

    Hello @EzekielUtshudi :wave: , thank you for taking the time to review my PR.

    What does this PR do?

    :heavy_check_mark: Install Bullet gem and check for unoptimized queries :heavy_check_mark: Center header and add margin top in food index page

    How should it be tested

    • checkout the branch git checkout optimization -install gems bundle install
    • start server rails s

    Thanks for your time and effort to review my code.

  • 5

    Tests

    Hey @Benmuiruri In this milestone we have added the following :

    • Add unit specs for all of the Recipe model validations.
    • Create a Request spec file for all Recipe controllers.
    • Test if response status was correct.
    • Test if a correct template was rendered.
    • Test if the response body includes correct placeholder text.
    • Install the Capybara gem
    • Use Capybara to write integration tests for each view in the project.
    • Add unit specs for all of the User models' validation

    **ENJOY REVIEWING OUR WORK OF @Benmuiruri AND @EzekielUtshudi **

  • 6

    Shopping list

    Hey, @Benmuiruri in this PR I Implemented the following 👍

    • Add the shopping list
    • Add the header for the general list
    • add the route to general shopping list
    • add the general shopping table
  • 7

    Update Main Index landing page

    Blog app - creating data model

    Hello @EzekielUtshudi :wave: , thank you for taking the time to review my PR.

    What does this PR do?

    :heavy_check_mark: Create seed.rb file with data to quickly populate the database :heavy_check_mark: Add toggle icon in recipe show page :heavy_check_mark: Add carousel of 3 recipes in main index page :heavy_check_mark: Add video section in main index page :heavy_check_mark: Add footer

    How should it be tested

    • checkout the branch git checkout root-page -install gems bundle install
    • start server rails s

    Thanks for your time and effort to review my code.

  • 8

    Testing food

    • Add unit specs for all of Food models validations.
    • Install Rspec
    • Create a Request spec file for all Food controllers.
    • Test if response status was correct.
    • Test if a correct template was rendered.
    • Test if the response body includes correct placeholder text
    • Add the shopping list
  • 9

    Add recipe foods feature

    Blog app - creating data model

    Hello @EzekielUtshudi :wave: , thank you for taking the time to review my PR.

    What does this PR do?

    :heavy_check_mark: Add delete button in recipe show view :heavy_check_mark: Update navlinks in header :heavy_check_mark: Add button to add recipe in recipes index view :heavy_check_mark: Add link to foods in header :heavy_check_mark: Add header and callout image in food index view :heavy_check_mark: Add validations for recipe model :heavy_check_mark: Add RecipeFoods controller :heavy_check_mark: Add form to add foods to a recipe :heavy_check_mark: Add table to display foods associated with a recipe

    How should it be tested

    • checkout the branch git checkout recipe-foods -install gems bundle install
    • start server rails s

    Thanks for your time and effort to review my code.

  • 10

    Food-controllers

    ### Hey reviewer I have done the following in this PR :

    • Add routes related to Food Controller
    • Add index and delete actions in Food Controller
    • Add route for new Food action
    • Add form to add new food
    • Handle form submission in Food controller
  • 11

    Add Recipe Feature

    Blog app - creating data model

    Hello @EzekielUtshudi :wave: , thank you for taking the time to review my PR.

    What does this PR do?

    :heavy_check_mark: Added recipe index action and view :heavy_check_mark: Added new stylesheets for styling :heavy_check_mark: Added a callout image in the main index view :heavy_check_mark: Added a callout image in the post index view :heavy_check_mark: Added a callout image in the post show view :heavy_check_mark: Added a form to create a new Recipe :heavy_check_mark: Added create action to handle form and add new recipe in database :heavy_check_mark: Update navbar links

    How should it be tested

    • checkout the branch git checkout recipe -install gems bundle install
    • start server rails s

    Thanks for your time and effort to review my code.