Key Information

Register
Submit
The challenge is finished.

Challenge Overview

Challenge Objectives

  • Show the history of invocations for a Resthook

  • Allow only https based endpoints for the Resthook

  • Enhance Resthook creation form with two new attributes and rename an existing one

  • Allow adding custom headers to resthooks

 

Project Background

  • Project Vorbote is a nodejs and reactjs based app

  • The app allows any Topcoder members to subscribe to events that occur on the Topcoder platform

  • Essentially, the app allows a member to setup their own webhooks, for example, to be notified when a contest is launched

 

Technology Stack

  • Nodejs version 8

  • Reactjs

  • Mongodb

  • Kafka

 

Code access

You can find the code here. Kindly use the develop branch for your changes.

 

Individual requirements

Show the history of invocations for a Resthook (Major Requirement)

  • When a registered resthook has been invoked, we need to store the following in the database:

    • Time when the Resthook was invoked

    • Data with which it was invoked (the request body)

    • Response from the Resthook after invoking the data. In this case, only note the http status code

  • Thus, we will store a “history” of the invocations for a Resthook. Note that if the Resthook is not invoked because of the rules / filters applied, you will not be storing this in the history

  • In the UI, you will need to display the history of invocations against a resthook. Enhance the current table’s (Your Registered Resthooks page) Action column to display a single button with three vertical dots. Clicking this will show Edit, Delete and History action items, with History being the new one while others being the current actions.

  • When the user selects the History action, display the new History page that contains a table with the above information. Additionally, indicate with a green checkmark or red cross icon if the invocation was a success or a failure

  • Note that you will not store the request header information in the history nor will you store invocations that were made to confirm the Resthook.

  • You will store a maximum of 10 invocations against a Resthook. You will delete older ones.

 

Enhance Resthook creation form with two new attributes and rename an existing one (Major Requirement)

  • Enhance the Resthook creation form (and thus the model) with 2 new attributes:

    • Name. The user can name their Resthook (maximum 50 characters - required field).

    • Description. The user can provide a short description for their Resthook (maximum 400 characters - optional field)

  • Additionally, rename the current attribute named “handle” on the Resthook model to “owner”.

  • You will display the Name and Description in the Resthook Listing page.

  • The owner will also need to be displayed on this page, but only for Admin users

  • These attributes will show up in the Edit Resthook page too

 

Allow adding custom headers to resthooks (Major Requirement)

  • When creating a Resthook, improve the form so that the user can (optionally) specify a custom header to be passed during invocation

  • The user can add upto a maximum of 5 custom headers

  • You need to validate that the user has provided both the custom header name and the custom value for this header (for scenarios where they provide only one of them).

  • You need to make provisions to allow user to add (up to 5) custom headers and delete them too.

  • These enhancements will also need to be carried out in the Edit Resthook page

 

Allow only https based endpoints for the Resthook (Minor Requirement)

  • At the time of creation of Resthook, don’t allow creation of the Resthook if the endpoint does not begin with https.

  • Validation will be performed when user clicks on the Add button in the Resthook creation form.

 

Deployment guide and validation document

We don’t expect any changes to the deployment.

 

Important Notes

  • Follow existing conventions used in the app

  • Ensure there are no lint errors in the app.

  • Tests for the newly added features are also in scope.

  • Existing functionality should continue to work as before.

  • In case you are well versed with UI but are not familiar with Kafka or Nodejs, you can still participate - use docker for kafka and simply set the configuration without going through the hassle of installing it.

  • Kindly make use of bulma and as much as possible, avoid creating your own custom css classes.



Final Submission Guidelines

Submit a git patch of your changes

 

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30103178