Challenge Overview
Important! This is a fast challenge! All phases are shorter than usual. Make sure you don’t miss any deadline.
Challenge Objectives
-
Improve the V5 Challenge API so we can start integrating it with our front end apps.
Tech Stack
-
Node.js
-
Swagger
-
DynamoDB
-
ElasticSearch
Project Background
In this series of challenges, we will build the version 5 (V5) of the challenge API.
Code Access
Challenge API
Repo: https://github.com/topcoder-platform/challenge-api
Branch: develop
Challenge Processor ES
Repo: https://github.com/topcoder-platform/challenge-processor-es
Branch: develop
You may also have to run the Resources API locally https://github.com/topcoder-platform/resources-api (develop branch)
Detailed requirements
As part of this challenge, you need to make the following changes on the challenge API and the ES processor:
-
Update the ES processor so it adds a new property to the challenge object. The new property should be named “currentPhase” and should basically be an object same as the last object in the “phases” array which has “isActive” set as “true”.
-
Update both the challenge API and the ES processor to support a new property named “endDate”. The value of this property should be the end date of the last phase in the phases array of the challenge object. The phases do not actually have dates. They just have durations so you need to follow the same technique as here https://github.com/topcoder-platform/challenge-engine-ui/blob/develop/src/util/date.js#L52 to get the actual date.
-
On the challenge API, add support for filtering challenges by startDate and endDate.
-
On the challenge API, add support for filtering challenges based on the currentPhase (id/name).
-
Add a privateDescription property to the challenge model that will be optional and will only be returned if the user is registered on the challenge. Make sure to update all related endpoints to support this new property as well as the ES processor.
-
Make sure to update the Swagger as well as the POSTMAN collection to reflect all changes.
-
Update existing tests to pass and make sure to cover all new code with tests.
Should you have any questions, feel free to ask on the challenge forum!
What to Submit
Submit a git patch file for the latest commit in the develop branch of each repo.
Make sure to mention the exact commit you used so we can apply your patch without issues.