Key Information

Register
Submit
The challenge is finished.

Challenge Overview

 

Project Overview

This project will build NodeJS REST APIs for TopCoder Platform.

Competition Task Overview

The existing contest retrieval api is writtin by Java with query tool and we are going to move it to NodeJS.

We have developed a NodeJS framework with actionHero and provide two examples API. They are same API but one for public access and another one require OAuth.

Code Base: https://github.com/cloudspokes/tc-api

This contest should implement the software member rating history and algorithm member rating history:

API Specification: http://docs.tcapi.apiary.io/

Notes:

  1. Please only select necessary columns in the queries.
  2. you need to use handle to find the rating instead of coder_id and only return the needed columns for the APIs.
  3. The "rating" view link to the algo_rating_history. It's a confused view name, please join the algo_rating_history table directly.
  4. Please improve the queries if possible.

The compeititon history page in /tc site also includes the contest date and rating history.

It's very good refernece to this contest.

It's important for following the approach in existing code and reuse the common part. e.g. dataAccess Helper.

Please move the phase ids of this class: https://github.com/cloudspokes/tc-api/blob/master/actions/tops.js to helper class and use it for all apis which needs the phase ids.

You must provide mocha unit tests for the two APIs.

Tests must follow this standard: https://www.topcoder.com/tc?module=ProjectDetail&pj=30036437

Code Format

All code must pass jslint. You may use "nomen: true".

Exception Handling

When some server error occurs, it will throw exception to end user directly.

It should follow the error codes responses here and return json error message

https://dev.twitter.com/docs/error-codes-responses

config.apiCodes = {
OK : {name : 'OK', value : 200, description : 'Success' },
notModified : {name : 'Not Modified', value: 304, description : 'There was no new data to return.' },
badRequest : {name : 'Bad Request', value: 400, description : 'The request was invalid. An accompanying message will explain why.' },
unauthorized : {name : 'Unauthorized', value: 401, description : 'Authentication credentials were missing or incorrect.' },
forbidden : {name : 'Forbidden', value: 403, description : 'The request is understood, but it has been refused or access is not allowed.' },
notFound : {name : 'Not Found', value: 404, description : 'The URI requested is invalid or the requested resource does not exist.' },
serverError : {name : 'Internal Server Error', value: 500, description : 'Something is broken. Please contact support.' }
};
with an optional "message" parameter for more details

Heroku Deployment

The submission must be deployed on Heroku, any submission which can't be deployed on heroku successfully will be failed in screening phase - primary reviewer must check this

You can request a VM with informix installed.

Virtual Machine (VM)

VM specific information is found here: http://www.topcoder.com/wiki/display/docs/VM+Image+2.5

Upon registration as a submitter or reviewer you will need to request a VM based on the TopCoder systems image. The VM will be active through aggregation review, after which it will be terminated except for the winner's and the reviewers'. To request your image, please post in contest forum.

Before requesting your VM, you need to ensure that you have an SSH key created and in your member profile. Instructions to do so are here: http://www.topcoder.com/wiki/display/projects/Generate+SSH+Key, and instructions to connect afterwards are here: http://www.topcoder.com/wiki/display/projects/Connect+Using+SSH+Key.

Please realize that VMs are currently issued manually. We make every attempt to issue the VM as soon as it is requested, however, there may be delays of up to 12 hours depending on time of day when you request. We encourage everyone to request a VM as soon as possible to minimize any such delays.

VMs will be granted only during registration phase!

Review Board Requirement:

Reviewers need to write Supertest tests for the two APIs.

Note: Tests must follow this standard: https://www.topcoder.com/tc?module=ProjectDetail&pj=30036437

There are three roles:

  • Accuracy - Tests the implementation on the accuracy of the results when using the component.
  • Failure - Tests the implementation's ability to handle bad data and incorrect usage.
  • Security - Tests the oauth, sql inject and other security related requirements.

Reviewer could send preferred role by Contact Manager after system selected the reviwer.

Copilot will assign the role to reviewers if reviewer didn't send the preferred role information.

Reviewer must create pull request from GitHub for the tests.

Technology Overview

  • JavaScript
  • Node.js
  • Action Hero


Final Submission Guidelines

  • Source File
  • Deployment Guide
  • Test File
  • Unit Tests
  • Winner must create pull request against the main github repo in final fix phase.

ELIGIBLE EVENTS:

2014 TopCoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30038560