# eu-digital-identity-wallet/av-app-android-wallet-ui architecture

> Architecture diagram of the GitHub repository eu-digital-identity-wallet/av-app-android-wallet-ui, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/eu-digital-identity-wallet/av-app-android-wallet-ui
- Repository: https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui

## Overview

#### Purpose and runtime
This is a white-label Android reference app for obtaining, securely storing, and presenting age-verification attestations. It targets Android API 29+ and uses Kotlin/Gradle, Jetpack Compose, Android navigation, Koin DI, and an MVI-style UI layer. The Android application entry points are `assembly-logic/src/main/java/eu/europa/ec/assemblylogic/Application.kt` and `assembly-logic/src/main/java/eu/europa/ec/assemblylogic/ui/MainActivity.kt`; `app` packages the application.

#### Composition and dependency boundary
The repository is organized as reusable logic modules plus user-facing feature modules. `assembly-logic/src/main/java/eu/europa/ec/assemblylogic/di/AssemblyModule.kt` composes DI registrations; each domain/feature exposes a Koin module, e.g. `core-logic/src/main/java/eu/europa/ec/corelogic/di/LogicCoreModule.kt` and `issuance-feature/src/main/java/eu/europa/ec/issuancefeature/di/FeatureIssuanceModule.kt`. Feature UI should depend on interactors/controllers rather than directly on wallet, storage, or network implementations.

#### UI, state, and navigation
Compose screens pair with ViewModels and route graphs. The shared UI contract—MVI state/events, router host, serialization, base activity, and navigation abstractions—lives in `ui-logic/src/main/java/eu/europa/ec/uilogic/mvi/MviViewModel.kt`, `ui-logic/src/main/java/eu/europa/ec/uilogic/navigation/RouterHost.kt`, and `ui-logic/src/main/java/eu/europa/ec/uilogic/container/EudiComponentActivity.kt`. Each lifecycle/domain flow owns a graph, such as `startup-feature/src/main/java/eu/europa/ec/startupfeature/router/Graph.kt`, isolating navigation between startup, onboarding, issuance, and presentation.

#### Startup, authentication, and secure local state
Startup determines eligibility and routes to splash or a hardware-keystore blocking screen through `startup-feature/src/main/java/eu/europa/ec/startupfeature/interactor/SplashInteractor.kt` and `startup-feature/src/main/java/eu/europa/ec/startupfeature/ui/hardblock/HardwareKeystoreBlockScreen.kt`. PIN, device authentication, biometrics, vault keys, and encrypted auth metadata are bounded in `authentication-logic/src/main/java/eu/europa/ec/authenticationlogic/controller/authentication/BiometricAuthenticationController.kt`, `authentication-logic/src/main/java/eu/europa/ec/authenticationlogic/storage/AuthMetadataStore.kt`, and `authentication-logic/src/main/java/eu/europa/ec/authenticationlogic/provider/VaultKeyProvider.kt`. Generic crypto, Android Keystore access, preferences, and logging sit below this in `business-logic/src/main/java/eu/europa/ec/businesslogic/controller/crypto/CryptoController.kt`.

#### Wallet core, persistence, and background work
`core-logic` adapts the external EUDI Wallet Core SDK into app-facing document, presentation, transaction-log, attestation, and passport-scanning controllers. Core boundaries are `core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt`, `core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCorePresentationController.kt`, and `core-logic/src/main/java/eu/europa/ec/corelogic/worker/RevocationWorkManager.kt`. App-owned durable data—bookmarks, revoked documents, and transaction logs—is isolated behind Room-style DAOs/database services in `storage-logic/src/main/java/eu/europa/ec/storagelogic/service/DatabaseService.kt` and `storage-logic/src/main/java/eu/europa/ec/storagelogic/dao/TransactionLogDao.kt`.

#### Primary credential flows
Issuance accepts an offer/offer code, transforms it for display, requests a credential through wallet-core adapters, then shows success: `issuance-feature/src/main/java/eu/europa/ec/issuancefeature/interactor/DocumentOfferInteractor.kt`, `issuance-feature/src/main/java/eu/europa/ec/issuancefeature/interactor/AddDocumentInteractor.kt`, and `issuance-feature/src/main/java/eu/europa/ec/issuancefeature/router/Graph.kt`. Presentation processes QR/deep-link requests, loads/selects claims and documents, performs authenticated wallet presentation, and reports completion via `presentation-feature/src/main/java/eu/europa/ec/presentationfeature/interactor/PresentationRequestInteractor.kt` and `presentation-feature/src/main/java/eu/europa/ec/presentationfeature/interactor/PresentationLoadingInteractor.kt`. These flows implement OpenID4VCI issuance and OpenID4VP/DCQL remote presentation against configured issuer and relying-party services.

