COVID-19 Bluetooth Tracking App - Web Application
TBD
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.
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
- 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)
- Initialize database
$ cd src/btwa_api
$ alembic upgrade head
$ python scripts.py add-handler user pass
# 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.
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!
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",
}