Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Challenge Objectives

 
  • Build new endpoints for the Topcoder Terms API


Project Background

 
  • Topcoder services keep the terms of use in now legacy Informix database. Topcoder v2 API provides access to some of the terms management features. This project aims to build a standalone Terms microservice by following Topcoder v5 API standards  

  • In a previous challenge we have migrated the v2 API term endpoints to the new service

  • Once the API is built, deployed and tested, we will create migration scripts, update all apps and services that depend on the current v2 API

 

Technology Stack

 
  • NodeJS

  • Postgres

  • Sequelize

  • Express

 

Code access

 

Base code is available in the project repository, dev branch.

 

Individual requirements

 
  1. Setting required terms for resources

At the moment we only have endpoints for fetching terms, signing and checking whether a user has signed specific terms. Now we need the terms service to track which terms are required for an external resources (ex for a challenge) and this should be generic enough so that terms can reference any resource. For each type of resource (ex “challenge”) service should maintain a mapping of resource_id (ex challengeId), tags (ex roles like copilot, submitter) and a list of terms required for the resource/tag combination. Here is a use case example “Challenge 12345 requires terms NDA1, TOU1.2, FairUse2.1 for all registrants” and “Challenge 12345 requires terms NDA1, CopilotAgreement for all copilots”. You should define database structure, services and controllers to support persisting this information. Only users with administrator role should be able to access this endpoint. Endpoint should be mapped to POST /terms/reference with body {reference=:reference, referenceId=:referenceId, tag=:tag}

  1. Checking whether the user has agreed to terms for a resource
    This will be an endpoint that complements the above endpoint - it will check if the user has agreed to all the terms for a resource and return a list of terms that still need to be agreed. Endpoint parameters will be userId (explicit parameter, don’t read it from the auth token) and list of tags (ex Submitter, Reviewer, etc). Endpoint should be mapped to GET /terms/reference?userId=:userId&reference=:reference&referenceId=:referenceId&tags=:tag1,:tag2,:tagN

  2. Create CRUDL endpoints
    Create, Read, Update, Delete and List endpoints are needed for a) raw terms and b) resource terms. Each of these will be accessible with administrator role only for now. Follow the Topcoder v5 API standards for all the api endpoints (it is ok to use a library to add HATEOAS support). API standards document is attached in the forums.

 

General for all requirements

 

Use controllers/services model for the new API. Logging is required for all services. Unit tests are required for all new/updated controllers and services. Update swagger and Postman files.


Submission Guidelines

  • Submit a Readme with details on how to configure, build, run and test the service

  • Submit Swagger and Postman files for verification



Final Submission Guidelines

See above

ELIGIBLE EVENTS:

Topcoder Open 2019

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30090150