# nan13473/veribind architecture

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

- Interactive diagram: https://gitdiagram.com/nan13473/veribind
- Repository: https://github.com/nan13473/veribind

## Overview

VeriBind is a wallet-bound credential demo: holders register, institutions approve and mint credentials, holders confirm them, and verifiers request and validate selective QR presentations. The frontend App coordinates these stages, using the identity, Merkle, and presentation utilities and reading live credential status from the Solidity contract during verification. README-described capabilities such as role routing and lifecycle transitions are represented, but unsampled contract and UI wiring is not expanded beyond documented behavior.

Main entry points: [`frontend/src/App.tsx`](https://github.com/nan13473/veribind/blob/main/frontend/src/App.tsx) (Role workspaces), [`frontend/src/lib/presentation.ts`](https://github.com/nan13473/veribind/blob/main/frontend/src/lib/presentation.ts) (Presentation signing and checks), [`contracts/VeriBindCredential.sol`](https://github.com/nan13473/veribind/blob/main/contracts/VeriBindCredential.sol) (Credential contract), [`frontend/src/lib/merkle.ts`](https://github.com/nan13473/veribind/blob/main/frontend/src/lib/merkle.ts) (Field Merkle proofs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Credential workflow"]
  node_app["Role workspaces<br/>[App.tsx]"]
end

subgraph group_proofs["Identity and proofs"]
  node_identity["Identity hashing<br/>[identity.ts]"]
  node_encryption["Document encryption<br/>[encryption.ts]"]
  node_merkle["Field Merkle proofs<br/>[merkle.ts]"]
  node_presentation["Presentation signing and checks<br/>[presentation.ts]"]
end

subgraph group_chain["On-chain credential"]
  node_credential["Credential contract"]
end

subgraph group_verification["QR verification"]
end

node_holder(("Holder"))
node_issuer(("Issuer"))
node_verifier(("Verifier"))
node_wallet(("Wallet provider"))
node_chainnet[("Blockchain network")]
node_qrtools["QR encoder / decoder"]

node_holder -->|"registers / confirms"| node_app
node_issuer -->|"approves issuance"| node_app
node_verifier -->|"requests / verifies"| node_app
node_app -->|"connects accounts"| node_wallet
node_app -->|"hashes identity"| node_identity
node_app -->|"issues / updates"| node_credential
node_credential -->|"persists state"| node_chainnet
node_app -->|"builds proof"| node_merkle
node_app -->|"signs / checks"| node_presentation
node_presentation -->|"requests signature"| node_wallet
node_presentation -->|"checks proof"| node_merkle
node_app -->|"encodes / decodes"| node_qrtools
node_app -->|"reads live status"| node_credential
node_app -.->|"document crypto utility"| node_encryption

click node_app "https://github.com/nan13473/veribind/blob/main/frontend/src/App.tsx"
click node_identity "https://github.com/nan13473/veribind/blob/main/frontend/src/lib/identity.ts"
click node_encryption "https://github.com/nan13473/veribind/blob/main/frontend/src/lib/encryption.ts"
click node_merkle "https://github.com/nan13473/veribind/blob/main/frontend/src/lib/merkle.ts"
click node_presentation "https://github.com/nan13473/veribind/blob/main/frontend/src/lib/presentation.ts"
click node_credential "https://github.com/nan13473/veribind/blob/main/contracts/VeriBindCredential.sol"

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 toneBlue
class node_identity,node_encryption,node_merkle,node_presentation,node_chainnet toneAmber
class node_credential toneMint
class node_holder,node_issuer,node_verifier,node_wallet,node_qrtools toneIndigo
```

## Components

### Credential workflow

- [Role workspaces](https://github.com/nan13473/veribind/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`

### Identity and proofs

- [Identity hashing](https://github.com/nan13473/veribind/blob/main/frontend/src/lib/identity.ts): `frontend/src/lib/identity.ts`
- [Document encryption](https://github.com/nan13473/veribind/blob/main/frontend/src/lib/encryption.ts): `frontend/src/lib/encryption.ts`
- [Field Merkle proofs](https://github.com/nan13473/veribind/blob/main/frontend/src/lib/merkle.ts): `frontend/src/lib/merkle.ts`
- [Presentation signing and checks](https://github.com/nan13473/veribind/blob/main/frontend/src/lib/presentation.ts): `frontend/src/lib/presentation.ts`

### On-chain credential

- [Credential contract](https://github.com/nan13473/veribind/blob/main/contracts/VeriBindCredential.sol): `contracts/VeriBindCredential.sol`

### Other components

- **Holder**
- **Issuer**
- **Verifier**
- **Wallet provider**
- **Blockchain network**
- **QR encoder / decoder**

## Connections

- Holder → Role workspaces: registers / confirms
- Issuer → Role workspaces: approves issuance
- Verifier → Role workspaces: requests / verifies
- Role workspaces → Wallet provider: connects accounts
- Role workspaces → Identity hashing: hashes identity
- Role workspaces → Credential contract: issues / updates
- Credential contract → Blockchain network: persists state
- Role workspaces → Field Merkle proofs: builds proof
- Role workspaces → Presentation signing and checks: signs / checks
- Presentation signing and checks → Wallet provider: requests signature
- Presentation signing and checks → Field Merkle proofs: checks proof
- Role workspaces → QR encoder / decoder: encodes / decodes
- Role workspaces → Credential contract: reads live status
- Role workspaces → Document encryption: document crypto utility