#### Onboarding and passport identity boundary
Onboarding is a separate enrollment pipeline: consent → document identification/passport scan → biometric/live-video checks → passport credential issuance. It is coordinated by `onboarding-feature/src/main/java/eu/europa/ec/onboardingfeature/session/PassportOnboardingSession.kt` and interactors under `onboarding-feature/src/main/java/eu/europa/ec/onboardingfeature/interactor/`. `passport-scanner` is the device/hardware boundary, using camera, NFC/eMRTD parsing, native libraries, bundled trust/model assets, and face matching; its activity/API surface begins at `passport-scanner/src/main/java/eu/europa/ec/passportscanner/SmartScannerActivity.kt` and `passport-scanner/src/main/java/eu/europa/ec/passportscanner/nfc/NFCActivity.kt`.

#### Network, configuration, and delivery
Network access is centralized in `network-logic/src/main/java/eu/europa/ec/networklogic/repository/WalletAttestationRepository.kt`, with Android network security policy at `network-logic/src/main/res/xml/network_security_config.xml`. Dev and demo flavors provide wallet/business configuration via `core-logic/src/dev/java/eu/europa/ec/corelogic/config/WalletCoreConfigImpl.kt` and `business-logic/src/demo/java/eu/europa/ec/businesslogic/config/ConfigLogicImpl.kt`. CI builds, publishes, and runs Maestro end-to-end flows through `.github/workflows/pull_request_pipeline.yaml` and `.github/workflows/maestro_e2e_tests.yaml`.

Main entry points: [`core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt`](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt) (Wallet document controller), [`ui-logic/src/main/java/eu/europa/ec/uilogic/mvi/MviViewModel.kt`](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/ui-logic/src/main/java/eu/europa/ec/uilogic/mvi/MviViewModel.kt) (MVI & navigation contract), [`presentation-feature/src/main/java/eu/europa/ec/presentationfeature/interactor/PresentationRequestInteractor.kt`](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/presentation-feature/src/main/java/eu/europa/ec/presentationfeature/interactor/PresentationRequestInteractor.kt) (Remote presentation), [`assembly-logic/src/main/java/eu/europa/ec/assemblylogic/Application.kt`](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/assembly-logic/src/main/java/eu/europa/ec/assemblylogic/Application.kt) (Application & DI composition)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Android app &amp; UI"]
  node_app_package["App package<br/>Android packaging"]
  node_application["Application &amp; DI composition<br/>Android bootstrap<br/>[Application.kt]"]
  node_main_activity["Main activity<br/>Compose entry point<br/>[MainActivity.kt]"]
  node_ui_contract["MVI &amp; navigation contract<br/>shared UI logic<br/>[MviViewModel.kt]"]
end

subgraph group_flows["Credential flows"]
  node_startup["Startup eligibility<br/>startup feature"]
  node_issuance["Credential issuance<br/>issuance feature"]
  node_presentation["Remote presentation<br/>presentation feature"]
  node_onboarding["Passport onboarding<br/>onboarding feature"]
end

subgraph group_platform["Core platform"]
  node_auth["Authentication vault<br/>authentication logic"]
  node_crypto["Crypto &amp; Android Keystore<br/>business logic"]
  node_wallet_documents["Wallet document controller<br/>wallet-core adapter"]
  node_wallet_presentation["Wallet presentation controller<br/>wallet-core adapter"]
  node_revocation["Revocation background work<br/>WorkManager worker"]
  node_database[("Durable app data<br/>Room storage<br/>[DatabaseService.kt]")]
end

subgraph group_external["External boundaries"]
  node_network["Wallet attestation network<br/>network repository"]
  node_passport_scanner{{"Passport scanner<br/>device identity boundary"}}
  node_wallet_sdk{{"EUDI Wallet Core SDK<br/>external SDK"}}
  node_issuer_rp{{"Issuer &amp; relying parties<br/>remote services"}}
end

