Recipe Storing Application built with Ruby on Rails

So as part of the Ruby on Rails developer course I have been studying on Udemy I have built a fully functional application. This project produced a Recipe Storing web application. The application has the ability to store and share recipes. Each recipe can have a list of ingredients added to it and users (or Chefs) can place comments against each of the recipes. It has a user authentication system for logging in or signing up new users (or Chefs). Only authenticated Chefs can add new recipes or place comments. I have also implemented admin users. These users have special privileges to remove or modify Chefs or comments, etc. Only admin users can add to the list of ingredients.

A really cool feature of the application is the ChefChat. The ChefChat is the ability for Chefs to send messages to each other in real-time. Messages appear immediately for all logged in Chefs on all devices. Recipe comments also has this real-time feature.

Ruby on Rails development

This project was a great way to showcase a web application built with the Ruby on Rails framework. As a result, I was able to to explore a variety of database models. These models included one-to-many and many-to-many relationships. All operations of CRUD have been implemented on the site. A User authentication system was implemented and this included the implementation of secure passwords and session management.

The focus of the project was not on Styling. However, the site was styled using Bootstrap 3 which achieved a menu driven and moble-friendly site.

To achieve “real-time” site updates feature (such as the ChefChat) the WebSocket functionality was utilised via the ActionCable class.

Environment and Process

The project was developed through the online IDE called Cloud9, which is now part of AWS. Setting this up was a challenge initially as the course did not describe this well. Finally, I managed to setup AWS by configuring an “admin” user and certain permissions.

When developing with Ruby on Rails you use the MVC framework. Within the MVC framework the development process largely followed a TDD (Test Driven Development) model. Firstly, you write tests for the expected functionality. You then write the code so that the tests will pass. Code is then cleaned up for maintainability. The result being that you have a comprehensive set of tests that can be re-run after any modification. This gives you a certain degree of confidence that you have not broken anything when you make a modification and all tests still pass.

I found the process for developing and maintain the database was quite interesting. For example, Rails allows you to generate the database schema using migrations. These migrations allow you to add and modify into your existing database model so that the appropriate translations can be performed. The generation of these migration scripts also uses conventions to make it easier for perform common operations, such as creating a new table.

Git on Github was used as the source code management for this project.

Heroku deployment

The production version of the application was deployed on Heroku. Heroku is a cloud based platform used for deploying applications in a variety of different languages. The server that this application runs on in dynamic (dyno), in that it will start up as required. So when you initially access the application there is some lag time. This behavior is part of the Heroku free service.

Setting up the integration with Heroku in the AWS was also a challenge. For example, each time I accessed the (FREE) cloud based IDE on AWS I needed to re-install heroku as the dynamic server would uninstall it! I am sure it could be setup permanently if I setup AWS as a paid service!

Features of the Recipe App

The Recipe Sharing application contains the following features:

Checkout my project page where you can access my GitHub source and test out the application for yourself!