Challenge Overview

The Hercules Reference Web application is a simple Node application that will be used on the customer's embedded environments.  The web app will be a reference platform for developers to see how to do specific things with regards to HTML layout, video playback, and handling the remote control for their own apps.

Existing proof of concept

We have an existing proof of concept that has been built and this challenge will formalise it, refactor some things, and will add in unit tests and other required items to ensure it works properly as developer documentation.

Split out into multiple view controllers

Because this is going to be a proof of concept for developers, we need to make it much easier to see what's going on in the code.  Right now, the video playback code for all 4 playback types is kept in the "videos" script in static/apps/page.  We want to split this out into individual files for each player type.  This will lead to some redundant code, which for this challenge is fine - it's more important to have very clear code than it is to have it super efficient. The video playback and remote control views should also be split out instead of having everything in a single index page, for the same clarity reasons.  We are going to heavily document these examples into wiki pages in the future, so it's better to have them split out now.

Existing bugs

There are existing bugs in the application with regards to video playback, but those aren't in scope for this challenge.  If you fix things here, that could be considered additional functionality, but isn't required.  

Your submission should function the same way the code in Git does now, just cleaned up and better documented.

Cleanup

Please remove any unused code and ensure the solution is very clean.  Please refactor and reorganise the code to best practices so it's easy to understand.  We want to ensure that the backend code maps clearly to the frontend UI and that everything is very easy to reference and follow.

Cleanup applies to:

* Node modules that aren't used
* CSS or HTML that isn't used
* JS code that isn't used
* Anything in the webpack setup that isn't necessary

Continuous Integration

In your submission, please provide a document describing setup for a continuous integration service that targets Heroku.  This document should be separate from the README.md.  The requirements are:

0. Is free or very low cost
1. Ability to pull from Gitlab
2. Runs the unit tests
3. Deploys to a configured Heroku instance.
4. Adds a message to Slack on success or failure

We have used Magnum CI for this in the past (http://magnum-ci.com/), but if you have something you think would work better, feel free to recommend it.
 
README

Make sure the README.md is updated with verification information about the new features and configuration information so they can be easily added.  Right now the README only has very basic information - you are expected to fill this out with details.  The README can function as the deployment guide for this challenge.

Video

No video is required for this challenge.

Unit tests

Unit tests are required for these new changes, and to cover the existing functionality.  We should ensure that navigation works, the keyboard test page works, and that playback is initialized on the individual pages.  The tests should use the keyboard for navigation.  Your tests must cover positive and negative cases and should be reasonably good at covering edge cases and error cases.  

Heroku deploy

Make sure the Heroku deployment information is up-to-date and that you keep the package.json up to date as well.  Don't expect the deployment to be anything other than "npm install" / "npm start" locally and "git push heroku master" for Heroku deployment.

Submission format

Your submission should be provided as a Git patch file against the commit hash mentioned in the forum.  MAKE SURE TO TEST YOUR PATCH FILE!
 


Final Submission Guidelines

Please see above

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30055605