node_app_package -->|"packages"| node_application
node_application -->|"starts"| node_main_activity
node_application -->|"composes modules for"| node_ui_contract
node_main_activity -->|"enters"| node_startup
node_ui_contract -->|"hosts navigation"| node_startup
node_ui_contract -->|"hosts navigation"| node_issuance
node_ui_contract -->|"hosts navigation"| node_presentation
node_ui_contract -->|"hosts navigation"| node_onboarding
node_startup -->|"checks secure eligibility"| node_auth
node_auth -->|"uses keys and crypto"| node_crypto
node_issuance -->|"requests credential"| node_wallet_documents
node_issuance -->|"retrieves offer data"| node_network
node_presentation -->|"selects documents"| node_wallet_documents
node_presentation -->|"presents claims"| node_wallet_presentation
node_presentation -->|"requires authentication"| node_auth
node_onboarding -->|"captures passport identity"| node_passport_scanner
node_onboarding -->|"issues passport credential"| node_wallet_documents
node_wallet_documents -->|"adapts"| node_wallet_sdk
node_wallet_presentation -->|"adapts"| node_wallet_sdk
node_wallet_presentation -->|"responds to"| node_issuer_rp
node_network -->|"connects to"| node_issuer_rp
node_wallet_documents -->|"persists app-owned records"| node_database
node_revocation -->|"checks revoked documents"| node_wallet_documents
node_revocation -->|"records revocation state"| node_database

