Challenge Overview

We have recently moved our service integration for the Retail iOS app over from calling each individual service directly to making all service calls through a service proxy.  This simplifies our implementation and allows us to centrally configure the service endpoints, keys, and secrets to use on the server, instead of embedded in the individual build of the iOS app.

The side effect is that it is a bit harder to test and fully validate the individual calls due to the intermediate layer.

This challenge will build a Node test app that we can use to:

* Authenticate and pull a token for the API
* Test the individual calls that the iOS app makes

We will deploy this internally to help quickly debug service issues that may crop up using the Node app to more easily view the individual calls and the exact server requests and responses.


Login:

The iOS app logs in via OAuth through the API proxy.  The Node test page will do the same OAuth flow and will properly log the user in and capture the token needed for making calls through the API proxy.

General UI requirements:

Please make the general UI reasonably usable and good looking.  Please use Bootstrap CSS and JS instead of just bare HTML controls.  You can use Angular 1 or 2, JQuery, ReactJS or anything else like that, since this will be an internal tool only.


Test calls:

We will have a main menu of test calls.  Each call should load a separate page (can be the same page but configured for the selected test).  Here is the list of calls we will need to make (matching up with functionality in the retail iOS app):

* Open each of the individual web links
 * Coverage Map
 * Training
 * Planogram
 * Survey
 * Check-In
 * Store Locator
 * Savings Calculator
 * Consent
* Search account
 * By name
 * By email
 * By phone
 * By account number
* Get appointments for account
* Get account timeline
* Get 60 day payments for account
* Get channel lineup for account
* Get latest bill for account
* Get list of available bills for account
* Compare two bills for account
* Get the geolocation values for the account
* Add a new timeline item for Retail360_storeTransactions

Notes
 * Get all note types
 * Get notes for an account
 * Add a note to an account
* OMS
 * 
Swap two devices for an account
 * Remove a device for an account
* IMS / Get device details for a given serial number or MAC address
* Get Modeto details for an account
* EMS
 * Send device removal receipt email
 * Send device swap receipt email
 * Send channel lineup email


Defaults:

There should be a way to configure the defaults for the parameters for each call in a configuration JSON file.  Note that you won't necessarily be able to do this for every call and every environment - that will be done after the challenge ends by the copilot.  You should still ensure that the PreProduction endpoint has the default parameters working as good as we can.

Test call page:

The test call page will be similar to Postman, in that we can test:

* Updating the parameters sent (but these should be defaulted already)
* Click a button to make the request
* See the request sent and the response from the server
* See the request and response headers

Note that it's important that we can easily copy the request and response, so please make sure that's tested and not blocked somehow.

Server dropdown:

A list of proxy API endpoints will be provided in the forum.  In the UI, we need a place to select one of the endpoints (dev, staging, pre-production, production) that the calls will be sent to.

Existing code:

You will need access to the Retail iOS App to see how it makes the API calls.  In addition, a Postman package will be provided in the forum that will help provide some initial guidance on how to make the individual calls.  It may not cover everything however, so you will likely still need to look at the Retail iOS app to fully implement the requirements.  Note that the Postman script doesn't do login, so you may need to capture the tokens from the iOS app and copy / paste them in if you want to test before you implement the login requirement above.


Submission

Your submission must include:

* The node source for the project
* The deployment guide (We'll only target local deployment for now)
* A video showing the app working



Final Submission Guidelines

Please see above

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30057808