# hyperledger/fabric-x architecture

> Architecture diagram of the GitHub repository hyperledger/fabric-x, 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/hyperledger/fabric-x
- Repository: https://github.com/hyperledger/fabric-x

## Overview

This repository is the Fabric-X Go project, but the supplied tree is concentrated on command-line tools—especially fxconfig, for managing namespace configuration and transaction lifecycle. Its principal workflow is to invoke a namespace command, pass the request to the application layer, and optionally endorse, submit, or wait for transaction status. The README also describes Fabric-X’s broader orderer and post-ordering architecture; those components are documented as separate projects, not implemented in the supplied tree. Relationships for fxconfig are limited to the supplied excerpts, source index, and README.

Main entry points: [`tools/fxconfig/internal/client/client.go`](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/client/client.go) (gRPC clients), [`tools/fxconfig/internal/app/app.go`](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/app/app.go) (Admin application), [`tools/fxconfig/internal/provider/provider.go`](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/provider/provider.go) (Lazy providers), [`tools/fxconfig/internal/cli/v1/namespace_create.go`](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/cli/v1/namespace_create.go) (Namespace commands)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_fxconfig["Namespace administration"]
  node_fxcli["fxconfig CLI<br/>[root.go]"]
  node_namespacecmd["Namespace commands"]
  node_codec["Transaction codec<br/>[codec.go]"]
end

subgraph group_internals["Application internals"]
  node_adminapp["Admin application<br/>[app.go]"]
  node_config["Configuration<br/>[config.go]"]
  node_providers["Lazy providers<br/>[provider.go]"]
  node_validation["Configuration validation<br/>[validate.go]"]
  node_signer["MSP signer<br/>[signer.go]"]
  node_transactions["Transaction operations"]
  node_grpcclients["gRPC clients<br/>[client.go]"]
  node_ordererclient["Orderer client<br/>[orderer.go]"]
  node_queryclient["Query client<br/>[queries.go]"]
  node_notifyclient["Notification client<br/>[notifications.go]"]
end

subgraph group_fabricx["Fabric-X architecture"]
  node_orderers["Fabric-X orderer"]
  node_committer["Post-ordering committer"]
  node_routers["Orderer routers"]
  node_batchers["Orderer batchers"]
  node_consenters["BFT consenters"]
  node_assemblers["Orderer assemblers"]
end

subgraph group_tooling["Network utilities"]
  node_configtxgen["Channel config tool<br/>[main.go]"]
  node_cryptogen["Identity generator<br/>[main.go]"]
end

node_operator(("Operator"))

node_operator -->|"runs commands"| node_fxcli
node_fxcli -->|"registers commands"| node_namespacecmd
node_namespacecmd -->|"deploys namespace"| node_adminapp
node_adminapp -->|"uses operations"| node_transactions
node_adminapp -->|"validates requests"| node_validation
node_adminapp -.->|"gets services"| node_providers
node_providers -->|"validates config"| node_validation
node_providers -->|"creates identity"| node_signer
node_providers -->|"creates clients"| node_grpcclients
node_grpcclients -->|"uses endpoints"| node_config
node_grpcclients -.->|"provides client"| node_ordererclient
node_grpcclients -.->|"provides client"| node_queryclient
node_grpcclients -.->|"provides client"| node_notifyclient
node_namespacecmd -->|"encodes transaction"| node_codec
node_operator -->|"generates config"| node_configtxgen
node_operator -->|"generates identities"| node_cryptogen
node_orderers -->|"includes"| node_routers
node_orderers -->|"includes"| node_batchers
node_orderers -->|"includes"| node_consenters
node_orderers -->|"includes"| node_assemblers
node_routers -->|"dispatches transactions"| node_batchers
node_batchers -->|"sends digests"| node_consenters
node_assemblers -->|"pulls batches"| node_batchers
node_consenters -->|"orders attestations"| node_assemblers
node_orderers -->|"orders blocks for"| node_committer
node_operator -->|"submits transactions"| node_orderers