click node_app_package "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/tree/main/app"
click node_application "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/assembly-logic/src/main/java/eu/europa/ec/assemblylogic/Application.kt"
click node_main_activity "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/assembly-logic/src/main/java/eu/europa/ec/assemblylogic/ui/MainActivity.kt"
click node_ui_contract "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/ui-logic/src/main/java/eu/europa/ec/uilogic/mvi/MviViewModel.kt"
click node_startup "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/startup-feature/src/main/java/eu/europa/ec/startupfeature/interactor/SplashInteractor.kt"
click node_issuance "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/issuance-feature/src/main/java/eu/europa/ec/issuancefeature/interactor/AddDocumentInteractor.kt"
click node_presentation "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/presentation-feature/src/main/java/eu/europa/ec/presentationfeature/interactor/PresentationRequestInteractor.kt"
click node_onboarding "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/onboarding-feature/src/main/java/eu/europa/ec/onboardingfeature/session/PassportOnboardingSession.kt"
click node_auth "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/authentication-logic/src/main/java/eu/europa/ec/authenticationlogic/controller/authentication/BiometricAuthenticationController.kt"
click node_crypto "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/business-logic/src/main/java/eu/europa/ec/businesslogic/controller/crypto/CryptoController.kt"
click node_wallet_documents "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt"
click node_wallet_presentation "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCorePresentationController.kt"
click node_revocation "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/core-logic/src/main/java/eu/europa/ec/corelogic/worker/RevocationWorkManager.kt"
click node_database "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/storage-logic/src/main/java/eu/europa/ec/storagelogic/service/DatabaseService.kt"
click node_network "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/network-logic/src/main/java/eu/europa/ec/networklogic/repository/WalletAttestationRepository.kt"
click node_passport_scanner "https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/passport-scanner/src/main/java/eu/europa/ec/passportscanner/SmartScannerActivity.kt"

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_package,node_application,node_main_activity,node_ui_contract toneBlue
class node_startup,node_issuance,node_presentation,node_onboarding toneAmber
class node_auth,node_crypto,node_wallet_documents,node_wallet_presentation,node_revocation,node_database toneMint
class node_network,node_passport_scanner,node_wallet_sdk,node_issuer_rp toneRose
```

## Components

### Android app & UI

- [App package](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/tree/main/app): Android packaging · `app`
- [Application & DI composition](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/assembly-logic/src/main/java/eu/europa/ec/assemblylogic/Application.kt): Android bootstrap · Creates the app and composes Koin modules. · `assembly-logic/src/main/java/eu/europa/ec/assemblylogic/Application.kt`
- [Main activity](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/assembly-logic/src/main/java/eu/europa/ec/assemblylogic/ui/MainActivity.kt): Compose entry point · `assembly-logic/src/main/java/eu/europa/ec/assemblylogic/ui/MainActivity.kt`
- [MVI & navigation contract](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/ui-logic/src/main/java/eu/europa/ec/uilogic/mvi/MviViewModel.kt): shared UI logic · Shared ViewModel, router host, and activity abstractions. · `ui-logic/src/main/java/eu/europa/ec/uilogic/mvi/MviViewModel.kt`

### Credential flows

- [Startup eligibility](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/startup-feature/src/main/java/eu/europa/ec/startupfeature/interactor/SplashInteractor.kt): startup feature · Routes into the app or hardware-keystore block. · `startup-feature/src/main/java/eu/europa/ec/startupfeature/interactor/SplashInteractor.kt`
- [Credential issuance](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/issuance-feature/src/main/java/eu/europa/ec/issuancefeature/interactor/AddDocumentInteractor.kt): issuance feature · Processes offers and requests credentials with OpenID4VCI. · `issuance-feature/src/main/java/eu/europa/ec/issuancefeature/interactor/AddDocumentInteractor.kt`
- [Remote presentation](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/presentation-feature/src/main/java/eu/europa/ec/presentationfeature/interactor/PresentationRequestInteractor.kt): presentation feature · Handles QR/deep-link requests and authenticated OpenID4VP/DCQL presentation. · `presentation-feature/src/main/java/eu/europa/ec/presentationfeature/interactor/PresentationRequestInteractor.kt`
- [Passport onboarding](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/onboarding-feature/src/main/java/eu/europa/ec/onboardingfeature/session/PassportOnboardingSession.kt): onboarding feature · Coordinates consent, identity checks, and passport credential issuance. · `onboarding-feature/src/main/java/eu/europa/ec/onboardingfeature/session/PassportOnboardingSession.kt`

### Core platform

- [Authentication vault](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/authentication-logic/src/main/java/eu/europa/ec/authenticationlogic/controller/authentication/BiometricAuthenticationController.kt): authentication logic · Biometrics, device authentication, vault keys, and encrypted auth metadata. · `authentication-logic/src/main/java/eu/europa/ec/authenticationlogic/controller/authentication/BiometricAuthenticationController.kt`
- [Crypto & Android Keystore](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/business-logic/src/main/java/eu/europa/ec/businesslogic/controller/crypto/CryptoController.kt): business logic · `business-logic/src/main/java/eu/europa/ec/businesslogic/controller/crypto/CryptoController.kt`
- [Wallet document controller](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt): wallet-core adapter · App-facing document and attestation access over EUDI Wallet Core. · `core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCoreDocumentsController.kt`
- [Wallet presentation controller](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCorePresentationController.kt): wallet-core adapter · `core-logic/src/main/java/eu/europa/ec/corelogic/controller/WalletCorePresentationController.kt`
- [Revocation background work](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/core-logic/src/main/java/eu/europa/ec/corelogic/worker/RevocationWorkManager.kt): WorkManager worker · `core-logic/src/main/java/eu/europa/ec/corelogic/worker/RevocationWorkManager.kt`
- [Durable app data](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/storage-logic/src/main/java/eu/europa/ec/storagelogic/service/DatabaseService.kt): Room storage · Stores bookmarks, revoked documents, and transaction logs. · `storage-logic/src/main/java/eu/europa/ec/storagelogic/service/DatabaseService.kt`

### External boundaries

- [Wallet attestation network](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/network-logic/src/main/java/eu/europa/ec/networklogic/repository/WalletAttestationRepository.kt): network repository · `network-logic/src/main/java/eu/europa/ec/networklogic/repository/WalletAttestationRepository.kt`
- [Passport scanner](https://github.com/eu-digital-identity-wallet/av-app-android-wallet-ui/blob/main/passport-scanner/src/main/java/eu/europa/ec/passportscanner/SmartScannerActivity.kt): device identity boundary · Camera, NFC/eMRTD, native assets, and face matching. · `passport-scanner/src/main/java/eu/europa/ec/passportscanner/SmartScannerActivity.kt`
- **EUDI Wallet Core SDK**: external SDK
- **Issuer & relying parties**: remote services · Configured OpenID4VCI issuers and OpenID4VP relying parties.

## Connections

- App package → Application & DI composition: packages
- Application & DI composition → Main activity: starts
- Application & DI composition → MVI & navigation contract: composes modules for
- Main activity → Startup eligibility: enters
- MVI & navigation contract → Startup eligibility: hosts navigation
- MVI & navigation contract → Credential issuance: hosts navigation
- MVI & navigation contract → Remote presentation: hosts navigation
- MVI & navigation contract → Passport onboarding: hosts navigation
- Startup eligibility → Authentication vault: checks secure eligibility
- Authentication vault → Crypto & Android Keystore: uses keys and crypto
- Credential issuance → Wallet document controller: requests credential
- Credential issuance → Wallet attestation network: retrieves offer data
- Remote presentation → Wallet document controller: selects documents
- Remote presentation → Wallet presentation controller: presents claims
- Remote presentation → Authentication vault: requires authentication
- Passport onboarding → Passport scanner: captures passport identity
- Passport onboarding → Wallet document controller: issues passport credential
- Wallet document controller → EUDI Wallet Core SDK: adapts
- Wallet presentation controller → EUDI Wallet Core SDK: adapts
- Wallet presentation controller → Issuer & relying parties: responds to
- Wallet attestation network → Issuer & relying parties: connects to
- Wallet document controller → Durable app data: persists app-owned records
- Revocation background work → Wallet document controller: checks revoked documents
- Revocation background work → Durable app data: records revocation state
