AXIS docs
v1.0.0
Live demo Get help
● Start · Step by step

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

  1. UnzipUse a path without spaces. The project folder contains lib/, android/, ios/, web/, assets/, test/ and pubspec.yaml.
  2. Install Flutter packages
    flutter pub get
  3. Generate the translationsRequired lib/l10n/app_localizations.dart is generated and listed in .gitignore. Without it the project does not compile.
    flutter gen-l10n
  4. 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:

LayerWhere it comes fromReaches
OperatorValues typed into Account → Operator console. Stored on that device only (lib/core/config/operator_config_store.dart).One device
RemoteYour hosted config.json, or Firebase (Firestore / Remote Config). See below.Every user of your build
Built-in defaultAdminConfigModel.defaults(), compiled into the app.Every user of your build
Important

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.

  1. 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.
  2. 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.
  3. Point the app at itEdit lib/core/config/app_config.dart:
    const String kAdminConfigUrl = 'https://<your-domain>/config.json';
  4. 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).
Two constants, one is live

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.

  1. Create a projectAt console.firebase.google.com. If you already know your own bundle ID, change it first (Rebranding → IDs).
  2. Connect the app
    dart pub global activate flutterfire_cli
    flutterfire configure --project=<your-project>
    This overwrites lib/firebase_options.dart and writes android/app/google-services.json and ios/Runner/GoogleService-Info.plist. Both files are in .gitignore; the .example files beside them show the shape.
  3. Publish your settingsEither a Firestore document app_config/runtime_admin_config whose fields are the config keys, or a Remote Config parameter admin_config whose value is the whole config as a JSON string.
  4. Web push onlyReplace the placeholder firebaseConfig in web/firebase-messaging-sw.js with your web app's values (the same as the web entry of firebase_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.

Order of sources

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-l10n ran and flutter run -d chrome starts.
  • Markets shows live Hyperliquid contracts and the header badge reads MAINNET.
  • Your config.json opens 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.dart points at your own domain and mailbox.
Next

Set the builder fee in Setting up earnings.