SUPER WALLET docs
v1.0.0
Wallet demo Admin demo Get help
● Start · Step by step

Installation
app, admin, Firebase.

From the unzipped folder to a working wallet, a working admin panel and a deployed backend, all on your own Firebase project. Plan about 45 minutes the first time.

01Unzip and install packages

  1. UnzipUse a path without spaces. You get crypto_wallet/ and crypto_wallet_admin/.
  2. Install Flutter packages
    cd crypto_wallet
    flutter pub get
    cd ../crypto_wallet_admin
    flutter pub get
  3. Install the backend packages
    cd crypto_wallet/functions
    npm ci
    npm run build
Tip

Open each app folder in its own editor window. Every box on this page starts with the cd it needs, so you can always paste from the unzipped folder.

02Create your Firebase project

  1. Create the projectconsole.firebase.google.com → Add project, for example mywallet-prod.
  2. Switch to BlazeProject settings → Usage and billing → Blaze. Set a budget alert while you are there.
  3. Turn on Email/Password sign-inBuild → Authentication → Get started → Email/Password. Admins sign in this way.
  4. Create the databaseBuild → Firestore Database → Create → production mode. Pick a location near your users; it cannot be changed later.
  5. Log the CLI in
    firebase login

03Connect the wallet app

If you already know your own bundle ID, change it first (Rebranding → Bundle IDs); FlutterFire registers the app under the current one. You can also run this step again later.

cd crypto_wallet
flutterfire configure --platforms=ios,android,web
# point firebase deploy at your project
rm -f .firebaserc
firebase use --add      # pick your project, alias: default

This writes lib/firebase_options.dart, android/app/google-services.json and ios/Runner/GoogleService-Info.plist. All three are in .gitignore; keep them out of public repositories.

04Connect the admin panel

cd crypto_wallet_admin
flutterfire configure --platforms=web
rm -f .firebaserc
firebase use --add      # same project, alias: default

Then add the domain you will host the admin on under Firebase → Authentication → Settings → Authorized domains. localhost is already there.

05Rules, indexes and Remote Config

Open crypto_wallet/remoteconfig.template.json first. fee_wallet_address and pro_crypto_payment_address must be empty or wallets you control. You will set them properly in the admin later.

cd crypto_wallet
firebase deploy --only firestore:rules,firestore:indexes,remoteconfig
Only once

Deploying remoteconfig replaces the live Remote Config with the template. After the first setup, change settings in the admin panel instead, or you overwrite them.

06Cloud Functions

All functions run in the europe-west1 region. The app and the admin call that region, so keep it unless you change it everywhere (search the code for europe-west1).

  1. Create the backend settings fileFill only what you use; everything may stay empty for the first deploy. The table is in Configuration → Backend settings.
    cd crypto_wallet/functions
    cp .env.example .env
  2. Set the two secretsOWNER_UID and CLAUDE_API_KEY live in Google Secret Manager, not in .env. Delete the OWNER_UID= line from functions/.env, then set both. Don't know your UID yet? Type unset and change it after the first login. Not using Portfolio Brain? Type unset for the second one too.
    cd crypto_wallet
    firebase functions:secrets:set OWNER_UID
    firebase functions:secrets:set CLAUDE_API_KEY
  3. DeployThe first deploy takes a few minutes and may ask to enable Google Cloud APIs. Answer yes.
    cd crypto_wallet
    firebase deploy --only functions

Firebase console → Functions should now list 32 functions, among them bootstrapFirstAdmin, publishAdminRemoteConfig, getRuntimeConfigJson and recordFeeEvent.

07Create the first admin

Only accounts listed in the admin_users collection can enter the admin panel. The first one is created by bootstrapFirstAdmin, which works exactly once.

  1. Create your loginFirebase console → Authentication → Users → Add user, with your email and a strong password.
  2. Make it a super adminReplace the project ID and the email:
    curl -X POST "https://europe-west1-<your-project-id>.cloudfunctions.net/bootstrapFirstAdmin" \
      -H "Content-Type: application/json" \
      -d '{"data":{"targetEmail":"you@example.com"}}'
    The answer contains "success":true, your uid and "role":"superAdmin". Copy the uid.
  3. Save your UID as the owner
    cd crypto_wallet
    firebase functions:secrets:set OWNER_UID      # paste your uid
    firebase deploy --only functions:setAdminClaim
  4. Sign in and turn on the authenticatorRun the admin (flutter run -d chrome), sign in, then Security → Set Up MFA. See Admin → Security.
Admin sign-in screen
Admin sign-in screen

08Point the wallet at your admin

Required The wallet also downloads its settings from https://<your-admin-site>/config.json. The address is written in the code. Open crypto_wallet/lib/core/config/app_config.dart and change kAdminConfigUrl:

const String kAdminConfigUrl = 'https://<your-admin-site>/config.json';

Use your admin's hosting address (for example https://mywallet-admin.web.app, see Deployment). An empty string '' means Remote Config only. Change the same address in crypto_wallet_admin/lib/screens/dashboard/overview_tab.dart (_configUrl) so the Overview status card checks your site.

09Checklist: is everything connected?

  • Firebase console → Functions lists 32 functions in europe-west1.
  • Firebase console → Remote Config shows an admin_config parameter.
  • The wallet starts without a Firebase error in the terminal.
  • You can sign in to the admin panel and pass the authenticator step.
  • After hosting the admin: https://<your-admin-site>/config.json opens and returns JSON.