# olvid-io/olvid-ios architecture

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

- Interactive diagram: https://gitdiagram.com/olvid-io/olvid-ios
- Repository: https://github.com/olvid-io/olvid-ios

## Overview

Olvid is an iOS end-to-end encrypted messenger. Users create or choose an identity, connect with trusted interlocutors, and exchange messages; the app layer presents messaging and calling features while the engine handles identity, cryptographic protocols, and network communication. The graph also preserves documented backup, onboarding, and sharing capabilities. Many runtime modules are unsampled, so their internal connections are omitted unless shown by the README or source index.

Main entry points: [`Sources/Engine/ObvEngine/Sources/ObvEngine.swift`](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvEngine/Sources/ObvEngine.swift) (Engine API), [`Sources/App`](https://github.com/olvid-io/olvid-ios/tree/main/Sources/App) (Messenger app), [`Sources/App/AppAndExtensions/Extensions/ShareExtension/Sources/ShareViewController.swift`](https://github.com/olvid-io/olvid-ios/blob/main/Sources/App/AppAndExtensions/Extensions/ShareExtension/Sources/ShareViewController.swift) (Share extension), [`Sources/Engine/ObvIdentityManager/Sources/ObvIdentityManagerImplementation.swift`](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvIdentityManager/Sources/ObvIdentityManagerImplementation.swift) (Identity management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App experience"]
  node_app["Messenger app"]
  node_sharing["Share extension"]
  node_calls["Voice and video calls"]
  node_onboarding["Onboarding"]
  node_appbackup["App backup flows"]
end

subgraph group_engine["Cryptographic engine"]
  node_engine["Engine API<br/>[ObvEngine.swift]"]
  node_coordinator["Engine coordinator"]
  node_identity["Identity management"]
  node_cryptoid["Cryptographic identities"]
  node_protocols["Protocol management"]
  node_channels["Secure channels"]
  node_network["Network communication"]
  node_delegates["Engine interfaces"]
end

subgraph group_shared["Shared foundations"]
  node_sharedtypes["Shared types"]
  node_utilities["Shared utilities"]
end

subgraph group_state["Persistence and backup"]
  node_database[("Engine database")]
  node_dialogs[("Persisted dialogs")]
  node_backup["Backup manager"]
  node_backupseed["Backup seed<br/>[BackupSeed.swift]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_user -->|"shares content"| node_sharing
node_app -->|"uses engine"| node_engine
node_sharing -->|"initializes"| node_engine
node_app -.->|"offers calling"| node_calls
node_app -.->|"supports setup"| node_onboarding
node_app -.->|"supports backup"| node_appbackup
node_engine -->|"delegates identity"| node_identity
node_engine -->|"delegates backup"| node_backup
node_engine -->|"posts messages"| node_channels
node_engine -.->|"uses protocols"| node_protocols
node_engine -.->|"communicates over network"| node_network
node_engine -.->|"registers managers"| node_delegates
node_identity -.->|"uses identities"| node_cryptoid
node_engine -->|"reads dialogs"| node_dialogs
node_dialogs -.->|"persists in"| node_database
node_engine -.->|"uses persistence"| node_database
node_backup -.->|"derives keys"| node_backupseed
node_engine -.->|"uses shared types"| node_sharedtypes
node_engine -.->|"uses shared utilities"| node_utilities

click node_app "https://github.com/olvid-io/olvid-ios/tree/main/Sources/App"
click node_sharing "https://github.com/olvid-io/olvid-ios/blob/main/Sources/App/AppAndExtensions/Extensions/ShareExtension/Sources/ShareViewController.swift"
click node_calls "https://github.com/olvid-io/olvid-ios/blob/main/Sources/App/AppAndExtensions/App/Sources/VoIP/OlvidCallManager.swift"
click node_onboarding "https://github.com/olvid-io/olvid-ios/tree/main/Sources/App/ObvOnboarding"
click node_appbackup "https://github.com/olvid-io/olvid-ios/tree/main/Sources/App/ObvAppBackup"
click node_engine "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvEngine/Sources/ObvEngine.swift"
click node_coordinator "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvEngine/Sources/Coordinator/EngineCoordinator.swift"
click node_identity "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvIdentityManager/Sources/ObvIdentityManagerImplementation.swift"
click node_cryptoid "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvCrypto/Sources/ObvCryptoIdentity.swift"
click node_protocols "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvProtocolManager/Sources/ObvProtocolManager.swift"
click node_channels "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvChannelManager/Sources/ObvChannelManagerImplementation.swift"
click node_network "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvNetworkFetchManager/Sources/ObvNetworkFetchManagerImplementation.swift"
click node_delegates "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvMetaManager/Sources/ObvMetaManager.swift"
click node_sharedtypes "https://github.com/olvid-io/olvid-ios/tree/main/Sources/Shared/ObvTypes"
click node_utilities "https://github.com/olvid-io/olvid-ios/tree/main/Sources/Shared/OlvidUtils"
click node_database "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvDatabaseManager/Sources/ObvEnginePersistentContainer.swift"
click node_dialogs "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvEngine/Sources/CoreData/PersistedEngineDialog.swift"
click node_backup "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvBackupManagerNew/Sources/ObvBackupManagerNew.swift"
click node_backupseed "https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvCrypto/Sources/PRNG/BackupSeed.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_sharing,node_calls,node_onboarding,node_appbackup,node_user toneBlue
class node_engine,node_coordinator,node_identity,node_cryptoid,node_protocols,node_channels,node_network,node_delegates toneAmber
class node_sharedtypes,node_utilities toneMint
class node_database,node_dialogs,node_backup,node_backupseed toneRose
```

## Components

### App experience

- [Messenger app](https://github.com/olvid-io/olvid-ios/tree/main/Sources/App): `Sources/App`
- [Share extension](https://github.com/olvid-io/olvid-ios/blob/main/Sources/App/AppAndExtensions/Extensions/ShareExtension/Sources/ShareViewController.swift): `Sources/App/AppAndExtensions/Extensions/ShareExtension/Sources/ShareViewController.swift`
- [Voice and video calls](https://github.com/olvid-io/olvid-ios/blob/main/Sources/App/AppAndExtensions/App/Sources/VoIP/OlvidCallManager.swift): `Sources/App/AppAndExtensions/App/Sources/VoIP/OlvidCallManager.swift`
- [Onboarding](https://github.com/olvid-io/olvid-ios/tree/main/Sources/App/ObvOnboarding): `Sources/App/ObvOnboarding`
- [App backup flows](https://github.com/olvid-io/olvid-ios/tree/main/Sources/App/ObvAppBackup): `Sources/App/ObvAppBackup`

### Cryptographic engine

- [Engine API](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvEngine/Sources/ObvEngine.swift): `Sources/Engine/ObvEngine/Sources/ObvEngine.swift`
- [Engine coordinator](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvEngine/Sources/Coordinator/EngineCoordinator.swift): `Sources/Engine/ObvEngine/Sources/Coordinator/EngineCoordinator.swift`
- [Identity management](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvIdentityManager/Sources/ObvIdentityManagerImplementation.swift): `Sources/Engine/ObvIdentityManager/Sources/ObvIdentityManagerImplementation.swift`
- [Cryptographic identities](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvCrypto/Sources/ObvCryptoIdentity.swift): `Sources/Engine/ObvCrypto/Sources/ObvCryptoIdentity.swift`
- [Protocol management](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvProtocolManager/Sources/ObvProtocolManager.swift): `Sources/Engine/ObvProtocolManager/Sources/ObvProtocolManager.swift`
- [Secure channels](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvChannelManager/Sources/ObvChannelManagerImplementation.swift): `Sources/Engine/ObvChannelManager/Sources/ObvChannelManagerImplementation.swift`
- [Network communication](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvNetworkFetchManager/Sources/ObvNetworkFetchManagerImplementation.swift): `Sources/Engine/ObvNetworkFetchManager/Sources/ObvNetworkFetchManagerImplementation.swift`
- [Engine interfaces](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvMetaManager/Sources/ObvMetaManager.swift): `Sources/Engine/ObvMetaManager/Sources/ObvMetaManager.swift`

### Shared foundations

- [Shared types](https://github.com/olvid-io/olvid-ios/tree/main/Sources/Shared/ObvTypes): `Sources/Shared/ObvTypes`
- [Shared utilities](https://github.com/olvid-io/olvid-ios/tree/main/Sources/Shared/OlvidUtils): `Sources/Shared/OlvidUtils`

### Persistence and backup

- [Engine database](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvDatabaseManager/Sources/ObvEnginePersistentContainer.swift): `Sources/Engine/ObvDatabaseManager/Sources/ObvEnginePersistentContainer.swift`
- [Persisted dialogs](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvEngine/Sources/CoreData/PersistedEngineDialog.swift): `Sources/Engine/ObvEngine/Sources/CoreData/PersistedEngineDialog.swift`
- [Backup manager](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvBackupManagerNew/Sources/ObvBackupManagerNew.swift): `Sources/Engine/ObvBackupManagerNew/Sources/ObvBackupManagerNew.swift`
- [Backup seed](https://github.com/olvid-io/olvid-ios/blob/main/Sources/Engine/ObvCrypto/Sources/PRNG/BackupSeed.swift): `Sources/Engine/ObvCrypto/Sources/PRNG/BackupSeed.swift`

### Other components

- **User**

## Connections

- User → Messenger app: uses
- User → Share extension: shares content (evidence: `Sources/App/AppAndExtensions/Extensions/ShareExtension/Sources/ShareViewController.swift`)
- Messenger app → Engine API: uses engine (evidence: `Sources/App/AppAndExtensions/Extensions/ShareExtension/Sources/ShareViewController.swift`)
- Share extension → Engine API: initializes (evidence: `Sources/App/AppAndExtensions/Extensions/ShareExtension/Sources/ShareViewController.swift`)
- Messenger app → Voice and video calls: offers calling (evidence: `Sources/App/AppAndExtensions/App/Sources/VoIP/UI/ViewModelsImplementation/OlvidCallManager+OlvidCallViewActionsProtocol.swift`)
- Messenger app → Onboarding: supports setup (evidence: `Sources/App/ObvOnboarding/Sources/BackupRestoreLegacy/03WaitingForBackupRestore/WaitingForBackupRestoreViewController.swift`)
- Messenger app → App backup flows: supports backup (evidence: `Sources/App/ObvAppBackup/DevelopmentResources/SettingsPreviews/PreviewSettingsNavigationController.swift`)
- Engine API → Identity management: delegates identity (evidence: `Sources/Engine/ObvEngine/Sources/ObvEngine+ObvIdentityManagerImplementationDelegate.swift`)
- Engine API → Backup manager: delegates backup (evidence: `Sources/Engine/ObvEngine/Sources/ObvEngine+ObvBackupManagerNewDelegate.swift`)
- Engine API → Secure channels: posts messages (evidence: `Sources/Engine/ObvEngine/Sources/ObvEngine.swift`)
- Engine API → Protocol management: uses protocols (evidence: `Sources/Engine/ObvEngine/Sources/ObvEngine.swift`)
- Engine API → Network communication: communicates over network (evidence: `Sources/Engine/ObvEngine/Sources/ObvEngine.swift`)
- Engine API → Engine interfaces: registers managers (evidence: `Sources/Engine/ObvMetaManager/Sources/ObvMetaManager.swift`)
- Identity management → Cryptographic identities: uses identities (evidence: `Sources/Engine/ObvIdentityManager/Sources/ObvIdentityManagerImplementation.swift`)
- Engine API → Persisted dialogs: reads dialogs (evidence: `Sources/Engine/ObvEngine/Sources/ObvEngine.swift`)
- Persisted dialogs → Engine database: persists in
- Engine API → Engine database: uses persistence
- Backup manager → Backup seed: derives keys (evidence: `Sources/Engine/ObvCrypto/Sources/PRNG/BackupSeed.swift`)
- Engine API → Shared types: uses shared types (evidence: `Sources/Engine/ObvEngine/Sources/ObvEngine.swift`)
- Engine API → Shared utilities: uses shared utilities (evidence: `Sources/Engine/ObvEngine/Sources/ObvEngine.swift`)
