# pratikshakalbhor/devconv-ps3-swarm-steward-succession architecture

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

- Interactive diagram: https://gitdiagram.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession
- Repository: https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession

## Overview

This is a Swarm-backed manuscript catalogue designed to remain readable across steward succession, with payment, publishing, and governance authority separated. The principal workflow publishes catalogue content, records and verifies a steward hand-off, then lets readers resolve the current catalogue from a stable seed or governed root. The graph also includes storage renewal, attestations, and supporting protocol layers. Relationships are limited to README claims and source-index references; unsampled command internals are not inferred.

Main entry points: [`src/lib/ops.ts`](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/ops.ts) (Swarm operations), [`src/lib/succession.ts`](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/succession.ts) (Succession protocol), [`src/lib/store.ts`](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/store.ts) (Local artifacts), [`src/lib/bee-client.ts`](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/bee-client.ts) (Bee client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commands["User workflows"]
  node_init["Initialize<br/>[init.ts]"]
  node_publish["Publish catalogue<br/>[publish.ts]"]
  node_handoff["Hand off steward<br/>[handoff.ts]"]
  node_govern["Govern publisher<br/>[govern.ts]"]
  node_read["Resolve catalogue<br/>[read.ts]"]
  node_verify["Verify evidence<br/>[verify.ts]"]
  node_renew["Renew storage<br/>[renew.ts]"]
  node_extend["Extend storage<br/>[extend.ts]"]
  node_attest["Attest content<br/>[attest.ts]"]
  node_doctor["Check node<br/>[doctor.ts]"]
end

subgraph group_protocol["Succession and governance"]
  node_succession["Succession protocol<br/>[succession.ts]"]
  node_governance["Governance protocol<br/>[governance.ts]"]
  node_documents["Protocol documents<br/>[document.ts]"]
  node_schemas["Protocol schemas<br/>[schema.ts]"]
  node_catalogue["Catalogue content"]
end

subgraph group_swarm["Swarm storage"]
  node_bee["Bee client<br/>[bee-client.ts]"]
  node_operations["Swarm operations<br/>[ops.ts]"]
  node_batch[("Postage batch<br/>[batch.ts]")]
  node_store[("Local artifacts<br/>[store.ts]")]
end

subgraph group_foundation["Identity and evidence"]
  node_keys["Signing keys<br/>[keys.ts]"]
  node_evidence["Evidence signing<br/>[evidence.ts]"]
  node_config["Configuration<br/>[config.ts]"]
  node_cli["CLI utilities<br/>[cli-util.ts]"]
  node_refs["Reference helpers<br/>[refs.ts]"]
  node_topics["Feed topics<br/>[topics.ts]"]
end

node_operator(("Operator"))
node_reader(("Reader"))
node_treasurer(("Treasurer"))
node_bee_service[("Swarm Bee")]
node_gateway["Public gateway"]

node_operator -->|"initializes"| node_init
node_operator -->|"publishes"| node_publish
node_operator -->|"hands off"| node_handoff
node_operator -->|"approves update"| node_govern
node_reader -->|"resolves"| node_read
node_reader -->|"checks record"| node_verify
node_treasurer -->|"funds batch"| node_batch
node_init -->|"creates client"| node_bee
node_init -->|"publishes genesis"| node_operations
node_init -->|"builds files"| node_catalogue
node_publish -->|"publishes content"| node_operations
node_publish -->|"builds files"| node_catalogue
node_handoff -->|"records handoff"| node_operations
node_handoff -->|"uses protocol"| node_succession
node_govern -->|"publishes catalogue"| node_operations
node_govern -->|"updates root"| node_governance
node_govern -->|"builds files"| node_catalogue
node_read -->|"resolves chain"| node_succession
node_verify -->|"checks signatures"| node_evidence
node_verify -->|"loads artifacts"| node_store
node_renew -->|"extends batch"| node_operations
node_extend -->|"extends batch"| node_operations
node_attest -->|"publishes proof"| node_evidence
node_doctor -->|"probes node"| node_bee
node_operations -->|"checks batch"| node_batch
node_operations -->|"reads and writes feeds"| node_succession
node_succession -->|"parses documents"| node_documents
node_succession -->|"reads and writes feeds"| node_bee
node_governance -->|"resolves publisher"| node_succession
node_governance -->|"checks approvals"| node_evidence
node_bee -->|"connects"| node_bee_service
node_bee -->|"uploads bytes"| node_gateway
node_evidence -->|"signs and recovers"| node_keys
node_config -->|"derives identities"| node_keys
node_store -->|"types artifacts"| node_schemas
node_topics -->|"defines feed topics"| node_succession
node_operations -->|"publishes proof"| node_evidence
node_handoff -->|"saves evidence"| node_store
node_publish -->|"saves artifacts"| node_store
node_renew -->|"saves evidence"| node_store
node_attest -->|"reads artifacts"| node_store

click node_init "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/init.ts"
click node_publish "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/publish.ts"
click node_handoff "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/handoff.ts"
click node_govern "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/govern.ts"
click node_read "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/read.ts"
click node_verify "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/verify.ts"
click node_renew "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/renew.ts"
click node_extend "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/extend.ts"
click node_attest "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/attest.ts"
click node_doctor "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/doctor.ts"
click node_succession "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/succession.ts"
click node_governance "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/governance.ts"
click node_documents "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/document.ts"
click node_schemas "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/schema.ts"
click node_catalogue "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/catalogue-content.ts"
click node_bee "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/bee-client.ts"
click node_operations "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/ops.ts"
click node_batch "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/batch.ts"
click node_store "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/store.ts"
click node_keys "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/keys.ts"
click node_evidence "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/evidence.ts"
click node_config "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/config.ts"
click node_cli "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/cli-util.ts"
click node_refs "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/refs.ts"
click node_topics "https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/topics.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_init,node_publish,node_handoff,node_govern,node_read,node_verify,node_renew,node_extend,node_attest,node_doctor toneBlue
class node_succession,node_governance,node_documents,node_schemas,node_catalogue,node_bee_service toneAmber
class node_bee,node_operations,node_batch,node_store toneMint
class node_keys,node_evidence,node_config,node_cli,node_refs,node_topics toneRose
class node_operator,node_reader,node_treasurer,node_gateway toneIndigo
```

## Components

### User workflows

- [Initialize](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/init.ts): `src/init.ts`
- [Publish catalogue](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/publish.ts): `src/publish.ts`
- [Hand off steward](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/handoff.ts): `src/handoff.ts`
- [Govern publisher](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/govern.ts): `src/govern.ts`
- [Resolve catalogue](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/read.ts): `src/read.ts`
- [Verify evidence](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/verify.ts): `src/verify.ts`
- [Renew storage](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/renew.ts): `src/renew.ts`
- [Extend storage](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/extend.ts): `src/extend.ts`
- [Attest content](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/attest.ts): `src/attest.ts`
- [Check node](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/doctor.ts): `src/doctor.ts`

### Succession and governance

- [Succession protocol](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/succession.ts): `src/lib/succession.ts`
- [Governance protocol](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/governance.ts): `src/lib/governance.ts`
- [Protocol documents](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/document.ts): `src/lib/document.ts`
- [Protocol schemas](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/schema.ts): `src/lib/schema.ts`
- [Catalogue content](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/catalogue-content.ts): `src/lib/catalogue-content.ts`

### Swarm storage

- [Bee client](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/bee-client.ts): `src/lib/bee-client.ts`
- [Swarm operations](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/ops.ts): `src/lib/ops.ts`
- [Postage batch](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/batch.ts): `src/lib/batch.ts`
- [Local artifacts](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/store.ts): `src/lib/store.ts`

### Identity and evidence

- [Signing keys](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/keys.ts): `src/lib/keys.ts`
- [Evidence signing](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/evidence.ts): `src/lib/evidence.ts`
- [Configuration](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/config.ts): `src/lib/config.ts`
- [CLI utilities](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/cli-util.ts): `src/lib/cli-util.ts`
- [Reference helpers](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/refs.ts): `src/lib/refs.ts`
- [Feed topics](https://github.com/pratikshakalbhor/devconv-ps3-swarm-steward-succession/blob/main/src/lib/topics.ts): `src/lib/topics.ts`

### Other components

- **Operator**
- **Reader**
- **Treasurer**
- **Swarm Bee**
- **Public gateway**

## Connections

- Operator → Initialize: initializes (evidence: `README.md`)
- Operator → Publish catalogue: publishes (evidence: `README.md`)
- Operator → Hand off steward: hands off (evidence: `README.md`)
- Operator → Govern publisher: approves update (evidence: `README.md`)
- Reader → Resolve catalogue: resolves (evidence: `README.md`)
- Reader → Verify evidence: checks record (evidence: `README.md`)
- Treasurer → Postage batch: funds batch (evidence: `README.md`)
- Initialize → Bee client: creates client (evidence: `src/init.ts`)
- Initialize → Swarm operations: publishes genesis (evidence: `src/init.ts`)
- Initialize → Catalogue content: builds files (evidence: `src/init.ts`)
- Publish catalogue → Swarm operations: publishes content (evidence: `src/publish.ts`)
- Publish catalogue → Catalogue content: builds files (evidence: `src/publish.ts`)
- Hand off steward → Swarm operations: records handoff (evidence: `src/handoff.ts`)
- Hand off steward → Succession protocol: uses protocol (evidence: `src/handoff.ts`)
- Govern publisher → Swarm operations: publishes catalogue (evidence: `src/govern.ts`)
- Govern publisher → Governance protocol: updates root (evidence: `src/govern.ts`)
- Govern publisher → Catalogue content: builds files (evidence: `src/govern.ts`)
- Resolve catalogue → Succession protocol: resolves chain (evidence: `src/read.ts`)
- Verify evidence → Evidence signing: checks signatures (evidence: `src/verify.ts`)
- Verify evidence → Local artifacts: loads artifacts (evidence: `src/verify.ts`)
- Renew storage → Swarm operations: extends batch (evidence: `src/renew.ts`)
- Extend storage → Swarm operations: extends batch (evidence: `src/extend.ts`)
- Attest content → Evidence signing: publishes proof (evidence: `src/attest.ts`)
- Check node → Bee client: probes node (evidence: `src/doctor.ts`)
- Swarm operations → Postage batch: checks batch (evidence: `src/lib/ops.ts`)
- Swarm operations → Succession protocol: reads and writes feeds (evidence: `src/lib/ops.ts`)
- Succession protocol → Protocol documents: parses documents (evidence: `src/lib/succession.ts`)
- Succession protocol → Bee client: reads and writes feeds (evidence: `src/lib/succession.ts`)
- Governance protocol → Succession protocol: resolves publisher (evidence: `src/lib/governance.ts`)
- Governance protocol → Evidence signing: checks approvals (evidence: `src/lib/governance.ts`)
- Bee client → Swarm Bee: connects (evidence: `src/lib/bee-client.ts`)
- Bee client → Public gateway: uploads bytes (evidence: `src/lib/bee-client.ts`)
- Evidence signing → Signing keys: signs and recovers (evidence: `src/lib/evidence.ts`)
- Configuration → Signing keys: derives identities (evidence: `src/lib/config.ts`)
- Local artifacts → Protocol schemas: types artifacts (evidence: `src/lib/store.ts`)
- Feed topics → Succession protocol: defines feed topics (evidence: `src/lib/succession.ts`)
- Swarm operations → Evidence signing: publishes proof (evidence: `src/lib/ops.ts`)
- Hand off steward → Local artifacts: saves evidence (evidence: `src/handoff.ts`)
- Publish catalogue → Local artifacts: saves artifacts (evidence: `src/publish.ts`)
- Renew storage → Local artifacts: saves evidence (evidence: `src/renew.ts`)
- Attest content → Local artifacts: reads artifacts (evidence: `src/attest.ts`)
