Topcoder Project Service - Create demo data

Register
Submit a solution
The challenge is finished.

Challenge Overview

Crete a script for seeding a demo data for local development purposes.

Project Background

Topcoder Project Serice is the main backend service of the Topcode Connect - client facing application of Topcoder.

Currently, when we run Project Service locally for developing purpose we have to use Postman to create a demo data to work with. As there are already a lot of entities in Project Service, creating demo data manually takes time so we want to create a script which will seed demo data.

Technology Stack

  • Node.js

  • PostgreSQL

  • ElastiSearch

Code access

The work for this challenge has to be done in one repository https://github.com/topcoder-platform/tc-project-service dev branch.

You would have to verify that demo data works well by running Connect App locally https://github.com/appirio-tech/connect-app dev branch.

Individual requirements

Create a seed script which will create 7 projects.

  • The script and related files should be placed into local/seed folder.

  • This script should be called by ‘npm run seed

  • We already have seedMetadata script which copies metadata from Topcoder DEV environment to local deployment.
    - move it to local/seed folder
    - reuse it inside the new seed script (you may modify it to be able to call it from the new script)
    - this script will create most of the data which we need to create projects

  • Seed script should create 7 projects:
    - create json files with data for projects, don’t copy them from dev as it’s done for metadata
    - to be able to create projects you would need to populate some dependent data like projectTypes - create json file for them also
    - all the demo data should be created by calling Project Service API endpoints rather than writing to DB directly, same like it’s done for metadata. The only difference, instead of getting data from the DEV environment we prepare json files.

  • So the overall script will look like this:
    - call seedMetadata script to populate metdata
    - populate the rest of dependant entities like projectTypes
    - populate 7 projects with different statuses https://github.com/topcoder-platform/tc-project-service/blob/feature/fix-metadata-seed-script/src/constants.js#L1 Also, please use different sets of members for each of these projects.

  • Note: use Postman collection to understand what demo data can look like.

General requirements



Final Submission Guidelines

Patch to the dev branch of Project Service.

Review style

Final Review

Community Review Board

Approval

User Sign-Off

Challenge links

ID: 30086428