# anshull14/meshvault_testing architecture

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

- Interactive diagram: https://gitdiagram.com/anshull14/meshvault_testing
- Repository: https://github.com/anshull14/meshvault_testing

## Overview

MeshVault is a LAN-based CLI for splitting secrets into threshold shares, distributing them to peers, and reconstructing a secret from enough returned shares. The primary workflow runs through the CLI coordinators, which invoke the Shamir core and network discovery/transfer layers; transfer uses the secure channel for encrypted exchanges. README statements support the mDNS and cryptographic capability descriptions. Some indexed modules and alternate scripts were not excerpted, so their internals and unshown relationships are not inferred.

Main entry points: [`network/transfer.py`](https://github.com/anshull14/meshvault_testing/blob/main/network/transfer.py) (TCP Transfer), [`cli/split.py`](https://github.com/anshull14/meshvault_testing/blob/main/cli/split.py) (Split Coordinator), [`cli/recover.py`](https://github.com/anshull14/meshvault_testing/blob/main/cli/recover.py) (Recovery Coordinator), [`network/discovery.py`](https://github.com/anshull14/meshvault_testing/blob/main/network/discovery.py) (Peer Discovery)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["CLI Operations"]
  node_entry["CLI Entrypoint<br/>[__main__.py]"]
  node_split["Split Coordinator<br/>[split.py]"]
  node_recover["Recovery Coordinator<br/>[recover.py]"]
end

subgraph group_sharing["Threshold Sharing"]
  node_sss["Shamir Core<br/>[sss.py]"]
end

subgraph group_network["Peer Networking"]
  node_discovery["Peer Discovery<br/>[discovery.py]"]
  node_transfer["TCP Transfer<br/>[transfer.py]"]
  node_concurrent["Concurrent Server<br/>[transfer2.py]"]
end

subgraph group_security["Channel Security"]
  node_channel["Secure Channel<br/>[channel.py]"]
  node_integrity["Integrity Utilities<br/>[integrity.py]"]
  node_sessions["Session Cache<br/>[session_cache.py]"]
end

node_user(("CLI User"))
node_mdns{{"LAN mDNS"}}
node_peers(("LAN Peers"))

node_user -->|"runs commands"| node_entry
node_entry -->|"dispatches split"| node_split
node_entry -->|"dispatches recovery"| node_recover
node_split -->|"splits secret"| node_sss
node_split -->|"finds peers"| node_discovery
node_split -->|"sends shares"| node_transfer
node_recover -->|"advertises service"| node_discovery
node_recover -->|"receives shares"| node_transfer
node_recover -->|"reconstructs secret"| node_sss
node_discovery -->|"browses and advertises"| node_mdns
node_discovery -->|"discovers services"| node_peers
node_transfer -->|"transfers shares"| node_peers
node_transfer -->|"encrypts exchanges"| node_channel
node_concurrent -->|"uses channel"| node_channel
node_concurrent -->|"uses framing"| node_transfer

click node_entry "https://github.com/anshull14/meshvault_testing/blob/main/cli/__main__.py"
click node_split "https://github.com/anshull14/meshvault_testing/blob/main/cli/split.py"
click node_recover "https://github.com/anshull14/meshvault_testing/blob/main/cli/recover.py"
click node_sss "https://github.com/anshull14/meshvault_testing/blob/main/crypto/sss.py"
click node_discovery "https://github.com/anshull14/meshvault_testing/blob/main/network/discovery.py"
click node_transfer "https://github.com/anshull14/meshvault_testing/blob/main/network/transfer.py"
click node_concurrent "https://github.com/anshull14/meshvault_testing/blob/main/network/transfer2.py"
click node_channel "https://github.com/anshull14/meshvault_testing/blob/main/crypto/channel.py"
click node_integrity "https://github.com/anshull14/meshvault_testing/blob/main/crypto/integrity.py"
click node_sessions "https://github.com/anshull14/meshvault_testing/blob/main/crypto/session_cache.py"

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_split,node_recover,node_user toneBlue
class node_sss toneAmber
class node_discovery,node_transfer,node_concurrent toneMint
class node_channel,node_integrity,node_sessions toneRose
class node_mdns,node_peers toneIndigo
```

## Components

### CLI Operations

- [CLI Entrypoint](https://github.com/anshull14/meshvault_testing/blob/main/cli/__main__.py): `cli/__main__.py`
- [Split Coordinator](https://github.com/anshull14/meshvault_testing/blob/main/cli/split.py): `cli/split.py`
- [Recovery Coordinator](https://github.com/anshull14/meshvault_testing/blob/main/cli/recover.py): `cli/recover.py`

### Threshold Sharing

- [Shamir Core](https://github.com/anshull14/meshvault_testing/blob/main/crypto/sss.py): `crypto/sss.py`

### Peer Networking

- [Peer Discovery](https://github.com/anshull14/meshvault_testing/blob/main/network/discovery.py): `network/discovery.py`
- [TCP Transfer](https://github.com/anshull14/meshvault_testing/blob/main/network/transfer.py): `network/transfer.py`
- [Concurrent Server](https://github.com/anshull14/meshvault_testing/blob/main/network/transfer2.py): `network/transfer2.py`

### Channel Security

- [Secure Channel](https://github.com/anshull14/meshvault_testing/blob/main/crypto/channel.py): `crypto/channel.py`
- [Integrity Utilities](https://github.com/anshull14/meshvault_testing/blob/main/crypto/integrity.py): `crypto/integrity.py`
- [Session Cache](https://github.com/anshull14/meshvault_testing/blob/main/crypto/session_cache.py): `crypto/session_cache.py`

### Other components

- **CLI User**
- **LAN mDNS**
- **LAN Peers**

## Connections

- CLI User → CLI Entrypoint: runs commands (evidence: `cli/__main__.py`)
- CLI Entrypoint → Split Coordinator: dispatches split (evidence: `cli/__main__.py`)
- CLI Entrypoint → Recovery Coordinator: dispatches recovery (evidence: `cli/__main__.py`)
- Split Coordinator → Shamir Core: splits secret (evidence: `cli/split.py`)
- Split Coordinator → Peer Discovery: finds peers (evidence: `cli/split.py`)
- Split Coordinator → TCP Transfer: sends shares (evidence: `cli/split.py`)
- Recovery Coordinator → Peer Discovery: advertises service (evidence: `cli/recover.py`)
- Recovery Coordinator → TCP Transfer: receives shares (evidence: `cli/recover.py`)
- Recovery Coordinator → Shamir Core: reconstructs secret (evidence: `cli/recover.py`)
- Peer Discovery → LAN mDNS: browses and advertises (evidence: `network/discovery.py`)
- Peer Discovery → LAN Peers: discovers services (evidence: `README.md`)
- TCP Transfer → LAN Peers: transfers shares (evidence: `README.md`)
- TCP Transfer → Secure Channel: encrypts exchanges (evidence: `network/transfer.py`)
- Concurrent Server → Secure Channel: uses channel (evidence: `network/transfer2.py`)
- Concurrent Server → TCP Transfer: uses framing (evidence: `network/transfer2.py`)
