/viewing_party

Starter repo for a backend module 3 project.

Primary LanguageRuby

Viewing Party

Table of Contents

Overview

Viewing Party is a web application to search for movies and view their details (vote average, runtime, cast, summary, etc.). Once a movie is chosen, a registered user can create a viewing party event and invite friends to watch the movie together. Viewing Party requires basic authentication and consumes multiple endpoints from The Movie Database API.

Check out our live site on Heroku.

See our Movie Database API - Viewing Party collection in Postman:

Run in Postman

Testing Status

  • Simplecov: 100% coverage
  • RSpec: 88 tests, 0 failures

Features

Viewing Party demonstrates the following features:

  • User authentication and authorization
  • User can add friends who exist in database
  • User can search movies by title
  • User can see top 40 movies from the day
  • User can see movie data for a specific movie
  • User can create watch parties and invite specific friends

Getting Started

To get a copy of the project on your local machine for development and testing purposes, first confirm your Ruby and Rails versions, then follow the Local Setup Instructions!

Ruby and Rails Versions

Click here for instructions on how to check versions and install the correct ones if needed.

  • Ruby 2.5.3
  • Rails 5.2.4.3

Local Setup Instructions

  1. Clone this repo into a new directory.
  2. CD into viewing_party
  3. Run bundle install to install gem packages
  4. Run rails db:create to set up the databases
  5. Run rails db:migrate to add migrations
  6. Run rails db:seed to seed with data
    1. Or run rails db:{create,migrate,seed} to complete the actions in one command

Testing

  • Run ALL tests: bundle exec rspec
  • Run specific test file: bundle exec rspec spec/<example directory>/<filename>
  • Run specific test: bundle exec rspec:<test line number goes here>

Extras

Wireframes

Example wireframes for browser pages can be found here.

Gems

  • rspec-rails - testing suite
  • pry - runtime developer console
  • capybara - aids in application testing and interaction
  • simplecov - tracks test coverage
  • shoulda-matchers - simplifies testing syntax
  • launchy - helper class for launching cross-platform applications
  • bcrypt - encrypts passwords
  • vcr - records test suite's HTTP interactions and replays them
  • faraday - HTTP client library that provides common interface over many adapters
  • figaro - securely configures Rails apps
  • rubocop-rails - enforces Rails best practices and coding conventions

Project Board Clone

To view the GitHub project board you can clone using conveyor belt, click here. To clone, follow these instructions:

  1. Click here for the conveyor belt link.
  2. You will be prompted to sign in using your GitHub credentials.
  3. Fill out the “Who’s working on the project?” and “What e-mail should we send the finished board to?” questions.
  4. Submit and the new project board should open automatically.

Design

Schema

schema

Refactor Example

Initial Movies Controller original-movies-controller

Final Movies Controller final-movies-controller

Future Design Ideas

If we were able to add to this project in the future, some features we could include are:

  • CRUD functionality for friends and viewing parties
    • delete a friend, delete a viewing party, etc.
  • Users have to give permission to be added as a friend
  • A friend would receive an email invite before they are added to a viewing party

Contributors

Additional Notes

Using Heroku and Travis CI

  1. Deploy to Heroku

    • Click here for instructions created by Heroku developers.
    • Or enter the following from your command line (while in the base directory of the project):
      • heroku create
      • git push heroku master
      • heroku run rake db:migrate
    • You will also need to set up any API keys manually for your Heroku production environment.
  2. Continuous Integration with Travis CI

Important

  • Configure your API keys that are environment variables for the Travis environment (in this case, your movies_api_key). You can find configuration for environment variables by:

    • selecting your repository from the Travis dashboard
    • clicking More Options
      • choose 'Settings' from the drop-down menu
    • scroll to 'Environment Variables' and add the key
  • Configure deployment to Heroku by filling in the api_key and app variables in your app's .travis.yml file.

  • You can test that your Travis set up is working by pushing a commit to your repository.

    • should see a build triggered by the Travis dashboard
    • when the build is complete, you should see the change automatically deployed to Heroku

Acknowledgement

The data used for this project was collected using the official API documentation provided by The Movie Database. (While this project uses the TMDb API, it is not endorsed or certified by TMDb.)