# nova-scotia-digital-service/ns-mobile-wallet architecture

> Architecture diagram of the GitHub repository nova-scotia-digital-service/ns-mobile-wallet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nova-scotia-digital-service/ns-mobile-wallet
- Repository: https://github.com/nova-scotia-digital-service/ns-mobile-wallet

## Overview

BC Wallet Mobile is a React Native digital-credential wallet. Its documented user journey spans onboarding and setup, identity evidence collection, credential handling, and proof-request interactions; the app shell composes navigation, providers, and app-specific dependency wiring. README documentation describes issuer, ledger, and mediator services, while source excerpts expose only selected runtime relationships, so unverified service links are marked dashed.

Main entry points: [`app/src/modules/unified/navigators/VerifiedPersonStack.tsx`](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/navigators/VerifiedPersonStack.tsx) (Verified-person flow), [`app/App.tsx`](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/App.tsx) (Application shell), [`app/src/hooks/initialize-agent.ts`](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/hooks/initialize-agent.ts) (Agent initialization), [`app/src/store.tsx`](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/store.tsx) (Wallet state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["App Shell"]
  node_entry["Native entry<br/>[index.js]"]
  node_app["Application shell<br/>[App.tsx]"]
  node_container["App wiring<br/>[container-imp.ts]"]
  node_store[("Wallet state<br/>[store.tsx]")]
end

subgraph group_identity["Identity Setup"]
  node_onboarding["Onboarding"]
  node_preface["Preface<br/>[Preface.tsx]"]
  node_terms["Terms acceptance<br/>[Terms.tsx]"]
  node_splash["Initialization screen<br/>[Splash.tsx]"]
  node_verifiednav["Verified-person flow"]
  node_verification["Verification steps"]
  node_evidence["Evidence collection"]
  node_evidencecontent["Evidence choices<br/>[Choose.tsx]"]
  node_birthdate["Birthdate entry<br/>[Birthdate.tsx]"]
  node_manual["Manual serial entry<br/>[ManualSerial.tsx]"]
  node_scan["Identity scan<br/>[Scan.tsx]"]
  node_address["Address step"]
  node_email["Email step<br/>[EmailStep.tsx]"]
  node_verifyidentity["Identity verification"]
end

subgraph group_wallet["Wallet Experience"]
  node_home["Wallet home<br/>[container-imp.ts]"]
  node_credential["Credential exchange<br/>[App.tsx]"]
  node_proof["Proof requests<br/>[App.tsx]"]
  node_web["Web display<br/>[WebDisplay.tsx]"]
end

subgraph group_runtime["Agent Runtime"]
  node_agentinit["Agent initialization"]
  node_agentmodules["Agent modules"]
  node_push["Push notifications"]
end

subgraph group_support["App Support"]
  node_developer["Developer settings<br/>[Developer.tsx]"]
  node_ias["IAS environments<br/>[IASEnvironment.tsx]"]
  node_remote["Remote log warning"]
  node_translations["Localization<br/>[index.ts]"]
end

node_user(("Wallet user"))
node_ledger{{"Von Network ledger"}}
node_mediator{{"Mediator service"}}
node_issuer{{"Credential issuer"}}

node_user -->|"opens"| node_entry
node_entry -->|"registers"| node_app
node_app -->|"initializes"| node_container
node_app -->|"provides state"| node_store
node_app -->|"renders"| node_web
node_container -->|"registers UI"| node_home
node_container -->|"activates"| node_push
node_user -.->|"begins setup"| node_onboarding
node_onboarding -.->|"continues"| node_preface
node_preface -.->|"continues"| node_terms
node_terms -->|"reads agreement"| node_store
node_splash -.->|"starts agent"| node_agentinit
node_agentinit -.->|"uses modules"| node_agentmodules
node_agentinit -->|"configures"| node_push
node_verifiednav -->|"routes to"| node_verification
node_verifiednav -->|"routes to"| node_evidence
node_verifiednav -->|"routes to"| node_address
node_verifiednav -->|"routes to"| node_email
node_verifiednav -->|"routes to"| node_verifyidentity
node_evidence -->|"renders choice"| node_evidencecontent
node_evidence -->|"renders scanner"| node_scan
node_evidence -->|"renders entry"| node_manual
node_evidencecontent -->|"updates state"| node_store
node_birthdate -->|"updates state"| node_store
node_manual -->|"updates state"| node_store
node_user -.->|"receives credentials"| node_credential
node_user -.->|"reviews requests"| node_proof
node_credential -.->|"exchanges credentials"| node_issuer
node_agentinit -.->|"connects to ledger"| node_ledger
node_agentinit -.->|"uses mediator"| node_mediator
node_developer -->|"opens settings"| node_ias
node_developer -->|"opens warning"| node_remote
node_app -->|"loads resources"| node_translations

click node_entry "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/index.js"
click node_app "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/App.tsx"
click node_container "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/container-imp.ts"
click node_store "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/store.tsx"
click node_onboarding "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/OnboardingPages.tsx"
click node_preface "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/Preface.tsx"
click node_terms "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/Terms.tsx"
click node_splash "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/Splash.tsx"
click node_verifiednav "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/navigators/VerifiedPersonStack.tsx"
click node_verification "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/VerificationSteps.tsx"
click node_evidence "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/EvidenceCollectionStep.tsx"
click node_evidencecontent "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/contents/EvidenceCollectionStep/Choose.tsx"
click node_birthdate "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/contents/EvidenceCollectionStep/Birthdate.tsx"
click node_manual "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/contents/EvidenceCollectionStep/ManualSerial.tsx"
click node_scan "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/contents/EvidenceCollectionStep/Scan.tsx"
click node_address "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/ResidentialAddressStep.tsx"
click node_email "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/EmailStep.tsx"
click node_verifyidentity "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/VerifyIdentityStep.tsx"
click node_home "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/container-imp.ts"
click node_credential "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/App.tsx"
click node_proof "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/App.tsx"
click node_web "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/WebDisplay.tsx"
click node_agentinit "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/hooks/initialize-agent.ts"
click node_agentmodules "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/helpers/bc-agent-modules.ts"
click node_push "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/helpers/PushNotificationsHelper.ts"
click node_developer "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/Developer.tsx"
click node_ias "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/IASEnvironment.tsx"
click node_remote "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/RemoteLogWarning.tsx"
click node_translations "https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/index.ts"

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_entry,node_app,node_container,node_store,node_user toneBlue
class node_onboarding,node_preface,node_terms,node_splash,node_verifiednav,node_verification,node_evidence,node_evidencecontent,node_birthdate,node_manual,node_scan,node_address,node_email,node_verifyidentity toneAmber
class node_home,node_credential,node_proof,node_web toneMint
class node_agentinit,node_agentmodules,node_push toneRose
class node_developer,node_ias,node_remote,node_translations,node_ledger,node_mediator,node_issuer toneIndigo
```

## Components

### App Shell

- [Native entry](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/index.js): `app/index.js`
- [Application shell](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/App.tsx): `app/App.tsx`
- [App wiring](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/container-imp.ts): `app/container-imp.ts`
- [Wallet state](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/store.tsx): `app/src/store.tsx`

### Identity Setup

- [Onboarding](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/OnboardingPages.tsx): `app/src/screens/OnboardingPages.tsx`
- [Preface](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/Preface.tsx): `app/src/screens/Preface.tsx`
- [Terms acceptance](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/Terms.tsx): `app/src/screens/Terms.tsx`
- [Initialization screen](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/Splash.tsx): `app/src/screens/Splash.tsx`
- [Verified-person flow](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/navigators/VerifiedPersonStack.tsx): `app/src/modules/unified/navigators/VerifiedPersonStack.tsx`
- [Verification steps](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/VerificationSteps.tsx): `app/src/modules/unified/screens/VerificationSteps.tsx`
- [Evidence collection](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/EvidenceCollectionStep.tsx): `app/src/modules/unified/screens/EvidenceCollectionStep.tsx`
- [Evidence choices](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/contents/EvidenceCollectionStep/Choose.tsx): `app/src/modules/unified/contents/EvidenceCollectionStep/Choose.tsx`
- [Birthdate entry](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/contents/EvidenceCollectionStep/Birthdate.tsx): `app/src/modules/unified/contents/EvidenceCollectionStep/Birthdate.tsx`
- [Manual serial entry](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/contents/EvidenceCollectionStep/ManualSerial.tsx): `app/src/modules/unified/contents/EvidenceCollectionStep/ManualSerial.tsx`
- [Identity scan](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/contents/EvidenceCollectionStep/Scan.tsx): `app/src/modules/unified/contents/EvidenceCollectionStep/Scan.tsx`
- [Address step](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/ResidentialAddressStep.tsx): `app/src/modules/unified/screens/ResidentialAddressStep.tsx`
- [Email step](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/EmailStep.tsx): `app/src/modules/unified/screens/EmailStep.tsx`
- [Identity verification](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/modules/unified/screens/VerifyIdentityStep.tsx): `app/src/modules/unified/screens/VerifyIdentityStep.tsx`

### Wallet Experience

- [Wallet home](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/container-imp.ts): `app/container-imp.ts`
- [Credential exchange](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/App.tsx): `app/App.tsx`
- [Proof requests](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/App.tsx): `app/App.tsx`
- [Web display](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/WebDisplay.tsx): `app/src/screens/WebDisplay.tsx`

### Agent Runtime

- [Agent initialization](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/hooks/initialize-agent.ts): `app/src/hooks/initialize-agent.ts`
- [Agent modules](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/helpers/bc-agent-modules.ts): `app/src/helpers/bc-agent-modules.ts`
- [Push notifications](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/helpers/PushNotificationsHelper.ts): `app/src/helpers/PushNotificationsHelper.ts`

### App Support

- [Developer settings](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/Developer.tsx): `app/src/screens/Developer.tsx`
- [IAS environments](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/IASEnvironment.tsx): `app/src/screens/IASEnvironment.tsx`
- [Remote log warning](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/screens/RemoteLogWarning.tsx): `app/src/screens/RemoteLogWarning.tsx`
- [Localization](https://github.com/nova-scotia-digital-service/ns-mobile-wallet/blob/main/app/src/index.ts): `app/src/index.ts`

### Other components

- **Wallet user**
- **Von Network ledger**
- **Mediator service**
- **Credential issuer**

## Connections

- Wallet user → Native entry: opens (evidence: `app/index.js`)
- Native entry → Application shell: registers (evidence: `app/index.js`)
- Application shell → App wiring: initializes (evidence: `app/App.tsx`)
- Application shell → Wallet state: provides state (evidence: `app/App.tsx`)
- Application shell → Web display: renders (evidence: `app/App.tsx`)
- App wiring → Wallet home: registers UI (evidence: `app/container-imp.ts`)
- App wiring → Push notifications: activates (evidence: `app/container-imp.ts`)
- Wallet user → Onboarding: begins setup
- Onboarding → Preface: continues
- Preface → Terms acceptance: continues
- Terms acceptance → Wallet state: reads agreement (evidence: `app/src/screens/Terms.tsx`)
- Initialization screen → Agent initialization: starts agent
- Agent initialization → Agent modules: uses modules (evidence: `app/src/hooks/initialize-agent.ts`)
- Agent initialization → Push notifications: configures (evidence: `app/src/hooks/initialize-agent.ts`)
- Verified-person flow → Verification steps: routes to (evidence: `app/src/modules/unified/navigators/VerifiedPersonStack.tsx`)
- Verified-person flow → Evidence collection: routes to (evidence: `app/src/modules/unified/navigators/VerifiedPersonStack.tsx`)
- Verified-person flow → Address step: routes to (evidence: `app/src/modules/unified/navigators/VerifiedPersonStack.tsx`)
- Verified-person flow → Email step: routes to (evidence: `app/src/modules/unified/navigators/VerifiedPersonStack.tsx`)
- Verified-person flow → Identity verification: routes to (evidence: `app/src/modules/unified/navigators/VerifiedPersonStack.tsx`)
- Evidence collection → Evidence choices: renders choice (evidence: `app/src/modules/unified/screens/EvidenceCollectionStep.tsx`)
- Evidence collection → Identity scan: renders scanner (evidence: `app/src/modules/unified/screens/EvidenceCollectionStep.tsx`)
- Evidence collection → Manual serial entry: renders entry (evidence: `app/src/modules/unified/screens/EvidenceCollectionStep.tsx`)
- Evidence choices → Wallet state: updates state (evidence: `app/src/modules/unified/contents/EvidenceCollectionStep/Choose.tsx`)
- Birthdate entry → Wallet state: updates state (evidence: `app/src/modules/unified/contents/EvidenceCollectionStep/Birthdate.tsx`)
- Manual serial entry → Wallet state: updates state (evidence: `app/src/modules/unified/contents/EvidenceCollectionStep/ManualSerial.tsx`)
- Wallet user → Credential exchange: receives credentials
- Wallet user → Proof requests: reviews requests
- Credential exchange → Credential issuer: exchanges credentials
- Agent initialization → Von Network ledger: connects to ledger
- Agent initialization → Mediator service: uses mediator
- Developer settings → IAS environments: opens settings (evidence: `app/src/screens/Developer.tsx`)
- Developer settings → Remote log warning: opens warning (evidence: `app/src/screens/Developer.tsx`)
- Application shell → Localization: loads resources (evidence: `app/index.js`)
