Challenge Overview
Challenge Objectives
-
To have new submissions go through a Code check using SonarQube.
Project Background
-
This project aims at assigning a score to submissions based on their code quality
-
SonarQube is a tool that allows users to inspect the health of their code and identify issues that can improve the code quality
Technology Stack
-
Nodejs (version 10 latest)
-
Kafka (version 2 latest)
-
Mongodb (version 4 latest)
-
SonarQube. Kindly use docker here for the instance.
Code access
-
This is the first contest and thus there is no existing source code. You will be writing the app from scratch. However, you will find that the code base and functionality is very similar to the existing submission processor code.
Individual requirements
Create a Kafka Listener (Major Requirement)
-
Create a nodejs based Kafka listener that will listen to multiple topics on Kafka.
-
The topics of concern are related to the event where a submission is created or updated.
-
Use no-kafka module
Create a SonarQube service(Major Requirement)
-
This is part of the same app as the kafka listener.
-
For each message that arrives in Kafka, check if the message is related to the Submission resource.
-
If so, then that message will contain a url about the submission’s location. Download the submission and proceed to pass it on to SonarQube for inspection.
-
Retrieve the results for the submission’s code quality and prepare a review payload to submit to the submission api.
-
All details for this are shared in the contest forum
Create Unit Tests (Minor Requirement)
-
Write unit tests in mocha and chai.
-
Only Unit tests are needed. End to end tests are not needed
Deployment guide and validation document
-
Provide a README.md that contains instructions on how to config, build, deploy the app locally, and deploy to heroku
Important Notes
-
Use async and await pattern in your code base. Please don’t use yields and generators. Use promises.
-
Lint your code base using the standard module.
-
Note that you will be using Nodejs version 10 (soon to be LTS release) for this project.
Final Submission Guidelines
Zip your code base and upload it to Topcoder.