Skip to content
This repository was archived by the owner on Apr 7, 2022. It is now read-only.

covid19cz/erouska-webapp

Repository files navigation

COVID-19 Bluetooth Tracking App - Web Application

TBD

Installation

The project is designed for Python 3.7 and it's recommended to install all dependencies into venv. Check the cookbook for getting familiar with venv.

Frontend is built by npm - you have to have it installed.

When the app is running, you can try to upload testing file.

Bash, Fish

You can use source install_local.sh (bash) or . install_local.fish (Fish) prepared script.
Or, do it by your own:

git checkout https://github.com/covid19cz/bt-tracing-webapp.git
cd bt-tracing-webapp

python3 -m venv env
source env/bin/activate # . env/bin/activate.fish for fish

cd src/btwa_frontend \
    && npm i \
    && npm run build \
    && cd ../..

pip install -e .
covid19-btwa

Backend configuration

Environment variables:

  • GOOGLE_APPLICATION_CREDENTIALS: Path to Firebase Admin JSON credentials
  • FIREBASE_DB_URL: URL of Firestore database
  • FIREBASE_STORAGE_BUCKET: URL of Cloud Storage bucket
  • DATABASE_URI (optional): Connection string for SQL database (if unset, defaults to SQLite)

DB initialization

  • Initialize database
$ cd src/btwa_api
$ alembic upgrade head
$ python scripts.py add-handler user pass

Running manually:

# run with default worker
$ cd src/btwa_api
$ python main.py

# run with uvicorn
$ cd src/btwa_api
$ uvicorn main:app

When the app is running, just open it in your web browser.

IDE

Checkout the REPO from your favorite IDE and open the project. If you used venv, don't forget to setup it in the IDE or it will report you don't have installed proper dependencies!

Frontend config

Settings for frontend is in CONFIG.json.
You probably don't want to change it.

{
  // server url - can be empty if running on the same machine
  "SERVER" : "",
  // POST request endpoint
  // submits array of BT IDs
  "GET_PHONE_NUMBERS" : "fakePhones.json"
  // table column mapping
  "ENCOUNTER_FROM" : "Encounter_from",  
  "ENCOUNTER_TO" : "Encounter_to",
  "ENCOUNTER_ID" : "Encounter_BT_id",
  "PHONE_NUMBER" : "Phone_Number",
}

About

No description, website, or topics provided.

Resources

License

Rate limit · GitHub

Whoa there!

You have triggered an abuse detection mechanism.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6

Rate limit · GitHub

Whoa there!

You have triggered an abuse detection mechanism.

Please wait a few minutes before you try again;
in some cases this may take up to an hour.