Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Challenge Objectives

  • Enhance the Reactjs based application to provide a feature that allows users to write javascript code to determine if a resthook needs to be called

 

Project Background

  • We have an app that listens to events are generated by Topcoder (events such as contest created, new thread created in forum etc) and allows Topcoder members to create resthooks for specific topics

  • All events in Topcoder will now be passed to a Kafka endpoint from where Topcoder admins, copilots and members alike will be able to subscribe to these events.

  • This is an ongoing project which is being enhanced periodically. The next contest in this project will be about fixing multiple bugs and creating additional screens.

 

Technology Stack

  • We are using Reactjs on the front end, generated using the create react app

  • We are using Nodejs version 8 on the backend.

  • We use MongoDB as our database

  • We are also interfacing with Kafka which is the source of the messages for our app

 

Code Access

  • The code is located here. Kindly make sure that you are using the develop branch as your base code. The repository should be publicly accessible.

 

Individual Requirements

Enhance app to allow custom javascript based filters (Major Requirement)

  • At the moment, the user creates a resthook. The app make a request to the resthook if a message arrives on the topic associated with the resthook. We would like to add a middleware here.

  • The middleware is essentially javascript code written by the user that creates the resthook

  • Enhance the create resthook page (and edit resthook page). Create another field here named Custom Filter Logic which will allow the user to write javascript code.

  • Sandbox the custom filter logic such that it only has access to the message that arrives from kafka and nothing else.

  • The user will write their own filter logic in this field. The expected return value from the evaluation of the javascript code is a boolean value. A value of false would mean that the resthook should not be called. A value of true would mean the resthook should be called.

  • Thus, where earlier the app would immediately call the resthook, in this task, you will enhance the app such that the user’s own custom logic will be evaluated and based on the outcome, the resthook will be called.

  • The user isn’t required to specify the custom filter logic. If they have specified it, then you will execute it.

  • Make changes to the server as well to support this new feature

 

Deployment Guide and Validation Document

  • Update the README.md file in the code base. Specify how to verify that the custom filter can be tested out.

 

Important Notes

  • Implement reasonable restrictions on the type of code that the user is allowed to write - restrictions on the number of characters entered or the size of the code entered or the number of lines of code entered are perfectly valid.

  • Ensure that you sandbox the execution of the code. The code will only have access to the message from kafka (not exactly the message from kafka, but the message that exists after the app has done processing - it adds the topic and the timestamp to the original message for example if one does not exist already)



Final Submission Guidelines

  • You can upload a git patch or upload the entire code base.

  • Please ensure that you used the develop branch as the base branch when starting.

  • You are not required to submit any pull request. Kindly ensure that you do not accidentally do this.

  • Verify that the front end can be built and there are no errors here before you submit

ELIGIBLE EVENTS:

2018 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30067592