Challenge Overview
Challenge Objectives
-
Create a Node.js processor that will listen to kafka topics and will call other APIs.
Project Background
We’re in the process of revamping our platform and adding support to store more information about our users as traits in order to improve the overall user experience in our platform.
Technology Stack
-
Node.js
-
Apache Kafka
-
Docker and Docker Compose
Detailed requirement
1. Processor implementation (major)
You need to build a processor that will listen to kafka events published from the Online Review app where the payload will contain submission review results and call the V5 Submission API to create or update the review entries there.
The documentation for the endpoints from V5 Submission API you’ll have to call is here https://tc-submission-api-dev.herokuapp.com/docs/#/Reviews
You need to use the appirio-tech/tc-core-library-js.git#v2.4.1 library to get an M2M token and call the V5 Submission API using that token.
The payload should have an eventType property. If this property is missing, ignore the event.
This property will be either CREATE or UPDATE.
The topics the processor should listen to are:
-
or.notification.create
Notes that those topics should be configurable and the processor should be able to read them from env variables.
The name of this new processor should be: or-review-processor
You will find example payloads attached in the challenge forum.
2. Unit testing (major)
You need to cover the processor with unit & E2E testing.
Feel free to ask any questions on the challenge forum!
Code Formatting
-
Please follow the https://standardjs.com/ code formatting guidelines.
-
Please provide scripts for lint checking (using https://standardjs.com/)
What to Submit
Submit:
-
The processor source code
-
Detailed configuration and deployment instructions (README.md)
-
A verification document