Workout Club

Sinatra is DSL (Domain Specific Language), a lightweight and flexible framework. It is designed to provide you with the bare minimum requirements and abstractions for building simple web applications. Sinatra doesn’t give you a lot to start with, there is no auto-generated files and directories. But luckily for me, on this project I will be using Corneal Gem is a gem that allows you to quickly generate all the files you need to start your project.

Workout Club is a web application that allows a user to signup or logs in. Also, the user is able to create his workout routine and keep track of it. Users can save, edit and delete their workouts only and be able to only see other users inputs. I was working on it locally. Started with making new repo on GitHub and setting up everything. I started with building models, User, and Workout. I needed to make relationships between those two with ActiveRecord associations. In order to implement these relationships I write migration for my models and create tables with associations. I was testing it with a gem shotgun and checking how everything is looking and debugging if needed. After creating routes in my users and workouts controller I wanted to do some CSS styling to make it look nicer and colorful. This was an exciting experience learning Sinatra Framework.

  • MVC Sinatra application
  • User accounts - users are able to sign up, sign in, and sign out
  • Validate the uniqueness of the user login attribute
  • Ensure that users can edit and delete only their own resources - not resources created by other users.
  • Validate user input so bad data cannot be persisted to the database
  • Display validation failures to users with error messages

Built with: Ruby - Sinatra
GitHub: WorkoutClub