Challenge Overview
Topcoder Open is approaching rapidly, and we want to prepare a new scoreboard solution for the championship. It will include two pieces: admin part that allow to enter (edit) into the system information about competitions / participants / score; and display part that will render public leaderboards based on that information, and will allow to easily style each leaderboard in a necessary manner.
As the base for development you will use Community App. You should work out of the latest commit in develop branch (a861093b92fed4848d54284e7a4f364764d08b75 at the moment of writing), and follow our Coding Standards. All the code related solely to TCO scoreboard should be placed under /tco/scoreboard path of standard folders (i.e. /src/shared/components/tco/scoreboard for ReactJS components, /src/server/tco/scoreboard for backend pieces, etc.).
All scoreboard data should be stored in PostgreSQL database. Currently, Community App does not provide access to any database, so you will set it up, following the best practices. Pay attention to the following:
As the base for development you will use Community App. You should work out of the latest commit in develop branch (a861093b92fed4848d54284e7a4f364764d08b75 at the moment of writing), and follow our Coding Standards. All the code related solely to TCO scoreboard should be placed under /tco/scoreboard path of standard folders (i.e. /src/shared/components/tco/scoreboard for ReactJS components, /src/server/tco/scoreboard for backend pieces, etc.).
All scoreboard data should be stored in PostgreSQL database. Currently, Community App does not provide access to any database, so you will set it up, following the best practices. Pay attention to the following:
- Only server-side of our app should have the direct access to the database (thus the service providing this access, should be server-side only);
- Database URL should be exposed to configuration files, and it should be possible to override it by environment variables (if not sure, how to do it, check node config documentation). Database configuration should be stripped out from configuration injected into the frontend (i.e. remove related keys here).
- Database should not be a hard requirement! The app should work fine without database URL provided, or with incorrect database URL provided!
- Information on launching the app with database (locally and remotely) should be added to the app’s documentation).
Administrative functionality.
We need services (for use within the app) and REST API to do the following:- Create / edit a challenge. It will put into the database the following information about the challenge: ID, type, title, brief description, handles of competitors.
- Update competitor’s progress: this will update competitor’s status on the specified challenge, writing to the database his score, time of submission, sumbission type (provisional / final), state (idle / testing / complete), score. The actual data to put into the database should be configured per challenge type.
- Corresponding service checks, whether it is executed client- or server-side. On the client side it sends corresponding request to our REST API, on the server-side it does the real job: checks user’s admin permissions (using Topcoder backend, and checking that user belongs to a group that we can configure in app config); if authorized, it validates the data and performs operation updating database content appropriately.
- The REST API, just proxies the real work to the isomorphic service at the server side.
- For challenge type configuration, we should be able to create a JSON file per challenge type, in which we can specify which data (and of what type) are accepted per competitor (this will serve for validation of input, and will describe database scheme for challenges of this type), and how the leaderboard should be sorted based on this data (e.g. time ascending, score descending).
Public functionality.
- We add a page, that renders leaderboard for the specified competition out of data in the database. It should be mounted on a publically awailable route, that has competition ID as a parameter.
- It should show:
- Challenge name across the top
- Description of the challenge
- Leaderboard table
Basically, it should show all data contained in the database for the challenge of this type.
- We don’t have any design at the moment. Create something simple and clean, which shows necessary data, and uses react-css-themr for styling, so that it is easy to override styling per challenge later.