Mobile app for VP-Kuljetus drivers
- See Environment variables for setting up Infisical for managing environment variables
- After setting up environment variables you can run the project via VS Code's debugging (F5) or via CLI with command
flutter run --dart-define-from-file=env.json
- API client is linked through git submodule. Initialize the link by running
git submodule update --init
in terminal. - Generate the client by running
flutter pub run build_runner build
.
- This project uses Riverpod as state management tool.
- When creating providers, generate boilerplate for providers annotated with
@riverpod
or@Riverpod()
by runningflutter pub run build_runner build
- This project utilizes Freezed to generate boilerplate for data classes and JSON serialization.
- When defining data classes with Freezed, generate boilerplate for classes annotated with
@freezed
by runningflutter pub run build_runner build
This project uses environment variables defined in Infisical. It provides a centralized way for serving environment variables to both CI/CD pipeline and local development. Read the following section to learn how to import environment variables with Infisical to your environment.
Proceed with the following steps to get started:
- Install Infisical CLI by referencing the official documentation here: Infisical CLI
- Request fellow developers to get access to
- Infisical organization
- VP-Kuljetus project
- Run
infisical login
and authenticate with your Infisical account- Select
Infisical Cloud
when asked
- Select
- Run
infisical run --path=/driver-app -- flutter pub run dart_define generate
- You will see in the terminal that
env.json
file has been generated to the root of the project, which contains the variables.
Update variable definitions in pubspec.yaml
. Detailed instructions in here;
Replace [STOREPASS] with generated password
keytool -genkey -v -keystore app.keystore -storepass [STOREPASS] -alias app -keypass [STOREPASS] -keyalg RSA -keysize 4096 -validity 10000
Encode keystore as base64 (so it can be stored as GitHub environment secret)
base64 -i app.keystore -o app.keystore.b64