Challenge Overview
Challenge Objectives
-
Build base code for the new Topcoder Bookings API
Project Background
-
We’re building a new API to manage Topcoder Talent as a Service offerings. 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
-
Follow-up challenges will expand the API implementation. Once the API is built, deployed and tested, we will create a custom frontend app to make use of this api.
Technology Stack
-
NodeJS
-
Postgres
-
Sequelize
-
Express
Code access
We’re creating a new service in this challenge so the codebase setup is your job. We do wan’t Topcoder services to have similar structure so please follow the project code structure of a sample v5 API service - submissions api
Individual requirements
Api specification is posted in the forums. Scope of this challenge is the following:
-
Create sequelize models
-
Implement API endpoints defined in the swagger doc
-
Implement unit tests for all service methods
-
Create Postman collection for api verification
There are three entities that are managed by this api: Jobs, JobCandidates and ResourceBookings. First two are job postings and job applications workflow, while resource bookings keep track of actual member assignments to the jobs (all future actions like feedback, payments, etc will be tied to resource bookings).
All API endpoints require authentication and a valid Topcoder JWT token. Additionally, access to create/read/update/delete operations on individual records will be managed in an external service (projects api), which means that if a user has access to the backing project (identified by projectId), he can also manage the record. There will be three types of users accessing the api:
-
Users with access to the backing connect project (this is verified by calling GET v5/projects/:id - successful response means user has access to the project)
-
Users with topcoder role ‘bookingManager’ - role information is available in the JWT token
-
Other logged in users - this covers all other Topcoder users and they will only have access to managing their job applications
Access requirements for each api action are posted in the forums.
Additionally, for resource bookings, not all users will be able to see all the fields. Member/Customer rate fields will only be accessible to bookingManagers, member rate will be available to the member assigned and customer rate will be available to all other users in the connect project.
General for all requirements
Use controllers/services model for the new API. Logging is required for all services. Unit tests are required. Update swagger if you’re making any changes to API definition in this challenge, and create Postman scripts for validation.
Submission Guidelines
-
Submit a Readme with details on how to configure, build, run and test the service
-
Submit Postman files for verification