Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Attention! This is a fast 24h challenge! All phases have short deadlines. Make sure you don’t miss any.

Challenge Objective

Build a NodeJs app that will work as a CLI application, will compare the data from two different APIs and will generate a score based on the details below.

Tech Stack

  • NodeJs

Source Code

This is a new project thus there is no base code.

Detailed Requirements

As part of this very simple challenge, you need to build a NodeJs based application that we can run as a CLI application and that will compare the data from 2 different sources (APIs).

 

The app needs to:

  • Call the Settings API (endpoint must be configurable) to receive an object that will include the information about the data. This object will have the following format:
    {
        totalUniqueAssets: Number
    }

  • Call the Data API (endpoint must be configurable) to receive the actual data. The response will be an array of objects with the following format:
    {
        id: String | Unique
        assetId: String
    }

 

For now, you need to mock the above 2 APIs (eg using https://www.npmjs.com/package/sinon) but it should work the same once we change the configurations to point to the actual APIs.

 

The app will then check all data returned from the Data API and produce a score.

The score is calculated as the % of the total unique records returned by the Data API minus a penalty in case duplicate data was returned (2 records are considered duplicates if they have the same assetId).

 

For example, using a penalty of 5 for duplicate data, if the totalUniqueAssets is 250 and the Data API returns 300 records where 230 of them are unique and the rest are duplicate, the score will be 87%

 

Finally, the app needs to save the score (just the numeric value) on a txt file.

 

The path where the score needs to be saved must be configurable.

The penalty value for duplicate records must be configurable.

Submission Deliverables

Submit a zip file containing your source code and a detailed README.md file that has information on how to set up, configure and run the app.

ELIGIBLE EVENTS:

2020 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30105486