# tangem/tangem-app-ios architecture

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

- Interactive diagram: https://gitdiagram.com/tangem/tangem-app-ios
- Repository: https://github.com/tangem/tangem-app-ios

## Overview

Tangem for iPhone is a consumer mobile wallet application backed by a multi-chain blockchain SDK and supporting wallet, security, backup, and financial-service modules. Its principal user-facing path is interacting with the app, selecting a wallet, and performing blockchain operations; the README identifies the iPhone app and notes that some networks require API keys. The supplied excerpts show storage and authentication responsibilities, but not the main app-to-wallet transaction flow, so uncertain connections are omitted or marked unverified.

Main entry points: [`Tangem/App/Root/ServicesManager.swift`](https://github.com/tangem/tangem-app-ios/blob/master/Tangem/App/Root/ServicesManager.swift) (Tangem app), [`Modules/BlockchainSdk/Common/Blockchain.swift`](https://github.com/tangem/tangem-app-ios/blob/master/Modules/BlockchainSdk/Common/Blockchain.swift) (Blockchain SDK), [`Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletRepository.swift`](https://github.com/tangem/tangem-app-ios/blob/master/Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletRepository.swift) (Wallet repository), [`Modules/BlockchainSdk/Common/Wallet/Wallet.swift`](https://github.com/tangem/tangem-app-ios/blob/master/Modules/BlockchainSdk/Common/Wallet/Wallet.swift) (Wallet runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["iPhone App"]
  node_app["Tangem app"]
end

subgraph group_wallet["Wallet Domain"]
  node_walletmodel["Wallet model"]
  node_walletrepo["Wallet repository"]
  node_walletdata[("Wallet data")]
end

subgraph group_blockchain["Blockchain SDK"]
  node_blockchain["Blockchain SDK<br/>[Blockchain.swift]"]
  node_walletsdk["Wallet runtime<br/>[Wallet.swift]"]
  node_blockdata[("Blockchain data storage")]
  node_chainimpl["Chain implementations"]
end

subgraph group_services["Wallet Services"]
  node_mobileprivate["Private info manager"]
  node_publicinfo["Public info manager"]
  node_securestorage[("Encrypted secure storage")]
  node_backup["Wallet backup"]
  node_backendauth["Backend authentication"]
  node_staking["Staking"]
  node_express["Exchange and onramp"]
  node_visa["Tangem Visa"]
end

node_user(("iPhone user"))
node_network{{"Blockchain networks"}}

node_user -.->|"uses"| node_app
node_app -.->|"selects wallets"| node_walletrepo
node_walletrepo -->|"persists wallets"| node_walletdata
node_walletmodel -.->|"managed by"| node_walletrepo
node_app -.->|"requests chain actions"| node_blockchain
node_blockchain -.->|"provides wallet types"| node_walletsdk
node_walletsdk -.->|"uses storage"| node_blockdata
node_blockchain -.->|"implements chains"| node_chainimpl
node_chainimpl -.->|"connects to"| node_network
node_mobileprivate -->|"stores encryption keys"| node_securestorage
node_publicinfo -->|"uses storage"| node_securestorage
node_app -.->|"backs up wallets"| node_backup
node_app -.->|"authenticates"| node_backendauth
node_app -.->|"offers staking"| node_staking
node_app -.->|"offers exchange"| node_express
node_app -.->|"offers Visa services"| node_visa

click node_app "https://github.com/tangem/tangem-app-ios/blob/master/Tangem/App/Root/ServicesManager.swift"
click node_walletmodel "https://github.com/tangem/tangem-app-ios/blob/master/Tangem/Domain/UserWalletModel/UserWalletModel.swift"
click node_walletrepo "https://github.com/tangem/tangem-app-ios/blob/master/Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletRepository.swift"
click node_walletdata "https://github.com/tangem/tangem-app-ios/blob/master/Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletDataStorage.swift"
click node_blockchain "https://github.com/tangem/tangem-app-ios/blob/master/Modules/BlockchainSdk/Common/Blockchain.swift"
click node_walletsdk "https://github.com/tangem/tangem-app-ios/blob/master/Modules/BlockchainSdk/Common/Wallet/Wallet.swift"
click node_blockdata "https://github.com/tangem/tangem-app-ios/blob/master/Modules/BlockchainSdk/Common/DataStorage/BlockchainDataStorage.swift"
click node_chainimpl "https://github.com/tangem/tangem-app-ios/tree/master/Modules/BlockchainSdk/Blockchains"
click node_mobileprivate "https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemMobileWalletSdk/Sources/swift/Storage/PrivateInfoStorageManager.swift"
click node_publicinfo "https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemMobileWalletSdk/Sources/swift/Storage/PublicInfoStorageManager.swift"
click node_securestorage "https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemMobileWalletSdk/Sources/swift/Storage/EncryptedSecureStorage.swift"
click node_backup "https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemMobileWalletBackup/MobileWalletBackupManager.swift"
click node_backendauth "https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemBackendAuthentication/Domain/DeviceKey/BackendAuthenticationStorageCleaner.swift"
click node_staking "https://github.com/tangem/tangem-app-ios/tree/master/TangemStaking/Services/StakingManager"
click node_express "https://github.com/tangem/tangem-app-ios/tree/master/TangemExpress/Manager"
click node_visa "https://github.com/tangem/tangem-app-ios/blob/master/TangemVisa/Activation/VisaActivationManager.swift"

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_app,node_user toneBlue
class node_walletmodel,node_walletrepo,node_walletdata toneAmber
class node_blockchain,node_walletsdk,node_blockdata,node_chainimpl toneMint
class node_mobileprivate,node_publicinfo,node_securestorage,node_backup,node_backendauth,node_staking,node_express,node_visa toneRose
class node_network toneIndigo
```

## Components

### iPhone App

- [Tangem app](https://github.com/tangem/tangem-app-ios/blob/master/Tangem/App/Root/ServicesManager.swift): `Tangem/App/Root/ServicesManager.swift`

### Wallet Domain

- [Wallet model](https://github.com/tangem/tangem-app-ios/blob/master/Tangem/Domain/UserWalletModel/UserWalletModel.swift): `Tangem/Domain/UserWalletModel/UserWalletModel.swift`
- [Wallet repository](https://github.com/tangem/tangem-app-ios/blob/master/Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletRepository.swift): `Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletRepository.swift`
- [Wallet data](https://github.com/tangem/tangem-app-ios/blob/master/Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletDataStorage.swift): `Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletDataStorage.swift`

### Blockchain SDK

- [Blockchain SDK](https://github.com/tangem/tangem-app-ios/blob/master/Modules/BlockchainSdk/Common/Blockchain.swift): `Modules/BlockchainSdk/Common/Blockchain.swift`
- [Wallet runtime](https://github.com/tangem/tangem-app-ios/blob/master/Modules/BlockchainSdk/Common/Wallet/Wallet.swift): `Modules/BlockchainSdk/Common/Wallet/Wallet.swift`
- [Blockchain data storage](https://github.com/tangem/tangem-app-ios/blob/master/Modules/BlockchainSdk/Common/DataStorage/BlockchainDataStorage.swift): `Modules/BlockchainSdk/Common/DataStorage/BlockchainDataStorage.swift`
- [Chain implementations](https://github.com/tangem/tangem-app-ios/tree/master/Modules/BlockchainSdk/Blockchains): `Modules/BlockchainSdk/Blockchains`

### Wallet Services

- [Private info manager](https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemMobileWalletSdk/Sources/swift/Storage/PrivateInfoStorageManager.swift): `Modules/TangemMobileWalletSdk/Sources/swift/Storage/PrivateInfoStorageManager.swift`
- [Public info manager](https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemMobileWalletSdk/Sources/swift/Storage/PublicInfoStorageManager.swift): `Modules/TangemMobileWalletSdk/Sources/swift/Storage/PublicInfoStorageManager.swift`
- [Encrypted secure storage](https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemMobileWalletSdk/Sources/swift/Storage/EncryptedSecureStorage.swift): `Modules/TangemMobileWalletSdk/Sources/swift/Storage/EncryptedSecureStorage.swift`
- [Wallet backup](https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemMobileWalletBackup/MobileWalletBackupManager.swift): `Modules/TangemMobileWalletBackup/MobileWalletBackupManager.swift`
- [Backend authentication](https://github.com/tangem/tangem-app-ios/blob/master/Modules/TangemBackendAuthentication/Domain/DeviceKey/BackendAuthenticationStorageCleaner.swift): `Modules/TangemBackendAuthentication/Domain/DeviceKey/BackendAuthenticationStorageCleaner.swift`
- [Staking](https://github.com/tangem/tangem-app-ios/tree/master/TangemStaking/Services/StakingManager): `TangemStaking/Services/StakingManager`
- [Exchange and onramp](https://github.com/tangem/tangem-app-ios/tree/master/TangemExpress/Manager): `TangemExpress/Manager`
- [Tangem Visa](https://github.com/tangem/tangem-app-ios/blob/master/TangemVisa/Activation/VisaActivationManager.swift): `TangemVisa/Activation/VisaActivationManager.swift`

### Other components

- **iPhone user**
- **Blockchain networks**

## Connections

- iPhone user → Tangem app: uses
- Tangem app → Wallet repository: selects wallets
- Wallet repository → Wallet data: persists wallets (evidence: `Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletDataStorage.swift`)
- Wallet model → Wallet repository: managed by (evidence: `Tangem/Domain/UserWalletModel/UserWalletRepository/UserWalletRepository.swift`)
- Tangem app → Blockchain SDK: requests chain actions
- Blockchain SDK → Wallet runtime: provides wallet types (evidence: `Modules/BlockchainSdk/Common/Wallet/Wallet.swift`)
- Wallet runtime → Blockchain data storage: uses storage
- Blockchain SDK → Chain implementations: implements chains
- Chain implementations → Blockchain networks: connects to
- Private info manager → Encrypted secure storage: stores encryption keys (evidence: `Modules/TangemMobileWalletSdk/Sources/swift/Storage/PrivateInfoStorageManager.swift`)
- Public info manager → Encrypted secure storage: uses storage (evidence: `Modules/TangemMobileWalletSdk/Sources/swift/Storage/PublicInfoStorageManager.swift`)
- Tangem app → Wallet backup: backs up wallets
- Tangem app → Backend authentication: authenticates
- Tangem app → Staking: offers staking
- Tangem app → Exchange and onramp: offers exchange
- Tangem app → Tangem Visa: offers Visa services
