anyway/frontend
Remy Moll 89ff7591b9
Some checks failed
Build and release debug APK / Build APK (pull_request) Failing after 3m24s
fill in some content
2024-12-15 13:41:28 +01:00
..
2024-12-15 12:24:00 +01:00
2024-12-15 13:41:28 +01:00
2024-09-18 14:04:16 +02:00
2024-12-15 13:41:28 +01:00
2024-09-30 18:07:27 +02:00
2024-09-10 16:15:08 +02:00
2024-07-30 22:49:28 +02:00
2024-09-18 14:04:16 +02:00
2024-09-24 22:58:28 +02:00
2024-09-25 16:20:33 +02:00
2024-12-15 13:41:28 +01:00

Frontend

The frontend of this project is a Flutter application designed to run on both Android and iOS devices (and possibly as a PWA). The frontend is responsible for displaying the user interface and handling user input. It communicates with the backend via a REST-api to retrieve and send data.

Getting Started

The flutter application is divided into multiple chunks of code.

  • the lib directory contains the main code of the application.
  • the android and ios directories contain platform-specific code.
  • the root directory contains configuration files and metadata.

To run the application, you need to have the Flutter SDK installed. You can find instructions on how to do this here.

Once you have the Flutter SDK installed, you can locally install the dependencies by running:

flutter pub get

Development

TODO

Deployment and metadata

Deploying a new version

To truly deploy a new version of the application, i.e. to the official app stores, a special CI step is required. This listens for new tags. To create a new tag position yourself on the main branch and run

git tag -a v<name> -m "Release <name>"
git push origin v<name>

We adhere to the Semantic Versioning standard, so the tag should be of the form v0.1.8 for example.

Icons and logos

The application uses a custom launcher icon and splash screen. These are managed platform-independently using the flutter_launcher_icons package.

To update the icons, change the flutter_launcher_icons.yaml configuration file. Especially the image_path is relevant. Then run

dart run flutter_launcher_icons

Other metadata

Fastlane provides mechanisms to update the metadata of the application. This includes the name, description, screenshots, etc. The metadata is stored in the fastlane/metadata directory of both the androidand the ios version of the application. Both versions have different structures but they should be kept in sync. For more information see the fastlane documentation:

Fastlane - in depth

The application is deployed to the Google Play Store and the Apple App Store using fastlane: https://docs.fastlane.tools/

Fastlane is installed as a Ruby gem. Since the bundler-gemfile is scoped to a single directory, a Gemfile is included in both the android and ios directories. Once installed, the usage is

cd frontend/android # or ios
bundle install
bundle exec fastlane <lane>

This is reused in the CI/CD pipeline to automate the deployment process.

Secrets used by fastlane are stored on the github push mirror used for builds. See below.

Secrets

These are mostly used by the CI/CD pipeline to deploy the application.

Global secrets are used for both versions of the app (android and ios).

  • GOOGLE_MAPS_API_KEY is used to authenticate with the Google Maps API

Platform-specific secrets are used by the CI/CD pipeline to deploy to the respective app stores.

  • ANDROID_KEYSTORE_BASE64 is used to sign the android apk
  • ANDROID_SECRET_PROPERTIES_BASE64 contains the keystore password and key password
  • ANDROID_GOOGLE_PLAY_JSON_BASE64 is used to authenticate with the Google Play Store api
  • IOS_ASC_ISSUER_ID is used to authenticate with the App Store Connect API
  • IOS_ASC_KEY as well
  • IOS_ASC_KEY_ID as well
  • IOS_MATCH_PASSWORD is used by fastlane match to download the certificates
  • IOS_MATCH_REPO_SSH_KEY_BASE64 is used to authenticate with the git repository where the certificates are stored