Skip to content

belgranowear/BelgranoWear

Repository files navigation

BelgranoWear (app)

This repository is the frontend of the static information provisioning backend located at belgranowear/belgranowear.github.io.

BelgranoWear is an application that lets you travel through the Belgrano Norte network (maintained by Ferrovias).

System requirements

  • Android 6 or greater
  • 33 MB of free storage space
  • An internet connection

Development

  • Download Expo Go for Android or for iOS.

  • Start the Expo Go development server from Docker. This is the recommended workflow because the container pins the Node.js, JDK, and Android SDK versions expected by Expo SDK 54:

    ACTION=run EXPO_HOST=tunnel docker compose up --build

  • Scan the QR code printed by Expo with Expo Go.

  • If the tunnel is slow and your phone is on the same network as your computer, you can use LAN mode instead. First get your host machine's LAN IP address:

    ip addr show | grep -e ': w' -e ': e' -A4 | grep inet | sed 's/.*inet //' | cut -d ' ' -f 1

    Then start Expo with that IP:

    REACT_NATIVE_PACKAGER_HOSTNAME=192.168.0.4 ACTION=run EXPO_HOST=lan docker compose up --build

  • Open Expo Go and pass a URL as the following example:

    exp://192.168.0.4:8081

    Replace 192.168.0.4 with your host machine's LAN IP. The port will always be 8081.

  • Wait for the app to get bundled and accept all permission requests.

  • That's it, you're good to go! Any changes done in the source code will update in real time.

Building

Release mode

  • Create a keystore

    keytool -genkey -v -keystore release.keystore -alias belgranowear -keyalg RSA -keysize 2048 -validity 10000

  • Use GPG to convert the keystore to a variable-safe string

    gpg -c --armor release.keystore

  • Copy the output of this command and paste it into an exported variable, i.e.:

    export RELEASE_KEYSTORE="-----BEGIN PGP MESSAGE-----
    
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    ...
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX==
    =XXXX
    -----END PGP MESSAGE-----
    "
    
  • Export the passphrase for your keystore as a different variable

    export RELEASE_KEYSTORE_PASSPHRASE=HereGoesYourKeystorePassphrase

  • Set up a variable to store the contents of your gradle.properties file. Keep MYAPP_UPLOAD_STORE_FILE and MYAPP_UPLOAD_KEY_ALIAS untouched, just like in this example.

    export GRADLE_PROPERTIES="
    MYAPP_UPLOAD_STORE_FILE=/tmp/keystore
    MYAPP_UPLOAD_KEY_ALIAS=belgranowear
    MYAPP_UPLOAD_STORE_PASSWORD=HereGoesYourKeystorePassphrase
    MYAPP_UPLOAD_KEY_PASSWORD=HereGoesYourKeystorePassphrase
    
    ENABLE_PROGUARD_IN_RELEASE_BUILDS=true
    "
    
  • Follow the steps described in the Debug mode section.

Debug mode

  • Install docker as explained in the linked guide.

  • Clone this repository wherever you want, just make sure you'd have write permission with the user you're currently logged in.

    git clone https://github.com/belgranowear/BelgranoWear

  • Change to the created directory by running cd BelgranoWear.

  • Run the following command:

    MODE=test docker compose up --build

  • That's it, wait for a few minutes and you'll find the output in the artifacts directory.

License

BelgranoWear is open-sourced software licensed under the GNU General Public License v3.0.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors