This repository hosts the frontend code of the covid-self-report project.
This project is based on Vue.js and vue-cli, using Argon design template from Creative Tim.
For front-end developers, please check the develop section section.
The following things are needed:
The reports data source is an online CSV file containing a summary of the reports by location, summed by status.
You can check the format here.
A second file containing the last update time of the data source has also to be provided (last_update.txt). It's an ASCII text file containing the date in ISO format.
The report data source is generated by consolidation scripts in the backend.
This file must available online with a very high uptime and huge load capacity. It is used for the visualization and will be downloaded by each user.
The geocoding data source is an online CSV file containing, for each location, the name of the location and the geographical coordinates.
You can check the format here.
The geocoding data source has to be set up for each country.
This file must available online with a very high uptime and huge load capacity. It is used for the visualization and will be downloaded by each user.
The frontend uses vue-cli. Please refer to the official documentation for setup instructions.
Please be sure to use 'yarn' instead of 'npm' as package manager.
.env
file based on the .env.example
file and fill it with your configuration. See below to learn more about the configuration.yarn serve
to test locally and yarn build
to build applicationVUE_APP_REPORT_LOCATION_SELECTOR=postal-code
VUE_APP_PINCODE_LENGTH_VALIDATION=6
If you want to develop on the front-end, you can set-up the configuration with existing data sources from an already running instance.
For example, to point to the Swiss data source, put this in your .env file:
VUE_APP_VISU_DATA_SOURCE_URL=https://raw.githubusercontent.com/ch-covid-19/datasets/master
VUE_APP_VISU_GEOCODE_URL=https://raw.githubusercontent.com/ch-covid-19/datasets/master/geocoding.csv
VUE_APP_VISU_LAST_UPDATE_URL=https://raw.githubusercontent.com/ch-covid-19/datasets/master/last_update.txt
Translations are done with the online POEditor service.
The process for translators is the following :
Contributions are welcome through merge requests.
This section will be updated soon...