click node_fxcli "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/cli/v1/root.go"
click node_namespacecmd "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/cli/v1/namespace_create.go"
click node_adminapp "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/app/app.go"
click node_config "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/config/config.go"
click node_providers "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/provider/provider.go"
click node_validation "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/config/validate.go"
click node_signer "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/msp/signer.go"
click node_transactions "https://github.com/hyperledger/fabric-x/tree/main/tools/fxconfig/internal/transaction"
click node_grpcclients "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/client/client.go"
click node_ordererclient "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/client/orderer.go"
click node_queryclient "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/client/queries.go"
click node_notifyclient "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/client/notifications.go"
click node_codec "https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/cli/v1/cliio/codec.go"
click node_configtxgen "https://github.com/hyperledger/fabric-x/blob/main/tools/configtxgen/main.go"
click node_cryptogen "https://github.com/hyperledger/fabric-x/blob/main/tools/cryptogen/main.go"

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_fxcli,node_namespacecmd,node_codec toneBlue
class node_adminapp,node_config,node_providers,node_validation,node_signer,node_transactions,node_grpcclients,node_ordererclient,node_queryclient,node_notifyclient toneAmber
class node_orderers,node_committer,node_routers,node_batchers,node_consenters,node_assemblers toneMint
class node_configtxgen,node_cryptogen toneRose
class node_operator toneIndigo
```

## Components

### Namespace administration

- [fxconfig CLI](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/cli/v1/root.go): `tools/fxconfig/internal/cli/v1/root.go`
- [Namespace commands](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/cli/v1/namespace_create.go): `tools/fxconfig/internal/cli/v1/namespace_create.go`
- [Transaction codec](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/cli/v1/cliio/codec.go): `tools/fxconfig/internal/cli/v1/cliio/codec.go`

### Application internals

- [Admin application](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/app/app.go): `tools/fxconfig/internal/app/app.go`
- [Configuration](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/config/config.go): `tools/fxconfig/internal/config/config.go`
- [Lazy providers](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/provider/provider.go): `tools/fxconfig/internal/provider/provider.go`
- [Configuration validation](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/config/validate.go): `tools/fxconfig/internal/config/validate.go`
- [MSP signer](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/msp/signer.go): `tools/fxconfig/internal/msp/signer.go`
- [Transaction operations](https://github.com/hyperledger/fabric-x/tree/main/tools/fxconfig/internal/transaction): `tools/fxconfig/internal/transaction`
- [gRPC clients](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/client/client.go): `tools/fxconfig/internal/client/client.go`
- [Orderer client](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/client/orderer.go): `tools/fxconfig/internal/client/orderer.go`
- [Query client](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/client/queries.go): `tools/fxconfig/internal/client/queries.go`
- [Notification client](https://github.com/hyperledger/fabric-x/blob/main/tools/fxconfig/internal/client/notifications.go): `tools/fxconfig/internal/client/notifications.go`

### Fabric-X architecture

- **Fabric-X orderer**
- **Post-ordering committer**
- **Orderer routers**
- **Orderer batchers**
- **BFT consenters**
- **Orderer assemblers**

### Network utilities

- [Channel config tool](https://github.com/hyperledger/fabric-x/blob/main/tools/configtxgen/main.go): `tools/configtxgen/main.go`
- [Identity generator](https://github.com/hyperledger/fabric-x/blob/main/tools/cryptogen/main.go): `tools/cryptogen/main.go`

### Other components

- **Operator**

## Connections

- Operator → fxconfig CLI: runs commands
- fxconfig CLI → Namespace commands: registers commands (evidence: `tools/fxconfig/internal/cli/v1/root.go`)
- Namespace commands → Admin application: deploys namespace (evidence: `tools/fxconfig/internal/cli/v1/namespace_create.go`)
- Admin application → Transaction operations: uses operations
- Admin application → Configuration validation: validates requests
- Admin application → Lazy providers: gets services
- Lazy providers → Configuration validation: validates config (evidence: `tools/fxconfig/internal/provider/provider.go`)
- Lazy providers → MSP signer: creates identity
- Lazy providers → gRPC clients: creates clients
- gRPC clients → Configuration: uses endpoints (evidence: `tools/fxconfig/internal/client/client.go`)
- gRPC clients → Orderer client: provides client
- gRPC clients → Query client: provides client
- gRPC clients → Notification client: provides client
- Namespace commands → Transaction codec: encodes transaction (evidence: `tools/fxconfig/internal/cli/v1/namespace_create.go`)
- Operator → Channel config tool: generates config (evidence: `tools/configtxgen/main.go`)
- Operator → Identity generator: generates identities (evidence: `tools/cryptogen/main.go`)
- Fabric-X orderer → Orderer routers: includes
- Fabric-X orderer → Orderer batchers: includes
- Fabric-X orderer → BFT consenters: includes
- Fabric-X orderer → Orderer assemblers: includes
- Orderer routers → Orderer batchers: dispatches transactions
- Orderer batchers → BFT consenters: sends digests
- Orderer assemblers → Orderer batchers: pulls batches
- BFT consenters → Orderer assemblers: orders attestations
- Fabric-X orderer → Post-ordering committer: orders blocks for
- Operator → Fabric-X orderer: submits transactions
