Challenge Overview
Challenge Objectives
-
Create a Node.js processor that will listen to kafka topics, will look up user, submission and challenge data and will post the data to a specific topic.
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
-
Kafka
-
Docker and Docker Compose
-
AWS
Example processor (for reference)
Detailed requirements
1. Processor requirements (major)
The new processor should listen to all submission topics, when it receives an event, it should gather information about the following by calling other APIs:
-
User
-
Challenge
-
Submission
And post that information to another topic.
The processor should use M2M (Machine-to-machine) tokens.
Use this library https://github.com/appirio-tech/tc-core-library-js/releases/tag/v2.4.1 for M2M. Please note that you need to refer to it via git instead of npm.
For now, we need to cover the following topics:
-
submission.notification.create
-
submission.notification.update
The above topics should be configurable.
You will find example payloads attached on the forum.
Retrieve the following information from the challenge API (/v4/challenges/:id) about the challenge:
-
challengeTitle
-
challengeId
-
submissionEndDate
-
prizes
-
challengeCommunity
-
subTrack
-
technologies
-
platforms
-
numberOfRegistrants
-
numberOfSubmissions
Retrieve the following information about the user from the member API:
-
handle
-
rating
-
email
Retrieve the submission information (including review information when available) by calling the the /submissions endpoint (you will find an example call attached on the forum).
Send an event by posting to the (configurable) test.email topic and passing an object containing all the information above as payload.data.
You'll find an example event body available on the forum.
API specs:
https://github.com/appirio-tech/ap-member-microservice/blob/dev/swagger.yaml
https://tc-submission-api-dev.herokuapp.com/docs/
2. You need to create unit & e2e tests for the processor (major)
The name of this new processor should be: submission-notification-processor
Feel free to ask on the challenge forum!
What to Submit
Submit:
-
The processor source code
-
Detailed configuration and deployment instructions (README.md)
-
A verification document