Challenge Overview

Challenge Objectives

  • Rewrite the backend api for an existing web app to support more features to be built in the coming months.

 

Project Background

  • The Scout web app, now available at scout.energy.gov, was developed over the past two years through a collaboration between BTO, the national labs, and Topcoder. The app improves the user-friendliness of several key Scout features; for example, it allows one to easily estimate the portion of U.S. building energy use and CO2 emissions that a candidate technology might affect; to rapidly create new Scout energy conservation measure (ECM) definitions and send them to BTO for review; and to interactively visualize energy use, cost, and CO2 emissions results for ECM portfolio simulation runs.

  • The app’s capabilities improve the accessibility of Scout data and results and might expand the base of users that wish to contribute new Scout ECM definitions or run custom Scout analyses. Looking ahead, further enhancements to the app will continue to improve the tool’s potential for broader impacts across the building simulation community.

  • In this round of Scout web app development, we have the following major objectives:

    • enable end-to-end Scout analyses within the web app,

    • add user accounts to support saving custom ECMs and analysis results,

    • update existing app components to reflect new Scout features, and

    • apply final fixes and performance improvements to existing features and app architecture.

 

Challenge Background

  • We built the current version of the Scout web app with a simple node.js based backend using sqlite as the datastore. It allows public access and doesn’t support user accounts, which is limiting what users can do with the web app.

  • In these backend challenges, we are re-writing the backend to provide full support of user accounts, different user roles and better control of user access to the api. You may still be able to reuse some of the code from the current implementation (provided in the forum), but it makes more sense to just start clean and create a new API based on the swagger documentation we provided in the forum.

  • We plan to run the API in docker, please keep that in mind and make all configurable parameters such as database connection strings easy to configure through environment variables.

 

Technology Stack

  • Node.js

  • Postgres

  • REST

  • SMTP

  • JSON

  • Docker

 

Detailed Requirements

In the last challenge, we have implemented most of the endpoints but left out some of them that required integration with python scripts::

  • Work queue: we added TODO comments in the code to the implementation of all the endpoints that involved a work queue, you should consider using a framework like node-celery to implement this.

  • Scheduler job: scheduler job was out of scope and must be handled in this challenge, you should consider using a framework like node-celery to implement this.

  • Google Captcha: this is still out of scope.

  • Any implementation that will involve calling the external Python module was out of scope but needs to be covered in this challenge.

  • For GET /ecm-market-affected-range, we were returning mock data in the last challenge, it needs to be replaced with real implementation in this challenge.

 

To summarize, here is the scope of this challenge:

  • Implement everything that’s in the swagger but wasn’t implemented in the last challenge, which includes integration with python scripts, implementing work queues, implementing any TODOs from the last challenge, replacing endpoints that returned mock data with real data and covering any endpoints that might have been missed in the last challenge.

  • Your submission must be based on the code we provided, and you should follow the same coding & documentation standards.

  • Keep postman & swagger documentation in sync with your implementation.



Final Submission Guidelines

  • Full code that covers all the requirements.

  • Postman collection file to properly test the API (covering positive and negative cases).

  • A detailed README file including information on how to configure, run and verify your application.

ELIGIBLE EVENTS:

2020 Topcoder(R) Open

REVIEW STYLE:

Final Review:

Community Review Board

Approval:

User Sign-Off

SHARE:

ID: 30126528