# godwin-akakpo/planbnetworkdevtrackassignment architecture

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

- Interactive diagram: https://gitdiagram.com/godwin-akakpo/planbnetworkdevtrackassignment
- Repository: https://github.com/godwin-akakpo/planbnetworkdevtrackassignment

## Overview

BSOS is a Liquid testnet cross-border settlement proof of concept. A sender initiates a transfer in the dashboard; the API assembles and screens Travel Rule data, builds and broadcasts a confidential transaction, records its transaction and blinding details, and simulates partner delivery. Users can review compliance records, while regulators can retrieve protected audit data to verify the declared amount. The graph also includes wallet access and the documented API surface. Links for unsampled routes and UI panels rely on the README and SOURCE INDEX; implementation details beyond the excerpts are not asserted.

Main entry points: [`client/src/hooks/useApi.ts`](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/hooks/useApi.ts) (Typed API client), [`src/api/server.ts`](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/server.ts) (Express API), [`src/api/routes/transfer.ts`](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/routes/transfer.ts) (Transfer endpoint), [`client/src/App.tsx`](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/App.tsx) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_dashboard["Settlement dashboard"]
  node_dashboard_app["Dashboard<br/>[App.tsx]"]
  node_wallet_panel["Wallet panel<br/>[WalletPanel.tsx]"]
  node_transfer_panel["Transfer panel<br/>[TransferPanel.tsx]"]
  node_compliance_panel["Compliance panel"]
  node_audit_panel["Audit panel<br/>[AuditPanel.tsx]"]
  node_api_client["Typed API client<br/>[useApi.ts]"]
end

subgraph group_api["API and access"]
  node_api_server["Express API<br/>[server.ts]"]
  node_wallet_route["Wallet endpoint<br/>[wallet.ts]"]
  node_transfer_route["Transfer endpoint<br/>[transfer.ts]"]
  node_compliance_route["Compliance endpoints<br/>[compliance.ts]"]
  node_swagger["OpenAPI specification<br/>[swagger.ts]"]
end

subgraph group_compliance["Compliance lifecycle"]
  node_ivms["IVMS101 builder<br/>[ivms101.ts]"]
  node_travel_rule["Screening and delivery<br/>[travelRule.ts]"]
  node_record_store[("Compliance record store<br/>[store.ts]")]
end

subgraph group_liquid["Liquid settlement"]
  node_wallet_keys["Wallet generation<br/>[wallet.ts]"]
  node_ct_transaction["Confidential transaction<br/>[transaction.ts]"]
  node_esplora["Esplora client<br/>[esplora.ts]"]
end

subgraph group_audit["Audit and verification"]
  node_audit_route["Regulator audit endpoint<br/>[audit.ts]"]
end

node_sender(("Sender"))
node_regulator(("Regulator"))
node_partner(("Corridor partner"))
node_liquid_network(("Liquid testnet"))

node_sender -->|"uses"| node_dashboard_app
node_dashboard_app -->|"renders"| node_wallet_panel
node_dashboard_app -->|"renders"| node_transfer_panel
node_dashboard_app -->|"renders"| node_compliance_panel
node_dashboard_app -->|"renders"| node_audit_panel
node_wallet_panel -->|"calls"| node_api_client
node_transfer_panel -->|"calls"| node_api_client
node_compliance_panel -->|"calls"| node_api_client
node_audit_panel -->|"calls"| node_api_client
node_api_client -->|"requests"| node_wallet_route
node_api_client -->|"requests"| node_transfer_route
node_api_client -->|"requests"| node_compliance_route
node_api_client -->|"requests"| node_audit_route
node_api_server -->|"mounts"| node_wallet_route
node_api_server -->|"mounts"| node_transfer_route
node_api_server -->|"mounts"| node_compliance_route
node_api_server -->|"mounts"| node_audit_route
node_api_server -->|"serves"| node_swagger
node_transfer_route -->|"builds payload"| node_ivms
node_transfer_route -->|"screens and delivers"| node_travel_rule
node_travel_rule -->|"updates records"| node_record_store
node_travel_rule -->|"validates"| node_ivms
node_transfer_route -->|"broadcasts"| node_ct_transaction
node_transfer_route -->|"links transaction"| node_record_store
node_api_server -->|"initializes"| node_wallet_keys
node_ct_transaction -->|"fetches and broadcasts"| node_esplora
node_esplora -->|"queries"| node_liquid_network
node_partner -.->|"receives payload"| node_travel_rule
node_regulator -->|"requests audit"| node_audit_route
node_audit_route -->|"looks up record"| node_record_store
node_audit_route -->|"checks status"| node_esplora
node_compliance_route -->|"reads records"| node_record_store

