Skip to content

wswin5k/therapy-track

Repository files navigation

App icon — a tablet on a blue screen with checkmark

Therapy Track – medicine and assessments tracker

  • Track your medication use with recurring schedules and one-time entries.
  • Receive notifications when it is time to take your medication or complete an assessment.
  • View your usage history and export it to a CSV file.

Home screenshot Home screenshot Home screenshot

Installation on Android

The following instructions require only adb (from Android platfrom-tools) and docker installed. The building processs takes place inside of a docker container. The instructions assume physical Android device, although it will work similar for an emulator.

Tip

The commands below have shortcuts in Makefile.

Development set-up

This setup requires constant connection with the host and allows hot reloading of javascript code.

Tip

Generating keystore in step one needs to be done only once. Once the app is installed steps 2, 3 and 4 can be omitted unless there are changes in native code or dependencies.

  1. Generate a keystore for signing the APKs
docker compose run --rm expo keytool -genkey -v \
  -keystore android/app/debug.keystore \
  -storepass android \
  -alias androiddebugkey \
  -keypass android \
  -keyalg RSA \
  -keysize 2048 \
  -validity 10000 \
  -dname "CN=Android Debug,O=Android,C=US"
  1. Build the development docker image
docker compose build expo
  1. Build a debug APK.
docker compose run --rm expo bash -c "npx expo prebuild --platform android && cd android && ./gradlew assembleDebug"
  1. Connect your device and install the development application
adb install android/app/build/outputs/apk/debug/app-debug.apk
  1. Enable port forwarding
adb reverse tcp:8081 tcp:8081
  1. Start the development server
docker compose up expo
  1. Open the application on the Android device. Now whenever you make code changes the application should reload.

Release build

  1. Build a release APK.
  docker compose run --rm expo bash -c "npx expo prebuild --platform android && cd android && ./gradlew assembleRelease"
  1. Connect your device and install the release application.
adb install android/app/build/outputs/apk/release/app-release.apk

Development with VSCodium and container environment

VSCodium doesn't have proprietary Dev Containers VSCode extension. Instead it can be connected to the container with Open Remote - SSH extension.

  1. Generate new ssh key and copy the public key to the project directory
  ssh-keygen -t ed25519 -N "" -f ~/.ssh/expo-container && mkdir -p ssh && cp ~/.ssh/expo-container.pub ssh/
  1. Build and start the container with ssh server.
  docker compose up --build expo-sshd

The ssh server will be available on localhost on 50022 port.

  1. In VSCodium "Run a Command": "Remote-SSH: Connect Current Window to Host" and enter the connection string node@localhost:50022

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors