Skip to content

Latest commit

 

History

History
41 lines (32 loc) · 2.34 KB

README.md

File metadata and controls

41 lines (32 loc) · 2.34 KB

mh-kwann

MedHacks 2020 - Enabling Physicians to improve opioid response plans through aggregated First Responder data.

What's goin on here?

   {Firestore}
      ^    |
      |    v
 {Cloud functions}
      ^    |
   report fetch
      |    v
 {Client (Flutter)}

Dev Setup

Dashboard Web App (Plotly Dash)

In client directories (reporter)

i. The following commands can be done more easily if in a virtual environment (like conda) so it highly recommended to install Anaconda beforehand.
i (cont). With Anaconda installed, open up the command line and enter: conda create --name py3 python=3.6 to create a new virtual env and enter conda activate py3 to start using it.
ii. Navigate to the correct folder and install the dependencies with the following command: pip install -r requirements.txt
iii. Use the following command to start the app on a local server: python app.py

Frontend (Flutter)

In client directories (reporter)

i. Install Flutter
ii. Ensure Android SDK is installed (install Android Studio if necessary)
iii. Run flutter doctor to check if dev environment is good (shouldn't need to worry about Android Studio or vscode checklist)
iv. Connect device / emulator and run flutter devices to check if connection is good
v. Execute flutter run and let it build - should open on phone / emulator and hot-reload any code changes.

Backend (Firebase)

npm install -g firebase-tools

At the moment it's unclear how you can set firebase up locally to point to the firebase instance on Neil's Google account... But that hopefully shouldn't be necessary for local testing.

All the API stuff is in functions/index.js. In the functions folder run firebase emulators:start and open localhost:4000 for a sweet dashboard. To test out endpoints I'd suggest using Postman.

If firebase is being too Google-y and insisting you have to link it locally to an account (ie can't find my mh-kwann project), follow this tutorial to spin up your own firebase account, but -- try to keep any code changes that induces out of git please!!