click node_dashboard_app "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/App.tsx"
click node_wallet_panel "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/components/WalletPanel.tsx"
click node_transfer_panel "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/components/TransferPanel.tsx"
click node_compliance_panel "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/components/CompliancePanel.tsx"
click node_audit_panel "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/components/AuditPanel.tsx"
click node_api_client "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/hooks/useApi.ts"
click node_api_server "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/server.ts"
click node_wallet_route "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/routes/wallet.ts"
click node_transfer_route "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/routes/transfer.ts"
click node_compliance_route "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/routes/compliance.ts"
click node_swagger "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/swagger.ts"
click node_ivms "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/compliance/ivms101.ts"
click node_travel_rule "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/compliance/travelRule.ts"
click node_record_store "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/compliance/store.ts"
click node_wallet_keys "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/chain/wallet.ts"
click node_ct_transaction "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/chain/transaction.ts"
click node_esplora "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/chain/esplora.ts"
click node_audit_route "https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/routes/audit.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_dashboard_app,node_wallet_panel,node_transfer_panel,node_compliance_panel,node_audit_panel,node_api_client toneBlue
class node_api_server,node_wallet_route,node_transfer_route,node_compliance_route,node_swagger toneAmber
class node_ivms,node_travel_rule,node_record_store toneMint
class node_wallet_keys,node_ct_transaction,node_esplora toneRose
class node_audit_route,node_sender,node_regulator,node_partner,node_liquid_network toneIndigo
```

## Components

### Settlement dashboard

- [Dashboard](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/App.tsx): `client/src/App.tsx`
- [Wallet panel](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/components/WalletPanel.tsx): `client/src/components/WalletPanel.tsx`
- [Transfer panel](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/components/TransferPanel.tsx): `client/src/components/TransferPanel.tsx`
- [Compliance panel](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/components/CompliancePanel.tsx): `client/src/components/CompliancePanel.tsx`
- [Audit panel](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/components/AuditPanel.tsx): `client/src/components/AuditPanel.tsx`
- [Typed API client](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/client/src/hooks/useApi.ts): `client/src/hooks/useApi.ts`

### API and access

- [Express API](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/server.ts): `src/api/server.ts`
- [Wallet endpoint](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/routes/wallet.ts): `src/api/routes/wallet.ts`
- [Transfer endpoint](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/routes/transfer.ts): `src/api/routes/transfer.ts`
- [Compliance endpoints](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/routes/compliance.ts): `src/api/routes/compliance.ts`
- [OpenAPI specification](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/swagger.ts): `src/api/swagger.ts`

### Compliance lifecycle

- [IVMS101 builder](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/compliance/ivms101.ts): `src/compliance/ivms101.ts`
- [Screening and delivery](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/compliance/travelRule.ts): `src/compliance/travelRule.ts`
- [Compliance record store](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/compliance/store.ts): `src/compliance/store.ts`

### Liquid settlement

- [Wallet generation](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/chain/wallet.ts): `src/chain/wallet.ts`
- [Confidential transaction](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/chain/transaction.ts): `src/chain/transaction.ts`
- [Esplora client](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/chain/esplora.ts): `src/chain/esplora.ts`

### Audit and verification

- [Regulator audit endpoint](https://github.com/godwin-akakpo/planbnetworkdevtrackassignment/blob/main/src/api/routes/audit.ts): `src/api/routes/audit.ts`

### Other components

- **Sender**
- **Regulator**
- **Corridor partner**
- **Liquid testnet**

## Connections

- Sender → Dashboard: uses (evidence: `README.md`)
- Dashboard → Wallet panel: renders (evidence: `client/src/App.tsx`)
- Dashboard → Transfer panel: renders (evidence: `client/src/App.tsx`)
- Dashboard → Compliance panel: renders (evidence: `client/src/App.tsx`)
- Dashboard → Audit panel: renders (evidence: `client/src/App.tsx`)
- Wallet panel → Typed API client: calls (evidence: `client/src/components/WalletPanel.tsx`)
- Transfer panel → Typed API client: calls (evidence: `client/src/components/TransferPanel.tsx`)
- Compliance panel → Typed API client: calls (evidence: `client/src/components/CompliancePanel.tsx`)
- Audit panel → Typed API client: calls (evidence: `client/src/components/AuditPanel.tsx`)
- Typed API client → Wallet endpoint: requests (evidence: `client/src/hooks/useApi.ts`)
- Typed API client → Transfer endpoint: requests (evidence: `client/src/hooks/useApi.ts`)
- Typed API client → Compliance endpoints: requests (evidence: `client/src/hooks/useApi.ts`)
- Typed API client → Regulator audit endpoint: requests (evidence: `client/src/hooks/useApi.ts`)
- Express API → Wallet endpoint: mounts (evidence: `src/api/server.ts`)
- Express API → Transfer endpoint: mounts (evidence: `src/api/server.ts`)
- Express API → Compliance endpoints: mounts (evidence: `src/api/server.ts`)
- Express API → Regulator audit endpoint: mounts (evidence: `src/api/server.ts`)
- Express API → OpenAPI specification: serves (evidence: `src/api/server.ts`)
- Transfer endpoint → IVMS101 builder: builds payload (evidence: `src/api/routes/transfer.ts`)
- Transfer endpoint → Screening and delivery: screens and delivers (evidence: `src/api/routes/transfer.ts`)
- Screening and delivery → Compliance record store: updates records (evidence: `src/compliance/travelRule.ts`)
- Screening and delivery → IVMS101 builder: validates (evidence: `src/compliance/travelRule.ts`)
- Transfer endpoint → Confidential transaction: broadcasts (evidence: `src/api/routes/transfer.ts`)
- Transfer endpoint → Compliance record store: links transaction (evidence: `src/api/routes/transfer.ts`)
- Express API → Wallet generation: initializes (evidence: `src/api/server.ts`)
- Confidential transaction → Esplora client: fetches and broadcasts (evidence: `src/chain/transaction.ts`)
- Esplora client → Liquid testnet: queries (evidence: `src/chain/esplora.ts`)
- Corridor partner → Screening and delivery: receives payload (evidence: `README.md`)
- Regulator → Regulator audit endpoint: requests audit (evidence: `README.md`)
- Regulator audit endpoint → Compliance record store: looks up record (evidence: `src/api/routes/audit.ts`)
- Regulator audit endpoint → Esplora client: checks status (evidence: `src/api/routes/audit.ts`)
- Compliance endpoints → Compliance record store: reads records (evidence: `src/api/routes/compliance.ts`)
