Deployed link: https://turing-tutorials.herokuapp.com/
This is a Ruby on Rails application that pulls in YouTube channel information from the YouTube API. The application is split between tutorials and segments. Each tutorial is a playlist from the YouTube channel used to seed the database, and each segment is a video within playlist. Within the application an admin is able to create tags for each tutorial in the database. A visitor or registered user can then filter tutorials based on these tags inserted by an Admin.
A visitor is able to see all of the content on the application but in order to bookmark a segment they will need to register. Once registered a user can bookmark any of the segments in a tutorial page. The bookmarked segment will then appear on the users dashboard. Then the user can directly access the segment or remove the bookmark from the dashboard.
First you'll need to setup an API key with YouTube and have it defined within ENV['YOUTUBE_API_KEY']
.
Clone down the repo
git clone
Install the gem packages
bundle install
Install node packages for stimulus
brew install node
brew install yarn
yarn add stimulus
Set up the database
rake db:create
rake db:migrate
rake db:seed
The following rake task will import videos and insert them into the DB:
$ rake import:all
This will import the videos from channel I created for this project. If you would like to bring in your own channel playlist you will need to replacechannelId=
within
Faraday.get("https://www.googleapis.com/youtube/v3/playlists?key=#{ENV['YOUTUBE_API_KEY']}&part=snippet&channelId=UCwWA2R0g0x3UdEFSIKSDOmw&maxResults=50")
with your own channel id from youtube.
note: If you have more than 50 playlists in your channel the API call will only return a max of 50 playlists.
Run the test suite
rspec
note: the test suite is designed for the channel that I created for the project. The test suite will not account for some of the data from your personal YouTube channel.
- Ruby 2.4.1
- Rails 5.2.0