Movie Tracker Sinatra App
Tags: ruby
Published: 2021-04-05 00:42:10

##That's a wrap for the second project!

In continuing with the theme of revolving my projects around my love for movies, I've just finished my Sinatra CMS (content management system) project. I decided to make a movie tracker web application à la Letterboxd to test my skills with RESTful routes and CRUD. Before I continue, here is the link to the [git repo](https://github.com/atcarter/movie-tracker).

###So, what does it do?
To access the app, a user will need to log in/sign up for an account. After a user creates an account, they are redirected to the "/reviews" page where they will see a list of all the movie reviews from every user. 

Each review consists of a movie title, release year, a rating from 1-5, the content of the review, and the user it belongs to. The "/reviews" page displays this for each review that exists in the database.

To create a review, a user must simply click the link towards the top of the page where they are redirected to "reviews/new" and are able to fill in the fields mentioned above (except for their username). After a new movie review is created, the user is brought back to the "/reviews" page where they will be able to see their new review with the others.

To look at an individual movie review, a user can click on the title of the movie to go to "/reviews/:id". Should a user click on their own review, they will be able to edit and delete their post using the link and button respectively at the bottom of the page. Of course, a user is not able to modify the reviews of others. 

Finally, once a user has finished creating, reading, updating, and deleting movie reviews, they will be able to log out of the application with a link that is in the top right corner of the         webpage.

###What did the process look like?
I used a combination of a whiteboard and ripped halves of engineering paper taped to my wall to draft how I wanted my application to behave. I wrote out the fields that each model would have, sketched what each view looked like, and wrote a general to do list for the order in which I wanted to work on everything. Having a clear "sketch" for what I wanted my project to look like truly helped me stay grounded (and not bouncing around, editing multiple files).

###Any takeaways after completing the project?
Similar with my CLI project, I had a plan before I started doing any coding. This helped tremendously, especially with all of the individual files that each had a specific role for this project.

I also did a good job of moving past any roadblocks or unknown bugs. With a combination of troubleshooting, googling, and past labs, there wasn't a particular piece of the project that stopped me much longer than 30 minutes to an hour.

I did better at making short, meaningful commits compared to the first project but this is something I will continue to be working on!

One thing I would like to do in the future would be to add the movie API that I used for my first project. It would be a nice to see the information from a particular movie, all the reviews associated with it, and have a list of movies the user would like to see in the future.

Thanks for reading!