Skip to content

kiwo/ito-app

 
 

Repository files navigation

ito React Native App

Android Build Android Downloads License

Try it out

You can find Android alpha releases on our releases page. Click here to find the latest release. For the app to recognize other devices, make sure to enable Bluetooth.

Architecture

+--------------------------------+
|                                |
|            ito-app             |
|                                |
| +----------------------------+ |     +----------------+
| |                            | |     |                |
| |      react-native-ito      +------>+   api-backend  |
| |          library           | |     |                |
| +----------------------------+ |     +----------------+
+--------------------------------+
  • ito-app (this repository): React Native app implementation
  • react-native-ito: React Native library, which contains native code for handling bluetooth and network communication with the backend. The library is used by the app as an NPM dependency. The exact version is pinned in package-lock.json.
  • api-backend: This is the hosted backend implementation. This is work in progress and will replace the old backend-sqlite implementation, that is currently used by the app.

Development

User flow

Take a look at the user flow on Figma. We have implemented the major part of those screen mockups.

Also try our click dummy for a quick demonstration.

Android

Select "React Native CLI Quickstart" and your OS on Environment Setup React-Native.

Don't forget to install the npm dependencies:

npm install

This will also trigger the postinstall script defined in package.json, which will run:

To start the React Native Metro server use:

npm run start

To build the source and install use:

npm run android

To build an APK, run:

npm run build:android

The APK is generated to android/app/build/outputs/apk/release/app-release.apk

iOS

To start the React Native Metro server use:

npm run start

To build the source and install use:

npm run ios

Run the app with a locally modified library

Check out react-native-ito and execute:

npm link

Then, go to your local checkout of ito-app and execute:

npm link react-native-ito

This will override node_modules/react-native-ito with a symbolic link to your local checkout of react-native-ito. Now your local checkout of the library will appear to be an installed dependency in the node_modules folder of the app and will be recognized as such during build.

Keep in mind, that after modifying library code, you might need to remove the build folders (e.g. android/build) in your react-native-ito checkout. This will force the app project to rebuild the library.

Now you can build and start the app and it will use your locally modified library code:

npm run start

npm run android
npm run ios

Wire the app to a different server

Client/server communication is handled by the library, so you need to locally modify the library code (see previous section).

Check out the backend and run it locally (e.g. using docker-compose).

Find the BASE_URL environment variable in the code of react-native-ito-bluetooth and change it to your local server's url.

Release process

The CI pipeline is implemented using GitHub Actions.

Android

  • Build (pull requests against master, master pushes, *-android tag pushes):
    • install the Android SDK
    • build an APK
  • Deploy (master pushes, *-android tag pushes):

iOS

Not yet implemented

About

A privacy-first contact tracing app

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 83.4%
  • Java 6.4%
  • Objective-C 4.3%
  • Ruby 3.8%
  • JavaScript 0.9%
  • Starlark 0.6%
  • Shell 0.6%