Architecture
three parts, one contract.
What runs where, and which part ever sees a key.
01The picture
Solid lines are the normal flow. The app talks to the API over HTTPS; the API reads your settings from Firestore and calls the third parties with your keys. The console writes the settings with the Firebase Admin SDK. The app also reads 0x's on-chain registry through public endpoints that are pinned in the app, to verify swaps (see Security).
02What the backend never sees
A recovery phrase, a private key, a signature, a balance, a transaction history or an address book. The few calls that carry an address (a swap quote, a claim proof lookup) forward it to the service that needs it and do not store or log it. The only device data stored is an anonymous Firebase id, and an FCM token if you add push to the app. The complete table is in docs/CONTRACT.md, section 0.
03Components
| Piece | Runtime | Notes |
|---|---|---|
| App | Android 8.0+ (API 26) | Kotlin, Compose, web3j for key derivation and hashing |
api | Cloud Functions 2nd gen, nodejs24, 512 MiB, 60 s | Public invoker; checks Firebase ID tokens itself for the two account endpoints |
sendCampaigns | Scheduled every 5 minutes | The only sender of push campaigns |
| Console | Node.js 26 LTS | Own data in data/admin.sqlite or Postgres |