DEV Community

Michael Warren
Michael Warren

Posted on

Project: Simple Todo App with React and Ruby (Sinatra)

This post will be updated as I make corrections to this project.

Backend | Frontend

Project Goals

  1. Use Active Record to interact with a database.
  2. Have a minimum of two models with a one-to-many relationship.
  3. Create API routes in Sinatra that handles at least three different CRUD actions for at least one Active Record model.
  4. Build a separate React frontend application that interacts with the API to perform CRUD actions.
  5. Use good OO design patterns with separate classes for each model and instances and class methods as necessary.

Active Record has two models: Category (which has many todos) and Todo (belongs to category), and each table has a name column.

The ApplicationController has post, get, path, and delete routes set up for the frontend to interact with.

At the time of submission, I am currently in the middle of finishing building all of the CRUD React components for the frontend to interact with the API created in Sinatra.

Additional advanced features for future versions

  • Site membership with secure sign-in (using the bcrypt gem?)
  • Option to add deadline for each task
  • Points system for completing a task (productivity gamification)
  • Animation with Motion

Top comments (0)