Backend service powering the Mission Control dashboard
If you only want to hack on the UI, you can set up a local-only of missioncontrol which pulls data from the current production server. You only need to have yarn installed.
Run:
yarn install
yarn start
This should start up a webserver at http://localhost:5000 which you can connect to.
Make sure you have docker, docker-compose, and yarn installed.
Then run:
yarn install
cp .env-dist .env
make build
make up
make fixtures
The main web service is available at localhost:8000/api/aggregates/ and it accepts 2 query parameters:
- measurements: list
- dimensions: list
Every other query parameter matching one of the dimension names will be considered as a filter over that dimension. The only types of filter supported are an exact match and range comparison. Single-valued query parameters are interpreted as exact matches, while multi-value parameters are interpreted as range comparison. In the example below,
country
is an exact match, whileversion
is a range comparison.
Example query string: dimensions=os_name&dimensions=os_version&dimensions=country&measurements=main_crashes&country=GB
The target environment for this project follows the dockerflow conventions. In order to run it correctly, a number of environment variables need to be set up. The full list of variables can be found in the web section of the docker-compose.yml file. From a services standpoint, this project requires:
- a Postgres DB to store the application data, defined by DATABASE_URL
- a Presto/Athena service, defined by PRESTO_URL
- an optional Redis cache service, defined by CACHE_URL