Skip to content

Latest commit

 

History

History
32 lines (20 loc) · 1.83 KB

README.md

File metadata and controls

32 lines (20 loc) · 1.83 KB

Build Status

CookBook App 🍲

How to build and run the app

  1. Run docker-compose build backend frontend
  2. Run docker-compose up backend frontend
  3. Access localhost:3000

How to run application tests

  1. Run docker-compose run test-backend. (only backend tests.)
  2. Run docker-compose run test-frontend. (only frontend tests.)
Note: I've also setup Travis CI for this repository. You can check its badge on top of this page ✅🚀.

Nov-24-2020 11-34-14

Tech Decisions

Backend

I choose to use Sinatra because its a very lightweight framework. Ideal for these simple functional requirements. If they were a little more complex, I'd choose Ruby on Rails 6 in API mode because I've much more experience with it.

For testing purposes, I've installed Rspec which is the most popular testing framework for Ruby and I use it on a daily basis.

Note: Since the provided gist doesn't have public URLs for recipe images, I tried to use several gems to fetch images using Goggle API but it seems that its deprecated so I didn't found any working gem. That's why these images are static on the client-side.

Frontend

I choose React to develop the client-side. Although I've already a couple of months of experience, it was the first time that I took benefit from the Hooks. It's cool! 🤘🏼. I used Material UI just to easily add some nice UI modules and for testing I've installed several tools such as Enzime and testing-library/react.

Usually, I also set Codacy to perform static code analysis, detect code style errors and calculate test coverage for both backend and frontend code.