[serenity] to topcoder challenge listing integration

Register
Submit a solution
The challenge is finished.

Challenge Overview

 

 

This challenge is part of Project SERENITY: a refresh of the topcoder challenge lifecycle. There are many challenges before it and will be many after it but you should be able to clone this repo: https://github.com/topcoderinc/serenity-core, grok the README and be up to speed in a few minutes.   However for this challenge you will be creating a standalone node app and this repo should only be used as reference.   Mainly and example of sequlize and the postgress connection strings found in config/env/development.js

For this challenge we want to create a standalone node app that will return our listing of active challenges.   This is very much like the GET /challenges we already have in the above repo, except we want to transform the data a little bit so it can be used by the existing topcoder site.  There is a table of the mapping exersise in github (  https://github.com/topcoderinc/serenity-core/issues/46  ) that shows the expected topcoder response in the first column and how they map to our fields (lc paylod) in the second column.    This should be a pretty simple task and you are expected to use the provided connection strings (development.js) to actually connect to the test database and return some data. 
 

 1. Create a node app with single service with an endpoint called /getActiveChallenges that only get challenges whos status is NOT draft or complete
 2. You should may use serenity-core1 repo which has the config file (development) that will connect you to our sample databases.
 3. You should use sequelize like in this repo but not all the mean stuff,  Should be very small app no overhead.
 4. tc stores dates in EST and lc stores in UTC so we must subtract 4 hours from all our timesstamps.
 5. Create a urlPrefix variable in the config file with the value equal to `http://serenity-core1.herokuapp.com/#!/challenges/`
 6. Any property with NOTES = DONT RETURN do no return (see mapping table)
 7. For  `numRegistrants` you will need to resolve the count from the Registrants table (see mapping table).  You can do this by do a db call (via sequlize) and passing in the challenge id, or but setting up the relationship via the model (see how files and attachments are done, this is perfered if possible)
 8. Look at issue #46 ( https://github.com/topcoderinc/serenity-core/issues/46 ) for the mapping table.

 



Final Submission Guidelines

 1. Provide good documentation of your solution
 2. Provide a quick video that show your solution in action and maybe a code walk throu.  (feel free to annotate your video if you are not comfortable with spoken Englich)
 3. It is not required to deploy to Heroku but feel free to do so
 

 

ELIGIBLE EVENTS:

2015 topcoder Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30046414