# dgt-network/dgt-matagami architecture

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

- Interactive diagram: https://gitdiagram.com/dgt-network/dgt-matagami
- Repository: https://github.com/dgt-network/dgt-matagami

## Overview

DGT-Matagami is a distributed blockchain platform for tokenization and privacy, with hierarchical network clusters and two-level consensus. A user submits transactions through the CLI, REST API, or an application; the validator schedules execution by transaction-family processors, records accepted blocks, and coordinates consensus. The graph also preserves documented topology, dashboard, SDK, cryptographic, and token-family capabilities. Source excerpts are partial, so some documented platform links are shown at subsystem level; uncertain implementation-level connections are omitted.

Main entry points: [`CORE/validator/dgt_validator/execution/execution_context.py`](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/execution/execution_context.py) (Transaction execution), [`CORE/consensus/dgt_pbft/pbft_engine/engine.py`](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/consensus/dgt_pbft/pbft_engine/engine.py) (PBFT engine), [`CORE/rest-api/dgt_rest_api/route_handlers.py`](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/rest-api/dgt_rest_api/route_handlers.py) (REST API), [`CORE/validator/dgt_validator/server/core.py`](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/server/core.py) (Validator services)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access and APIs"]
  node_cli["DGT CLI<br/>[main.py]"]
  node_rest["REST API<br/>[route_handlers.py]"]
  node_dashboard["Dashboard<br/>[Main.jsx]"]
  node_bot["Bot API<br/>[bot_handlers.py]"]
end

subgraph group_validator["Validator and Ledger"]
  node_validator_core["Validator services<br/>[core.py]"]
  node_execution["Transaction execution"]
  node_context["State contexts<br/>[context_manager.py]"]
  node_ledger["Block journal<br/>[block_manager.py]"]
  node_block_store[("Block store<br/>[block_store.py]")]
end

subgraph group_consensus["Consensus and Network"]
  node_consensus_proxy["Consensus proxy<br/>[proxy.py]"]
  node_pbft["PBFT engine<br/>[engine.py]"]
  node_pbft_oracle["PBFT oracle<br/>[oracle.py]"]
  node_topology["Cluster topology<br/>[fbft_topology.py]"]
end

subgraph group_families["Transaction Families"]
  node_bgt["BGT processor<br/>[handler.py]"]
  node_settings["Settings processor<br/>[handler.py]"]
  node_registry["Validator registry<br/>[handler.py]"]
end

subgraph group_developer["Developer and Security"]
  node_sdk_processor["Processor SDK<br/>[core.py]"]
  node_sdk_consensus["Consensus SDK<br/>[engine.py]"]
  node_signing["Signing and crypto<br/>[__init__.py]"]
end

node_user(("User or app"))

node_user -->|"submits commands"| node_cli
node_user -->|"submits requests"| node_rest
node_user -->|"views network"| node_dashboard
node_user -.->|"uses bot"| node_bot
node_cli -.->|"sends API requests"| node_rest
node_rest -->|"forwards client requests"| node_validator_core
node_dashboard -.->|"requests blockchain data"| node_rest
node_bot -.->|"accesses platform"| node_rest
node_validator_core -->|"dispatches execution"| node_execution
node_execution -->|"reads and writes state"| node_context
node_execution -->|"uses processor interface"| node_sdk_processor
node_execution -->|"runs family logic"| node_bgt
node_execution -.->|"runs family logic"| node_settings
node_execution -.->|"runs family logic"| node_registry
node_validator_core -->|"manages blocks"| node_ledger
node_ledger -.->|"persists blocks"| node_block_store
node_ledger -->|"coordinates consensus"| node_consensus_proxy
node_consensus_proxy -.->|"dispatches engine"| node_pbft
node_pbft -->|"queries consensus state"| node_pbft_oracle
node_pbft -->|"uses cluster topology"| node_topology
node_pbft -->|"implements engine contract"| node_sdk_consensus
node_pbft -->|"finalizes blocks"| node_user
node_topology -->|"organizes clusters"| node_user
node_signing -.->|"signs transactions"| node_cli
node_user -->|"uses cryptographic keys"| node_signing

