# enliven17/gizu-app architecture

> Architecture diagram of the GitHub repository enliven17/gizu-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/enliven17/gizu-app
- Repository: https://github.com/enliven17/gizu-app

## Overview

Gizu is a passkey-powered mobile investment wallet, with a separate mock-backed browser app, public marketing site, and API. The principal mobile journey is passkey access to a protected wallet, portfolio and token discovery, then native review and signing of an eligible swap; native state and provider observations support recovery. The README documents vault/Earn and transfer capabilities too. Source excerpts show native swap orchestration and encrypted storage, plus backend registration and Earn previews; unsampled feature wiring is represented only where documented, with evidence limits reflected in dashed links.

Main entry points: [`mobile/src/application/AppRoot.tsx`](https://github.com/enliven17/gizu-app/blob/main/mobile/src/application/AppRoot.tsx) (Mobile experience), [`mobile/modules/gizu-stored-signer/core/src/swap/engine.rs`](https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/core/src/swap/engine.rs) (Swap state machine), [`backend/src/http/routes/swap.routes.ts`](https://github.com/enliven17/gizu-app/blob/main/backend/src/http/routes/swap.routes.ts) (Swap and token routes), [`backend/src/app.ts`](https://github.com/enliven17/gizu-app/blob/main/backend/src/app.ts) (Backend API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mobile["Mobile wallet"]
  node_mobileui["Mobile experience<br/>[AppRoot.tsx]"]
  node_access["Passkey access"]
  node_walletstore[("Encrypted wallet")]
  node_portfolio["Portfolio views"]
  node_discovery["Token discovery<br/>[catalog.ts]"]
  node_swapui["Swap intent<br/>[useNativeSwap.ts]"]
  node_swapengine["Swap state machine<br/>[engine.rs]"]
  node_nativeapproval["Native approval<br/>[SwapEngine.swift]"]
  node_vaults["Vault and Earn"]
  node_transactions["Transfer operations"]
end

subgraph group_backend["Backend services"]
  node_api["Backend API<br/>[app.ts]"]
  node_swaproutes["Swap and token routes<br/>[swap.routes.ts]"]
  node_earnroutes["Earn planning and previews"]
  node_aurora["Confidential routing<br/>[aurora-intents.ts]"]
  node_fusion["Fusion orders<br/>[fusion.ts]"]
  node_funding["Funding preparation<br/>[monad-funding.ts]"]
end

subgraph group_web["Web surfaces"]
  node_browser["Browser application<br/>[App.tsx]"]
  node_marketing["Marketing site<br/>[App.tsx]"]
end

subgraph group_external["External providers"]
  node_chains(("Chain RPCs"))
  node_providers(("Aurora and 1inch"))
end

node_investor(("Wallet user"))

node_investor -->|"uses"| node_mobileui
node_mobileui -.->|"requests access"| node_access
node_access -.->|"unlocks wallet"| node_walletstore
node_walletstore -.->|"supplies wallet state"| node_mobileui
node_mobileui -.->|"views holdings"| node_portfolio
node_mobileui -.->|"browses tokens"| node_discovery
node_discovery -.->|"starts eligible swap"| node_swapui
node_swapui -.->|"requests review"| node_nativeapproval
node_nativeapproval -->|"advances operation"| node_swapengine
node_swapengine -.->|"persists state"| node_walletstore
node_swapengine -->|"requests preparation"| node_api
node_api -->|"registers routes"| node_swaproutes
node_api -->|"registers previews"| node_earnroutes
node_swaproutes -->|"quotes routes"| node_aurora
node_swaproutes -->|"prepares orders"| node_fusion
node_swaproutes -->|"prepares funding"| node_funding
node_aurora -.->|"calls routing service"| node_providers
node_fusion -.->|"requests orders"| node_providers
node_swapengine -.->|"checks chain state"| node_chains
node_mobileui -.->|"opens vault journeys"| node_vaults
node_mobileui -.->|"starts transfers"| node_transactions
node_investor -->|"uses web app"| node_browser
node_browser -.->|"loads token discovery"| node_api
node_investor -->|"visits website"| node_marketing

click node_mobileui "https://github.com/enliven17/gizu-app/blob/main/mobile/src/application/AppRoot.tsx"
click node_access "https://github.com/enliven17/gizu-app/blob/main/mobile/src/features/access/useAccessController.ts"
click node_walletstore "https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/ios/Storage/WalletStorage.swift"
click node_portfolio "https://github.com/enliven17/gizu-app/blob/main/mobile/src/features/wallet/useWalletController.ts"
click node_discovery "https://github.com/enliven17/gizu-app/blob/main/mobile/src/domain/earn/catalog.ts"
click node_swapui "https://github.com/enliven17/gizu-app/blob/main/mobile/src/features/swap/useNativeSwap.ts"
click node_swapengine "https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/core/src/swap/engine.rs"
click node_nativeapproval "https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/ios/Swap/SwapEngine.swift"
click node_vaults "https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/ios/Earn/EarnVaultEngine.swift"
click node_transactions "https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/ios/Transfers/TransferEngine.swift"
click node_api "https://github.com/enliven17/gizu-app/blob/main/backend/src/app.ts"
click node_swaproutes "https://github.com/enliven17/gizu-app/blob/main/backend/src/http/routes/swap.routes.ts"
click node_earnroutes "https://github.com/enliven17/gizu-app/blob/main/backend/src/http/routes/earn-preview.routes.ts"
click node_aurora "https://github.com/enliven17/gizu-app/blob/main/backend/src/adapters/aurora/aurora-intents.ts"
click node_fusion "https://github.com/enliven17/gizu-app/blob/main/backend/src/adapters/oneinch/fusion.ts"
click node_funding "https://github.com/enliven17/gizu-app/blob/main/backend/src/adapters/pimlico/monad-funding.ts"
click node_browser "https://github.com/enliven17/gizu-app/blob/main/frontend/src/App.tsx"
click node_marketing "https://github.com/enliven17/gizu-app/blob/main/landing/src/App.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mobileui,node_access,node_walletstore,node_portfolio,node_discovery,node_swapui,node_swapengine,node_nativeapproval,node_vaults,node_transactions,node_investor toneBlue
class node_api,node_swaproutes,node_earnroutes,node_aurora,node_fusion,node_funding toneAmber
class node_browser,node_marketing toneMint
class node_chains,node_providers toneRose
```

## Components

### Mobile wallet

- [Mobile experience](https://github.com/enliven17/gizu-app/blob/main/mobile/src/application/AppRoot.tsx): `mobile/src/application/AppRoot.tsx`
- [Passkey access](https://github.com/enliven17/gizu-app/blob/main/mobile/src/features/access/useAccessController.ts): `mobile/src/features/access/useAccessController.ts`
- [Encrypted wallet](https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/ios/Storage/WalletStorage.swift): `mobile/modules/gizu-stored-signer/ios/Storage/WalletStorage.swift`
- [Portfolio views](https://github.com/enliven17/gizu-app/blob/main/mobile/src/features/wallet/useWalletController.ts): `mobile/src/features/wallet/useWalletController.ts`
- [Token discovery](https://github.com/enliven17/gizu-app/blob/main/mobile/src/domain/earn/catalog.ts): `mobile/src/domain/earn/catalog.ts`
- [Swap intent](https://github.com/enliven17/gizu-app/blob/main/mobile/src/features/swap/useNativeSwap.ts): `mobile/src/features/swap/useNativeSwap.ts`
- [Swap state machine](https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/core/src/swap/engine.rs): `mobile/modules/gizu-stored-signer/core/src/swap/engine.rs`
- [Native approval](https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/ios/Swap/SwapEngine.swift): `mobile/modules/gizu-stored-signer/ios/Swap/SwapEngine.swift`
- [Vault and Earn](https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/ios/Earn/EarnVaultEngine.swift): `mobile/modules/gizu-stored-signer/ios/Earn/EarnVaultEngine.swift`
- [Transfer operations](https://github.com/enliven17/gizu-app/blob/main/mobile/modules/gizu-stored-signer/ios/Transfers/TransferEngine.swift): `mobile/modules/gizu-stored-signer/ios/Transfers/TransferEngine.swift`

### Backend services

- [Backend API](https://github.com/enliven17/gizu-app/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [Swap and token routes](https://github.com/enliven17/gizu-app/blob/main/backend/src/http/routes/swap.routes.ts): `backend/src/http/routes/swap.routes.ts`
- [Earn planning and previews](https://github.com/enliven17/gizu-app/blob/main/backend/src/http/routes/earn-preview.routes.ts): `backend/src/http/routes/earn-preview.routes.ts`
- [Confidential routing](https://github.com/enliven17/gizu-app/blob/main/backend/src/adapters/aurora/aurora-intents.ts): `backend/src/adapters/aurora/aurora-intents.ts`
- [Fusion orders](https://github.com/enliven17/gizu-app/blob/main/backend/src/adapters/oneinch/fusion.ts): `backend/src/adapters/oneinch/fusion.ts`
- [Funding preparation](https://github.com/enliven17/gizu-app/blob/main/backend/src/adapters/pimlico/monad-funding.ts): `backend/src/adapters/pimlico/monad-funding.ts`

### Web surfaces

- [Browser application](https://github.com/enliven17/gizu-app/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Marketing site](https://github.com/enliven17/gizu-app/blob/main/landing/src/App.tsx): `landing/src/App.tsx`

### External providers

- **Chain RPCs**
- **Aurora and 1inch**

### Other components

- **Wallet user**

## Connections

- Wallet user → Mobile experience: uses (evidence: `README.md`)
- Mobile experience → Passkey access: requests access
- Passkey access → Encrypted wallet: unlocks wallet
- Encrypted wallet → Mobile experience: supplies wallet state
- Mobile experience → Portfolio views: views holdings (evidence: `README.md`)
- Mobile experience → Token discovery: browses tokens (evidence: `README.md`)
- Token discovery → Swap intent: starts eligible swap (evidence: `README.md`)
- Swap intent → Native approval: requests review (evidence: `README.md`)
- Native approval → Swap state machine: advances operation (evidence: `mobile/modules/gizu-stored-signer/ios/Swap/SwapEngine.swift`)
- Swap state machine → Encrypted wallet: persists state (evidence: `README.md`)
- Swap state machine → Backend API: requests preparation (evidence: `mobile/modules/gizu-stored-signer/core/src/swap/engine.rs`)
- Backend API → Swap and token routes: registers routes (evidence: `backend/src/app.ts`)
- Backend API → Earn planning and previews: registers previews (evidence: `backend/src/app.ts`)
- Swap and token routes → Confidential routing: quotes routes (evidence: `backend/src/http/routes/swap.routes.ts`)
- Swap and token routes → Fusion orders: prepares orders (evidence: `backend/src/http/routes/swap.routes.ts`)
- Swap and token routes → Funding preparation: prepares funding (evidence: `backend/src/http/routes/swap.routes.ts`)
- Confidential routing → Aurora and 1inch: calls routing service
- Fusion orders → Aurora and 1inch: requests orders
- Swap state machine → Chain RPCs: checks chain state (evidence: `README.md`)
- Mobile experience → Vault and Earn: opens vault journeys (evidence: `README.md`)
- Mobile experience → Transfer operations: starts transfers (evidence: `README.md`)
- Wallet user → Browser application: uses web app (evidence: `README.md`)
- Browser application → Backend API: loads token discovery (evidence: `README.md`)
- Wallet user → Marketing site: visits website (evidence: `README.md`)
