Challenge Overview
Challenge Objectives
Welcome, in this challenge we will update Bookings API that we have developed for the new app that will be used to manage topcoder TaaS(Gig Work)
Project Background
We’re building a new APP to manage Topcoder Talent as a Service offering. That includes creating new job postings, members applying to jobs, customers reviewing job applications and finally assigning members to jobs and managing feedback from both clients and members. This application will have microservice as the backend API and frontend developed with React JS.
In the previous challenge, we created the APIs based on swagger, now in this challenge we will like to make some changes and add ElasticSearch(ES) for better performance.
After this challenge, we will integrate these APIs with the front-end app developed on React JS.
Technology Stack
NodeJS, PostgreSQL, Sequelize, Express, Elastic Search
Code access
The codebase is shared on the forum.
Individual requirements
We have two major requirements for this challenge:
-
Change the userId to UUID instead of integer in the database.
-
Integrate the ElasticSearch(ES)
Requirement #1
Currently, the userId field is stored as the integer value which is extracted from the user's JWT token. This field needs to be updated to UUID, and the value for UUID should be fetched from V5 /users API.
The API call is GET TC_API/v5/users?enrich=true&externalProfile.organizationId={orgId}&externalProfile.externalId={userId}
-
TC_API and orgId fields should be configurable
-
userId is the integer value, which you get from the JWT token.
This API will return all matching users and we should use the first one. If no users are returned, throw an error.
Requirement #2
Currently, we are only using PostgreSQL to store the data, but we want to leverage the elastic search. For this, we need to update all
-
POST/PUT/PATCH/DELETE endpoints:
-
to save/update/delete data in elastic search as well,
-
-
update the search endpoints:
-
���to search the data in the ES index instead of from the PostgreSQL database.
-
-
GET "entity/:id":
-
��� should still return the data from the database.
-
General for all requirements
- Use the controllers/services model for the new API.
- Logging is required for all services.
- Unit tests are required. Test Coverage shouldn’t be degrade
- Update swagger if you’re making any changes to API definition in this challenge, and create Postman scripts for validation.
- NOTE: Logging standards document is posted in the forums - update all the existing endpoints to match the logging standard.
- NOTE2: To generate user tokens, go to https://connect-auth0.topcoder-dev.com and log in with one of the demos user accounts and then find the generated token by inspecting the network requests in browser console
Winner Responsibility
- The winner will need to send the merge requests on the Gitlab
- The winner has to fix the issues identified by the reviewer as a final fix within 24hr as a part of scope.
Final Submission Guidelines
Please submit the zip file containing
- ���Updated source code including updated readme with details on how to configure, build, run and test the service
- Submit the updated Postman files for verification