click node_cli "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/cli/dgt_cli/main.py"
click node_rest "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/rest-api/dgt_rest_api/route_handlers.py"
click node_dashboard "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/dashboard/dgt/front/components/Main.jsx"
click node_bot "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/telebot/bgt_bot_api/bot_handlers.py"
click node_validator_core "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/server/core.py"
click node_execution "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/execution/execution_context.py"
click node_context "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/execution/context_manager.py"
click node_ledger "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/journal/block_manager.py"
click node_block_store "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/journal/block_store.py"
click node_consensus_proxy "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/consensus/proxy.py"
click node_pbft "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/consensus/dgt_pbft/pbft_engine/engine.py"
click node_pbft_oracle "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/consensus/dgt_pbft/pbft_engine/oracle.py"
click node_topology "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/gossip/fbft_topology.py"
click node_bgt "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/families/bgt_python/dgt_bgt/processor/handler.py"
click node_settings "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/families/settings/dgt_settings/processor/handler.py"
click node_registry "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/families/dgt_validator_registry/validator_registry/processor/handler.py"
click node_sdk_processor "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/sdk/python/dgt_sdk/processor/core.py"
click node_sdk_consensus "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/sdk/python/dgt_sdk/consensus/engine.py"
click node_signing "https://github.com/dgt-network/dgt-matagami/blob/master/CORE/signing/dgt_signing/__init__.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_cli,node_rest,node_dashboard,node_bot,node_user toneBlue
class node_validator_core,node_execution,node_context,node_ledger,node_block_store toneAmber
class node_consensus_proxy,node_pbft,node_pbft_oracle,node_topology toneMint
class node_bgt,node_settings,node_registry toneRose
class node_sdk_processor,node_sdk_consensus,node_signing toneIndigo
```

## Components

### Access and APIs

- [DGT CLI](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/cli/dgt_cli/main.py): `CORE/cli/dgt_cli/main.py`
- [REST API](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/rest-api/dgt_rest_api/route_handlers.py): `CORE/rest-api/dgt_rest_api/route_handlers.py`
- [Dashboard](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/dashboard/dgt/front/components/Main.jsx): `CORE/dashboard/dgt/front/components/Main.jsx`
- [Bot API](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/telebot/bgt_bot_api/bot_handlers.py): `CORE/telebot/bgt_bot_api/bot_handlers.py`

### Validator and Ledger

- [Validator services](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/server/core.py): `CORE/validator/dgt_validator/server/core.py`
- [Transaction execution](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/execution/execution_context.py): `CORE/validator/dgt_validator/execution/execution_context.py`
- [State contexts](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/execution/context_manager.py): `CORE/validator/dgt_validator/execution/context_manager.py`
- [Block journal](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/journal/block_manager.py): `CORE/validator/dgt_validator/journal/block_manager.py`
- [Block store](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/journal/block_store.py): `CORE/validator/dgt_validator/journal/block_store.py`

### Consensus and Network

- [Consensus proxy](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/consensus/proxy.py): `CORE/validator/dgt_validator/consensus/proxy.py`
- [PBFT engine](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/consensus/dgt_pbft/pbft_engine/engine.py): `CORE/consensus/dgt_pbft/pbft_engine/engine.py`
- [PBFT oracle](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/consensus/dgt_pbft/pbft_engine/oracle.py): `CORE/consensus/dgt_pbft/pbft_engine/oracle.py`
- [Cluster topology](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/validator/dgt_validator/gossip/fbft_topology.py): `CORE/validator/dgt_validator/gossip/fbft_topology.py`

### Transaction Families

- [BGT processor](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/families/bgt_python/dgt_bgt/processor/handler.py): `CORE/families/bgt_python/dgt_bgt/processor/handler.py`
- [Settings processor](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/families/settings/dgt_settings/processor/handler.py): `CORE/families/settings/dgt_settings/processor/handler.py`
- [Validator registry](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/families/dgt_validator_registry/validator_registry/processor/handler.py): `CORE/families/dgt_validator_registry/validator_registry/processor/handler.py`

### Developer and Security

- [Processor SDK](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/sdk/python/dgt_sdk/processor/core.py): `CORE/sdk/python/dgt_sdk/processor/core.py`
- [Consensus SDK](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/sdk/python/dgt_sdk/consensus/engine.py): `CORE/sdk/python/dgt_sdk/consensus/engine.py`
- [Signing and crypto](https://github.com/dgt-network/dgt-matagami/blob/master/CORE/signing/dgt_signing/__init__.py): `CORE/signing/dgt_signing/__init__.py`

### Other components

- **User or app**

## Connections

- User or app → DGT CLI: submits commands (evidence: `CORE/cli/dgt_cli/main.py`)
- User or app → REST API: submits requests
- User or app → Dashboard: views network (evidence: `CORE/dashboard/dgt/front/components/Main.jsx`)
- User or app → Bot API: uses bot
- DGT CLI → REST API: sends API requests
- REST API → Validator services: forwards client requests
- Dashboard → REST API: requests blockchain data
- Bot API → REST API: accesses platform
- Validator services → Transaction execution: dispatches execution
- Transaction execution → State contexts: reads and writes state (evidence: `CORE/validator/dgt_validator/execution/context_manager.py`)
- Transaction execution → Processor SDK: uses processor interface
- Transaction execution → BGT processor: runs family logic
- Transaction execution → Settings processor: runs family logic
- Transaction execution → Validator registry: runs family logic
- Validator services → Block journal: manages blocks
- Block journal → Block store: persists blocks
- Block journal → Consensus proxy: coordinates consensus (evidence: `CORE/validator/dgt_validator/journal/block_manager.py`)
- Consensus proxy → PBFT engine: dispatches engine
- PBFT engine → PBFT oracle: queries consensus state (evidence: `CORE/consensus/dgt_pbft/pbft_engine/engine.py`)
- PBFT engine → Cluster topology: uses cluster topology (evidence: `CORE/consensus/dgt_pbft/pbft_engine/engine.py`)
- PBFT engine → Consensus SDK: implements engine contract (evidence: `CORE/consensus/dgt_pbft/pbft_engine/engine.py`)
- PBFT engine → User or app: finalizes blocks
- Cluster topology → User or app: organizes clusters
- Signing and crypto → DGT CLI: signs transactions
- User or app → Signing and crypto: uses cryptographic keys
