Skip to content

richarddewit/rare-todos

Repository files navigation

RaRe TODOs - Todo app made with Rails and React

This is an example app to showcase the following techniques:

  • Ruby (v2.7.4) on Rails (v5.2.6) as CRUD-backend
  • React with hooks (v16.14) as frontend
  • TypeScript
  • Bootstrap 3 (v3.4.0)
  • Rails tests for CRUD API
  • Capybara tests for React

Link to "production" Heroku app

Assignment

Create a simple TODO app with a Rails CRUD-backend and a React frontend.

A todo should contain:

  • Title
  • Due date (optional, sortable)
  • Body (optional)
  • Done state (or perhaps a completed_on date?)

Running locally

git clone https://github.com/richarddewit/rare-todos.git
cd rare-todos
bundle install --without production
nvm use
yarn install
rails db:migrate
rails db:fixtures:load
rails s

Testing

API testing

rails test
xdg-open coverage/index.html

Browser testing

rails test:system

Deploying to Heroku

heroku create --region eu
heroku addons:create heroku-postgresql
git push heroku master
heroku open