Prelude to Upcoming Rails Project Series
North Chatham, Massachusetts, USA
It's definitely been a while since I last posted here to the Hashnode community on My Dev Diary. Long story short: I recently moved from Pittsburgh, PA to North Chatham, MA on Cape Cod! I know, I know. I had said in my first blog post that I was going to move to Portland, ME. But that's been postposed until further notice while the pandemic is still going on. I am currently working on my 3rd Flatiron School project where I am tasked with building a Rails application that maintains RESTful conventions along with a slick boilerplate file setup.
This be a 4- or 5-part series, depending on how things go in the project. I want this to be sort of like a real-time documentation of my experience of building this project. Hopefully, I'll be able to incorporate video so I can show all of you what my thought process is like.
And please, feel free to give me feedback if you are well-versed in Rails and you notice I misspoke or inadvertently told a mistruth about a particular detail regarding the techs/ tools I'll be using. I would greatly appreciate any and all feedback as I undergo this 4-5 day venture (that's right, I'm going to try to write a post a day. Let's go!).
Here are some details about the project that I will be working on:
The project is called "Flatiron Fitness, Rails Edition" (check out the repo here). The title is in reference to my previous Sinatra project that involved the same concept.
The application will be Devise-flavored and include OmniAuth for OAuth user authentication. As of now, I don't which providers I'll choose but I'll probably pick two.
User will be able to create more than one
Routine, which can contain, add or create
Exercise objects. In order to prevent a user from accidentally editing or deleting another user's exercise, I will incorporate a join table,
RoutineExercise, that has a pointer to both a user's routine and an exercise. This way, within a user's session, along with the right validations, they wouldn't be able to create two exercises with the same
name but another user could in their session for their account.
Users will also be able to perform the basic CRUD functions for both
RoutineExercise. The way I'm thinking about this how this would work (and this could change) is that if a user were to "delete" an exercise from their routine, they would actually be deleting the
RoutineExercise object that binds them. This way, you'd be able to sever an
Exercise from a
Routine without necessarily deleting the exercise altogether; you would use a controller action like
routine_exercises#destroy instead when editing a routine or exercise.
Also, an important requirement for the project will be providing user authentication, including signups and logins through a third-party provider (like Facebook) with OAuth 2.0. I've decided to go with the
devise gem because it provides a litany of cool modules and tools that make the process of OAuth setup easier. For third-party authentication/ authorization, I'm going to use OmniAuth (which comes in handy since its baked into Devise!).
This is a rough shot of what the series posts are going to be like. Again, I believe I'm going to make 4-5 posts to encompass this whole project. However, it could take less time, depending on how things go.
- Setup + Devise
- Third-party OAuth w/ OmniAuth (possibly a video included?)
- Routes, Forms, Layouts and Partials
- Last touches on full stack + styling
- Reflections and Lessons Learned
I'm excited to bring you all along with me on what will be my first Ruby on Rails application. Please feel free, again, to reach out in the comments, follow me on Twitter and let me know how I'm doing with the project and whether I'm on the right track. Please feel free to take a fork/clone the repo to this project and play around with it!