An app that alerts you (sends you a push notification or a persistent alarm) upon the arrival or a departure of a public transport connection from stops.
This is a monorepo managed by npm workspaces. The individual components of the app are stored in separate packages:
Package Name | Description |
---|---|
@voyalert/app | The React Native app |
@voyalert/backend | The Express backend server |
@voyalert/utils | Tiny dev utility scripts |
@voyalert/i18n | COMING SOON |
Upcoming features and improvements can be viewed on the Trello of VoyAlert.
COMING SOON
This section covers how to build the full app - both @voyalert/app and @voyalert/backend. Consult the README files of the individual packages if you want to run them as dev or build them separately (COMING SOON). Note that building for iOS is NOT supported as of now.
- Node and NPM
- OpenJDK 17 - download prebuilt from Microsoft
- Android 14 SDK (API 34) (installable within Android Studio)
- Docker
- Git (optional - only for git clone, the repository can also be downloaded as a ZIP)
- Start by cloning this repository and installing the dependencies:
git clone git@github.com:ondrejnedoma/voyalert.git
cd voyalert
npm i
-
Add the Android platform-tools to PATH. This folder is by default %LOCALAPPDATA%\Android\Sdk\platform-tools
-
Create the ANDROID_HOME environment variable. This folder is by default %LOCALAPPDATA%\Android\Sdk
-
Setup the app signing keys and the according gradle variables. Use these instructions on the React Native website for reference (more specific instructions COMING SOON).
-
This step is optional. If you want to be able to use the custom built backend with the app (and not only the default prod server), you will need to replace the
voyalert/packages/app/android/app/google-services.json
file with your own one, obtained from the Firebase console. You will also need to generate a Firebase admin credential from the Google API console, and place it invoyalert/packages/backend/voyalert-xxxxx-firebase.json
. Then renamevoyalert/packages/backend/EXAMPLE.env
to.env
, and change theGOOGLE_APPLICATION_CREDENTIALS
variable inside the file to match the Firebase admin credential filename. In this casevoyalert-xxxxx-firebase.json
. -
Ensure Docker is up and ready to build the backend image:
docker ps
- Run the build command. A new terminal window will pop up (the React Native Metro server), you need to close that window for the build process to finish:
npm run build
-
If both the app and backend build process were successful, you will be able to find the app build at
voyalert/packages/app/android/app/build/outputs/bundle/release/app-release.aab
, and the backend will have built as a docker imagevoyalertbackend
. -
This step is optional. If you want to transfer the docker image to a different system, you can run this command to save it as a file at
voyalert/packages/backend/voyalertbackend.tar
. This file can then be transfered to a different system and loaded withdocker load -i voyalertbackend.tar
:
npm run backend:save
Feel free to open issues and pull requests regarding anything you think would be beneficial for this project!