Challenge Overview
Challenge Objectives
Welcome, in this challenge we will create a new micro-service which will be backend for frontend(BFF), the TaaS app.
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 have created the prototype of the frontend. Now, in this challenge, we will be developing new backend APIs for this app.
Technology Stack
NodeJS, PostgreSQL, Sequelize, Express, Elastic Search
Code access
The required assets are shared on the forum.
Individual requirements
We have two major requirements for this challenge:
-
Create a new micro-service for the taas app
-
Update the existing taas-api as required by these aggregate API
We will create a new micro-service based on the provided swagger.
Implement GET /taas-teams
- Based on the current user’s token call the /v5/projects?type=talent-as-a-service, it will return the projects in which the user has the permission.
- for each project, compute the responses as below:
- id: the project id
- Name: the project name
- startDate: lowest start date from the result of taas API GET /resourceBookings?status=assigned . If no resource is found(assigned) then return null.
- endDate: max end date from the result of the same resource bookings API above If no resource is found(assigned) then return null.
- weeklyCost: the sum of “customerRate” of all resources which are assigned in this weeks based on the start and end date of the resources. If no resource is found(assigned) then return 0.
- totalPositions: the sum of numberOfPositions in all jobs for this project, use TaaS /jobs?projectId={id} to get the jobs for that project
- resources: get user details from /v5/users with user ids the result of the same resource bookings API above
- To get the user photo URL please use v5/members?fields=userId,handleLower,photoURL&handleLowers=[]
Implement GET /taas-teams/{id}
- Check if the current user has permission on the project based on id
- Use TaaS API GET /resourceBookings?projectId={id}&status=assigned to get the resources
- Skills should be resolved using the v5/skills endpoint
- Compute the skillMatched based on Job’s skills and resource skills by simple matching
- Optionally v5/userskills endpoint has skills mapped to users. Leverage this option as deemed fit.
- Get jobs from TaaS API get /jobs?projectId={id}
- Skills should be resolved using the v5/skills endpoint
Implement /taas-teams/{id}/jobs/{jobId}
- Check if the current user has permission on the project based on id
- Get all job candidates from TaaS API GET /jobCandidates?jobId={jobId}
- Resolve the user by userId with v5/users API
- User v5/members to get the photo URL
- Gets the skills of members from v5/users API and resolve them
- Compute the skillMatched based on Job’s skills and member’s skill
Health Check
Please implement a health check on the new microservice. For this please use library topcoder-healthcheck-dropin
- For API, configure the topcoder-healthcheck-dropin to use as middleware with the below check.
- It should return the `checksRun: 1` in the response if successful.
General for all requirements
- Use the controllers/services model for the new API.
- Unit tests with a minimum of 90% coverage on both source code are required
- Logging is required for all services. Please follow the provided logging standards document posted in the forums.
- Update swagger if you’re making any changes to API definition in this challenge, and create/update Postman scripts for validation if required.
- Make sure no functionality is broken or altered
- Provide the docker deployment as well.
Final Submission Guidelines
Please submit the zip file containing the following:
- Source code for both taas-api and taas-aggregator-api including readme with details on how to configure, build, run and test the service
- Submit the verification guide