Register
Submit a solution
The challenge is finished.

Challenge Overview

A Large IoT and Power Management Company would like to consolidate all of their employee technical competency into a single tool which can be used to track at multiple levels. The goal is to have an application that allows CoE leaders to define roles with their competency requirements, and actions or trainings which prove each competency level. Managers and Directors will be able to track profiles with roll ups of competency in specific sections of the workforce.

 

In the previous challenge, we created the base code for our backend API and the first set of endpoints covering all endpoints with the tags:

  • Authentication

  • User

  • Competency

  • SubCompetencies

  • Levels

  • Activities

In this challenge, we need your help to create the next set of endpoints as defined in the provided Swagger API definition (attached on the challenge forum, available on registration) and you also need to update some of the logic (see more details in the Detailed Requirements section).

 

You will work based on the provided starter pack.

Tech Stack Overview

  • Node.js (latest version)

  • Express.js (latest version)

  • MSSQL as DB with Sequelize

Security

All endpoints must be protected and JWT passed in the request header must be used for authentication.

User Roles

  • Leader

  • Director

  • Manager

Detailed Requirements

  • Create the endpoints with the tag EmployeeSubCompetency. Use an intermediate table to store the following details for the connection:

    • currentLevel (required integer pointing to the SubCompetencyLevel)

    • currentMaturity (required string)

    • expectedMaturity (required string)

  • Add support to import CSV file (format explained in the next section). The import functionality will work as following:

    • Import employees to SubCompetencies by employee EID with specific maturity level.

    • If the employee's current level for the given subComp is bigger than the level from the CSV, ignore the operation.

    • If the employee's current level for the given subComp is smaller than the level from the CSV mark all activities from all previous levels as completed and update the maturity level if needed.

    • If the employee's current level for the given subComp is equal to the level from the CSV, just update the maturity level if needed.

  • Implement the GET /statistics endpoint.

  • Create both positive and negative POSTMAN tests for the new/updated endpoints.

  • Update the Swagger document where needed and include the latest version in the /docs folder.

  • Update the README with any new details/instructions needed on how to setup and run the app (if they don’t already exist).

CSV Format Example

Competency ID, SubCompetency ID, Level ID, Employee EID, Current Maturity, Expected Maturity

123, 1234, 12345, ABC123, Basic, Intermediate

 

You are allowed to modify the format if needed.

 

General Notes

  • If any of the requirements described in the challenge specification doesn’t match with the Swagger document, you need to follow the challenge specification and update the Swagger to match the specification. If you have any doubt, please confirm in the challenge forum.

  • All POST, PUT & DELETE operations must be logged in a separate table.

  • Users with Director, or Manager role only have access to the /statistics endpoint.

  • All entities must have timestamps (createdBy, createdAt, modifiedBy, modifiedAt).

  • Follow the best practices for creating Node.js API.



Final Submission Guidelines

Submit a git patch for the latest commit in the develop branch.

ELIGIBLE EVENTS:

2018 Topcoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30066696