Viewing Party is a 10-day, 2 person project, during Mod 3 of 4 for Turing School's Back End Engineering Program.
Our challenge was to build a functioning web app consisting of multiple relational databases and pull from multiple API endpoints to create friendships that can make viewing parties associated with a movie.
Learning goals and areas of focus consisted of:
- Consume JSON APIs that require authentication
- Build an application that requires basic authentication
- Organize and refactor code to be more maintainable
- Implement a self-referential relationship in ActiveRecord
- Apply RuboCop’s style guide for code quality
- Utilize Continuous Integration using Travis CI
- Deploy to Heroku
- Use RuboCop in project to enforce style guide
- Deploy to Heroku
- Use TravisCI for Continuous Integration
- Consume The Movie DB API
- Implement Basic Auth
- Choose one exploration option to complete
- Ruby 2.7.2
- Rails 5.2.6
- PostgresQL
- Postico
- Capybara
- Launchy
- Orderly
- SimpleCov
- Git/GitHub
- HTML
- CSS
- RSpec
- Pry
- Atom
- VS Code
- Heroku
- Faraday
- Travis
- RuboCop
- Figaro
👤 Khoi Nguyen
- Github: Khoi Nguyen
- LinkedIn: Khoi Nguyen
👤 Sami Peterson
- Github: Sami Peterson
- LinkedIn: Sami Peterson
This is the base repo for the viewing party project used for Turing's Backend Module 3.
Viewing party is an application in which users can explore movie options and create a viewing party event for the user and their friend's.
- Fork and Clone the repo
- Install gem packages:
bundle install
- Setup the database:
rails db:create
-
Ruby 2.7.2
-
Rails 5.2.5
Example wireframes to follow are found here
"For this project, you will be building an application to explore movies and create a viewing party event for you and your friends to watch a movie together. The application will require basic authentication."
This project requires Ruby 2.7.2.
- Fork this repository
- Clone your fork
- From the command line, install gems and set up your DB:
bundle
rails db:create
- Run the test suite with
bundle exec rspec
. - Run your development server with
rails s
to see the app in action.
-
Ruby version
$ ruby -v ruby 2.7.2p137 (2020-10-01 revision 5445e04352) [x86_64-darwin20]
-
Consume API
- visit Movie DB API to generate API key
- Install 'Figaro' gem
bundle exec figaro install
- Add API to Enviroment
# config/application.yml MOVIE_API: <<api_key>>
- Interpolate API Key into endpoint calls
- *Example:
class MovieDbService < ApiService def self.top_movies_by_page(page) get_data("#{BASE_URL}/3/movie/top_rated?api_key=#{ENV["movie_db_api"]}&language=en-US&page=#{page}")[:results] end end
-
$ rails -v Rails 5.2.6
-
Database creation
$ rails db:{drop,create,migrate} Created database 'viewing_party_development' Created database 'viewing_party_test'
-
How to run the test suite
$ bundle exec rspec -fd
-
Local Deployment, for testing:
$ rails s => Booting Puma => Rails 5.2.6 application starting in development => Run `rails server -h` for more startup options Puma starting in single mode... * Version 3.12.6 (ruby 2.7.2-p137), codename: Llamas in Pajamas * Min threads: 5, max threads: 5 * Environment: development * Listening on tcp://localhost:3000 Use Ctrl-C to stop
-
Heroku Deployment, for production