kirbydd / brownfield-of-dreams Goto Github PK
View Code? Open in Web Editor NEWThis project forked from turingschool-examples/watch-and-learn
Rails app used for hosting video tutorials and classes. Serves as the base repository for a B3 project.
This project forked from turingschool-examples/watch-and-learn
Rails app used for hosting video tutorials and classes. Serves as the base repository for a B3 project.
Details: We want to create friendships between users with accounts in our database. Long term we want to make video recommendations based on what friends are bookmarking. This card should not include the recommendation logic. That's coming in a different user story.
Background: A user (Josh) exists in the system with a Github token. The user has two followers on Github. One follower (Dione) also has an account within our database. The other follower (Mike) does not have an account in our system. If a follower or following has an account in our system we want to include a link next to their name to allow us to add as a friend.
In this case Dione would have an Add as Friend link next to her name. Mike would not have the link next to his name.
Tips: No need to work on edge cases during your spike. You'll want to research self referential has_many through. Here's a good starting point to understand the concept: http://blog.hasmanythrough.com/2007/10/30/self-referential-has-many-through. You'll probably need to do more googling but that's part of the fun ;)
Background: When a user bookmarks a video the page reloads which means if they were watching a video, the video starts over making for a frustrating user experience. We can use JavaScript to make a POST request to /api/v1/bookmarks
.
This story should make a fetch
call to an internal API.
The app currently uses Stimulus JS and there are already examples of how to make a fetch
call to an internal API. Review that code and use it as a template.
Set up continuous integration using Travis CI
Some things to consider as you spike:
When you come together for your implementation time box this to 1 hour.
If it works great! If it doesn't, please reach out to your instructors to let them know what you have tried and what you are stuck on, then move on to other issues.
Background: Currently deleting a Tutorial will leave all of the videos in the database, meaning they will be referencing a tutorial that doesn't exist.
Use ActiveRecords dependent destroy functionality to fix this.
GET /tutorials/:id
Currently the Bookmark link will redirect to the login page and stop the video from playing which leads to a rather jarring experience.
Let's display a message that says "User must login to bookmark videos." A tooltip or flash notice could be good options?
Currently tutorials can be created by manually entering information and then manually entering videos one by one.
The playlist importer should take a playlist_id which relates to a youtube playlist and import all of the videos and associate them with a tutorial.
As an admin
When I visit '/admin/tutorials/new'
Then I should see a link for 'Import YouTube Playlist'
When I click 'Import YouTube Playlist'
Then I should see a form
And when I fill in 'Playlist ID' with a valid ID
Then I should be on '/admin/dashboard'
And I should see a flash message that says 'Successfully created tutorial. View it here.'
And 'View it here' should be a link to '/tutorials/:id'
And when I click on 'View it here'
Then I should be on '/tutorials/:id'
And I should see all videos from the YouTube playlist
And the order should be the same as it was on YouTube
Background: We want to be able to enter a user's Github handle and send them an email invite to our app. You'll use the Github API to retrieve the email address of the invitee.
As a registered user
When I visit /dashboard
And I click "Send an Invite"
Then I should be on /invite
And when I fill in "Github Handle" with <A VALID GITHUB HANDLE>
And I click on "Send Invite"
Then I should be on /dashboard
And I should see a message that says "Successfully sent invite!" (if the user has an email address associated with their github account)
Or I should see a message that says "The Github user you selected doesn't have an email address associated with their account."
The email should read as follows
Hello <INVITEE_NAME_AS_IT_APPEARS_ON_GITHUB>,
<INVITER_NAME_AS_IT_APPEARS_ON_GITHUB> has invited you to join <YOUR_APP_NAME>. You can create an account <here (should be a link to /signup)>.
๐ ๐ฎโโ๏ธ ๐ฎโโ๏ธ ๐ฎโโ๏ธ
DO NOT START THIS STORY UNLESS THE STORY REFERENCED BELOW HAS BEEN COMPLETED BY BOTH IN YOUR PAIR.
You should pair on story "User Dashboard: Github Repositories" and deploy it prior to working on this one.
Continue this process for all stories labeled spike first
. You will learn more this way and produce better code.
๐ ๐จ ๐ฎ ๐ฎ ๐ฎ
Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens
A future story will implement generating these tokens dynamically but that isn't necessary here.
No need to hit the endpoint for followings. A future story will address this.
As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see another section titled "Followers"
And I should see list of all followers with their handles linking to their Github profile
API endpoint documentation
https://developer.github.com/v3/users/followers/
/user/followers
instead of /users/:username/followers
Currently all tutorials are visible to anyone. We want to make tutorials marked as "classroom content" viewable only if the user is logged in.
The tutorials table has a boolean column for classroom
that should be used for this story.
Click on the three dots in the upper right hand corner of each column and select "Manage automation".
Set the automation as follows:
As a guest user
When I visit "/"
And I click "Register"
Then I should be on "/register"
And when I fill in an email address (required)
And I fill in first name (required)
And I fill in last name (required)
And I fill in password and password confirmation (required)
And I click submit
Then I should be redirected to "/dashboard"
And I should see a message that says "Logged in as <SOME_NAME>"
And I should see a message that says "This account has not yet been activated. Please check your email."
Background: The registration process above will trigger this story
As a non-activated user
When I check my email for the registration email
I should see a message that says "Visit here to activate your account."
And when I click on that link
Then I should be taken to a page that says "Thank you! Your account is now activated."
And when I visit "/dashboard"
Then I should see "Status: Active"
The evaluation rubric at the end project will use RuboCop to measure code quality.
Details: We want a user to have the option to connect their Github account and retrieve a user specific token automatically.
As a user
When I visit /dashboard
Then I should see a link that is styled like a button that says "Connect to Github"
And when I click on "Connect to Github"
Then I should go through the OAuth process
And I should be redirected to /dashboard
And I should see all of the content from the previous Github stories (repos, followers, and following)
Tips: Testing this is tricky. Don't worry about testing during the spike. In fact, TDD'ing this is really tricky if you've never done it before. Get a working implementation first even when you are pairing and backfill a test. You should not try to fill out the form and click buttons on Github in your tests. Omniauth gives us a special way to test this. Use these docs as a starting point: https://github.com/omniauth/omniauth/wiki/Integration-Testing
Background: Ability to bookmark is already built out. This story should display things that are already bookmarked. Bookmarking occurs in UserVideosController#create
if you want to explore the model relationships.
As a logged in user
When I visit '/dashboard'
Then I should see a list of all bookmarked segments under the Bookmarked Segments section
And they should be organized by which tutorial they are a part of
And the videos should be ordered by their position
Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens
A future story will implement generating these tokens dynamically but that isn't necessary here.
As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see a list of 5 repositories with the name of each Repo linking to the repo on Github
๐ ๐ ๐ ๐
REMINDER: Don't start this story until you and your partner pair on and deploy the previous user story.
โ๏ธ โ๏ธ โ๏ธ โ๏ธ
Details: A user exists in the database. They have a Github token stored. Generate a token here for testing and development: https://github.com/settings/tokens
A future story will implement generating these tokens dynamically but that isn't necessary here.
As a logged in user
When I visit /dashboard
Then I should see a section for "Github"
And under that section I should see another section titled "Following"
And I should see list of users I follow with their handles linking to their Github profile
API endpoint documentation
https://developer.github.com/v3/users/followers/#list-users-followed-by-another-user
When I visit '/admin/tutorials/new'
And I fill in 'title' with a meaningful name
And I fill in 'description' with a some content
And I fill in 'thumbnail' with a valid YouTube thumbnail
And I click on 'Save'
Then I should be on '/tutorials/{NEW_TUTORIAL_ID}'
And I should see a flash message that says "Successfully created tutorial."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.