Challenge Overview
Challenge Objectives
-
Create a Scorecard API using Topcoder’s v5 standards
-
Provide Swagger specification
-
Implement the endpoints in Nodejs
-
Provide Tests
Project Background
-
The scorecard api will help copilots assign multiple scorecards to a project
Technology Stack
-
Swagger specification version 2
-
Nodejs version 10
Code access
This is the first contest in the project so there is no code base to share
Individual requirements
Write Swagger based specification for an api (Major requirement)
-
There will be two resources in scope for this contest: Score System and Scorecard. The schema for these two will be shared in the contest forum.
-
You need to follow the v5 standards document that we will share with you in the contest forum. These standards describe how we need to model our resources and endpoints.
-
For reference purposes, you can also refer to the submission api, which is also based off the v5 standards. However, note that while submission api uses generators, you need to use async await pattern.
-
You need to create the swagger based specification for CRUD and HEAD based endpoints for the two resources
-
You don’t have to support pagination for any endpoint. No headers or query parameters or validation expected here. If the api client does provide one in their request, we ignore it.
Implement the endpoints in Nodejs (Major requirement)
-
After writing the specification, proceed to implement them in Nodejs.
-
Use Express js as your server framework.
-
Implement all the endpoints to match the specification defined in Swagger.
-
Use Dynamodb as your database.
-
The endpoints will have a prefix of “/v5”. Score System will come under “/v5/scoreSystems” and “/v5/scorecards”
-
For the search using query parameters implementation, you can read all the data from Dynamodb and search during runtime in the code itself instead of using CONTAINS operator. This is only for Score System resource. For scorecard resource, you need to perform case sensitive search in Dynamodb (user cannot search scorecardDetails attribute)
-
For the Scorecard endpoints, when returning the scorecard details, you need to also return the name attribute using the Score System ids. This is a minor requirement.
Deployment guide and validation document
Create a deployment guide using markdown. Provide instructions on how to deploy your app locally.
Important Notes
-
Use standard as your linter. Ensure there are no lint errors and create a npm script to allow us to run the linter.
-
You need to provide unit tests and end to end tests using mocha and chai for all the endpoints. Reviewers will consider the section in the scorecard dedicated for tests and not consider this in the Major Requirements section. Test coverage needs to be more than 80%.
-
���Each endpoint requires authorization. Follow the same logic as used by the submission api in securing the endpoints. You do not have to worry about which users are allowed access - Topcoder User or Copilot roles or scopes or something similar as long as you make provisions to allow us to update them. Use the tc-core-library-js for your authentication purposes. (You will find examples in the submission api on how you can use this module).
Final Submission Guidelines
Zip your source code and upload it to Topcoder. Ensure that there are no lint errors, that it has the swagger specification in it and also the Deployment Guide.