Installation
packages, config channel, keys.
From the unzipped folder to a build that reads your own settings. Firebase is optional; you can finish this page without it. Plan about 30 minutes the first time.
01Unzip and install packages
- UnzipUse a path without spaces. The project folder contains
lib/,android/,ios/,web/,assets/,test/andpubspec.yaml. - Install Flutter packages
flutter pub get - Generate the translationsRequired
lib/l10n/app_localizations.dartis generated and listed in.gitignore. Without it the project does not compile.flutter gen-l10n - Run once in ChromeConfirms the toolchain before you change anything.
flutter run -d chrome
Verified for these docs on a clean copy with Flutter 3.41.4: flutter pub get, flutter gen-l10n and flutter build web --release all succeed.
02How AXIS gets its settings
Every setting (perps on or off, builder fee, branding, support contacts, maintenance) has one shape: the keys read by AdminConfigModel.fromJson in lib/core/config/admin_config_model.dart. The app merges three layers, highest first:
| Layer | Where it comes from | Reaches |
|---|---|---|
| Operator | Values typed into Account → Operator console. Stored on that device only (lib/core/config/operator_config_store.dart). | One device |
| Remote | Your hosted config.json, or Firebase (Firestore / Remote Config). See below. | Every user of your build |
| Built-in default | AdminConfigModel.defaults(), compiled into the app. | Every user of your build |
The operator console changes the device it is used on, nothing else. To set the builder fee, perps switch or branding for all your users, publish the values through a remote channel (next section) or change the compiled defaults and rebuild.
03Option A: a hosted config.json
The simplest channel. No Firebase needed.
- Write the fileStart from the example in Configuration → Example config.json. Tip: set everything in the operator console on your own device, open Effective configuration → Copy as JSON, and paste the result into
config.json. - Host it over HTTPSAny static host. If it lives on a different domain from the web terminal, the host must send a CORS header that allows your terminal's origin, or the browser blocks the request.
- Point the app at itEdit
lib/core/config/app_config.dart:const String kAdminConfigUrl = 'https://<your-domain>/config.json'; - RebuildThe address is compiled in. After that, editing the hosted file is enough: the app shows its cached copy at start and fetches a fresh one in the background on every cold start (
kAdminConfigCacheTtl = Duration.zero, 8-second timeout).
lib/core/config/axis_identity.dart also declares kAxisAdminConfigUrl. Nothing reads it in 1.0.0. The value that works is kAdminConfigUrl in app_config.dart.
04Option B: Firebase (optional)
Firebase backs a second config channel, push notifications and crash reports. The package ships a placeholder lib/firebase_options.dart; while it is in place, FirebaseService skips initialisation and the app runs without Firebase.
- Create a projectAt console.firebase.google.com. If you already know your own bundle ID, change it first (Rebranding → IDs).
- Connect the app
This overwritesdart pub global activate flutterfire_cli flutterfire configure --project=<your-project>lib/firebase_options.dartand writesandroid/app/google-services.jsonandios/Runner/GoogleService-Info.plist. Both files are in.gitignore; the.examplefiles beside them show the shape. - Publish your settingsEither a Firestore document
app_config/runtime_admin_configwhose fields are the config keys, or a Remote Config parameteradmin_configwhose value is the whole config as a JSON string. - Web push onlyReplace the placeholder
firebaseConfiginweb/firebase-messaging-sw.jswith your web app's values (the same as the web entry offirebase_options.dart), and build with--dart-define=WEB_PUSH_VAPID_KEY=<key>. Web push end to end is unverified in this version.
The Android build applies the Google Services and Crashlytics Gradle plugins only when google-services.json exists (android/app/build.gradle.kts), so an unconfigured project still builds.
If kAdminConfigUrl is set, the hosted file is used at start. Otherwise the app tries Firestore once, then Remote Config. When Firebase is configured, a Firestore live watch also starts after the first frame and replaces the settings when that document changes. Use one channel, not both, to avoid confusion.
05Keys and build settings
AXIS has no .env file. Build settings are Dart defines, passed on the command line:
flutter run -d chrome --dart-define=REOWN_PROJECT_ID=<your-reown-project-id>
Or keep them in a JSON file and pass the file. env/ and local.keys.json are already in .gitignore:
flutter run -d chrome --dart-define-from-file=env/local.keys.json
Trading needs no key: market data and orders go to Hyperliquid's public API. The full list of settings is in Configuration → Build settings.
06Your domain, mailbox and legal pages
Required before any public release. lib/core/config/axis_identity.dart holds the website, support email, WalletConnect icon, and the privacy, terms and risk-disclosure links opened from Account. They ship pointing at the vendor's product site; replace every one with your own. The full list of places is in Rebranding → URLs.
07Checklist: is everything connected?
flutter gen-l10nran andflutter run -d chromestarts.- Markets shows live Hyperliquid contracts and the header badge reads MAINNET.
- Your
config.jsonopens in a browser and returns JSON (Option A), or the Firestore document / Remote Config parameter exists (Option B). - Account → Operator console → Effective configuration tags your published values REMOTE CONFIG.
axis_identity.dartpoints at your own domain and mailbox.
Set the builder fee in Setting up earnings.