The ArDrive Web App allows a user to log in to securely view, upload and manage their ArDrive files.
Have any questions? Join the ArDrive Discord channel for support, news and updates. https://discord.gg/ya4hf2H
Install lefthook for your platform from the intructions here. This will enable the use of git hooks. After installing lefthook you need to enable it by running:
lefthook install
If your environment is using homebrew, install the Flutter SDK with its cask as shown below. Alternatively, visit the Flutter Installation Instructions to get the Flutter SDK up and running for your OS / local setup.
# with homebrew
brew install --cask flutter
Then, generate the package imports with:
flutter pub get
Install script runner to have access to pubspec scripts
flutter pub global activate script_runner
Make sure to add scr to your path with export
In order to run them we need to use scr
plus a pubspec.yaml
script
e.g.to check-flutter
script which checks if we re using the right Flutter version
scr check-flutter
Whenever changing branches or initially setting up, compile the codebase to resolve errors:
flutter pub run build_runner build --delete-conflicting-outputs
Then, to begin code generation and watch for changes, run:
flutter packages pub run build_runner watch
The app has three flavors: development
, staging
and production
. To select one of those, follow the instructions for:
flutter run -d chrome --dart-define=environment=development
To run using a production config, just remove the --dart-define argument
flutter run -d chrome
or
flutter run -d chrome --dart-define=environment=production
flutter run --flavor=development
or
flutter run --flavor=production
All changes made to dev
will be continuously deployed to staging.ardrive.io. All PRs from this repo merging into dev
will trigger a preview build that can be shared freely.
To create a release to app.ardrive.io, first merge any changes from dev
into master
that are required, and publish a new release through the GitHub UI with the tag name matching the pattern v*
eg. v1.0.1
.
This will trigger a GitHub Action that will deploy master
to production.
You can use a custom gateway URL by setting the flutter.arweaveGatewayUrl
key in your browser's Local Storage.
With the web app opened you can access the browser's JavaScript console to run the follow examples:
// To set the item. Note that the custom gateway value MUST be wrapped in double quotes
localStorage.setItem('flutter.arweaveGatewayUrl', '"https://my.custom.url"');
// To remove it (set the default)
localStorage.removeItem('flutter.arweaveGatewayUrl');
You may need to reload to apply the change.