# pragmaticalabs/pragmatica architecture

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

- Interactive diagram: https://gitdiagram.com/pragmaticalabs/pragmatica
- Repository: https://github.com/pragmaticalabs/pragmatica

## Overview

Pragmatica is a Java backend monorepo: functional core and integrations underpin slice-based runtimes, with Aether providing clustered deployment and Terra providing single-JVM execution. The documented Aether path is to compose/deploy slices, manage cluster state and topology, then invoke services; Ember and Forge support local development and simulation. The graph keeps those product branches distinct. Source excerpts are sparse outside core and selected Aether modules, so edges there rely on README statements or explicit source-index references; unsampled wiring is omitted.

Main entry points: [`aether/node/src/main/java/org/pragmatica/aether/node`](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/node/src/main/java/org/pragmatica/aether/node) (Aether node runtime), [`integrations`](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/integrations) (Integration libraries), [`aether/slice-api/src/main/java/org/pragmatica/aether/slice`](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/slice-api/src/main/java/org/pragmatica/aether/slice) (Application slices), [`aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment`](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment) (Cluster deployment)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Application runtimes"]
  node_slices["Application slices"]
  node_terra["Terra runtime"]
end

subgraph group_aether["Aether operations"]
  node_aether_node["Aether node runtime"]
  node_config["Runtime configuration"]
  node_deployment["Cluster deployment"]
  node_control["Scaling control"]
  node_invoke["Slice invocation"]
  node_schema["Schema orchestration"]
  node_cluster_state["Cluster state keys<br/>[AetherKey.java]"]
  node_cluster_values["Cluster state values<br/>[AetherValue.java]"]
end

subgraph group_foundation["Core and integrations"]
  node_core["Functional primitives"]
  node_consensus["Consensus protocol<br/>[RabiaEngine.java]"]
  node_kvstore[("Consensus KV store<br/>[KVStore.java]")]
  node_storage[("Tiered storage")]
  node_append_log[("Append log<br/>[AppendLog.java]")]
  node_dht[("Distributed storage")]
  node_integrations["Integration libraries"]
end

subgraph group_devtools["Development tools"]
  node_ember["Ember dev cluster"]
  node_forge["Forge simulator"]
  node_cli["Aether CLI<br/>[AetherCli.java]"]
  node_jbct["JBCT tools"]
end

node_developer(("Developer"))

node_developer -->|"writes"| node_slices
node_slices -->|"deploys to"| node_aether_node
node_slices -->|"runs on"| node_terra
node_aether_node -.->|"uses settings"| node_config
node_aether_node -.->|"manages cluster"| node_deployment
node_aether_node -.->|"runs slices"| node_invoke
node_deployment -.->|"coordinates scaling"| node_control
node_deployment -->|"orchestrates schemas"| node_schema
node_schema -->|"uses keys"| node_cluster_state
node_schema -->|"uses values"| node_cluster_values
node_developer -->|"develops with"| node_ember
node_ember -->|"simulates with"| node_forge
node_developer -.->|"operates"| node_cli
node_developer -->|"formats and lints"| node_jbct
node_integrations -->|"includes"| node_consensus
node_integrations -->|"includes"| node_dht
node_integrations -->|"includes"| node_storage
node_storage -->|"uses"| node_append_log
node_consensus -.->|"supports state"| node_kvstore
node_core -->|"underpins"| node_integrations

click node_slices "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/slice-api/src/main/java/org/pragmatica/aether/slice"
click node_terra "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/terra"
click node_aether_node "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/node/src/main/java/org/pragmatica/aether/node"
click node_config "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/aether-config/src/main/java/org/pragmatica/aether/config"
click node_deployment "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment"
click node_control "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/aether-control/src/main/java/org/pragmatica/aether/controller"
click node_invoke "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/aether-invoke/src/main/java/org/pragmatica/aether"
click node_schema "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment/schema/SchemaOrchestratorService.java"
click node_cluster_state "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/slice/src/main/java/org/pragmatica/aether/slice/kvstore/AetherKey.java"
click node_cluster_values "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/slice/src/main/java/org/pragmatica/aether/slice/kvstore/AetherValue.java"
click node_ember "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/ember/src/main/java/org/pragmatica/aether/ember/EngineSelector.java"
click node_forge "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/forge"
click node_cli "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/cli/src/main/java/org/pragmatica/aether/cli/AetherCli.java"
click node_core "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/core/src/main/java/org/pragmatica/lang"
click node_consensus "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/consensus/src/main/java/org/pragmatica/consensus/rabia/RabiaEngine.java"
click node_kvstore "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/cluster/src/main/java/org/pragmatica/cluster/state/kvstore/KVStore.java"
click node_storage "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/storage/src/main/java/org/pragmatica/storage/StorageInstance.java"
click node_append_log "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/storage/src/main/java/org/pragmatica/storage/AppendLog.java"
click node_dht "https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/dht/src/main/java/org/pragmatica/dht/storage/MemoryStorageEngine.java"
click node_integrations "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/integrations"
click node_jbct "https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/jbct"

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_slices,node_terra toneBlue
class node_aether_node,node_config,node_deployment,node_control,node_invoke,node_schema,node_cluster_state,node_cluster_values toneAmber
class node_core,node_consensus,node_kvstore,node_storage,node_append_log,node_dht,node_integrations toneMint
class node_ember,node_forge,node_cli,node_jbct toneRose
class node_developer toneIndigo
```

## Components

### Application runtimes

- [Application slices](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/slice-api/src/main/java/org/pragmatica/aether/slice): `aether/slice-api/src/main/java/org/pragmatica/aether/slice`
- [Terra runtime](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/terra): `terra`

### Aether operations

- [Aether node runtime](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/node/src/main/java/org/pragmatica/aether/node): `aether/node/src/main/java/org/pragmatica/aether/node`
- [Runtime configuration](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/aether-config/src/main/java/org/pragmatica/aether/config): `aether/aether-config/src/main/java/org/pragmatica/aether/config`
- [Cluster deployment](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment): `aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment`
- [Scaling control](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/aether-control/src/main/java/org/pragmatica/aether/controller): `aether/aether-control/src/main/java/org/pragmatica/aether/controller`
- [Slice invocation](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/aether-invoke/src/main/java/org/pragmatica/aether): `aether/aether-invoke/src/main/java/org/pragmatica/aether`
- [Schema orchestration](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment/schema/SchemaOrchestratorService.java): `aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment/schema/SchemaOrchestratorService.java`
- [Cluster state keys](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/slice/src/main/java/org/pragmatica/aether/slice/kvstore/AetherKey.java): `aether/slice/src/main/java/org/pragmatica/aether/slice/kvstore/AetherKey.java`
- [Cluster state values](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/slice/src/main/java/org/pragmatica/aether/slice/kvstore/AetherValue.java): `aether/slice/src/main/java/org/pragmatica/aether/slice/kvstore/AetherValue.java`

### Core and integrations

- [Functional primitives](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/core/src/main/java/org/pragmatica/lang): `core/src/main/java/org/pragmatica/lang`
- [Consensus protocol](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/consensus/src/main/java/org/pragmatica/consensus/rabia/RabiaEngine.java): `integrations/consensus/src/main/java/org/pragmatica/consensus/rabia/RabiaEngine.java`
- [Consensus KV store](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/cluster/src/main/java/org/pragmatica/cluster/state/kvstore/KVStore.java): `integrations/cluster/src/main/java/org/pragmatica/cluster/state/kvstore/KVStore.java`
- [Tiered storage](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/storage/src/main/java/org/pragmatica/storage/StorageInstance.java): `integrations/storage/src/main/java/org/pragmatica/storage/StorageInstance.java`
- [Append log](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/storage/src/main/java/org/pragmatica/storage/AppendLog.java): `integrations/storage/src/main/java/org/pragmatica/storage/AppendLog.java`
- [Distributed storage](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/integrations/dht/src/main/java/org/pragmatica/dht/storage/MemoryStorageEngine.java): `integrations/dht/src/main/java/org/pragmatica/dht/storage/MemoryStorageEngine.java`
- [Integration libraries](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/integrations): `integrations`

### Development tools

- [Ember dev cluster](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/ember/src/main/java/org/pragmatica/aether/ember/EngineSelector.java): `aether/ember/src/main/java/org/pragmatica/aether/ember/EngineSelector.java`
- [Forge simulator](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/aether/forge): `aether/forge`
- [Aether CLI](https://github.com/pragmaticalabs/pragmatica/blob/release-1.0.0-rc6/aether/cli/src/main/java/org/pragmatica/aether/cli/AetherCli.java): `aether/cli/src/main/java/org/pragmatica/aether/cli/AetherCli.java`
- [JBCT tools](https://github.com/pragmaticalabs/pragmatica/tree/release-1.0.0-rc6/jbct): `jbct`

### Other components

- **Developer**

## Connections

- Developer → Application slices: writes (evidence: `README.md`)
- Application slices → Aether node runtime: deploys to (evidence: `README.md`)
- Application slices → Terra runtime: runs on (evidence: `README.md`)
- Aether node runtime → Runtime configuration: uses settings (evidence: `aether/node/src/main/java/org/pragmatica/aether/node/StorageFactory.java`)
- Aether node runtime → Cluster deployment: manages cluster (evidence: `aether/node/src/main/java/org/pragmatica/aether/node/backup/KvBackupService.java`)
- Aether node runtime → Slice invocation: runs slices
- Cluster deployment → Scaling control: coordinates scaling (evidence: `aether/aether-control/src/main/java/org/pragmatica/aether/controller/RollbackManager.java`)
- Cluster deployment → Schema orchestration: orchestrates schemas (evidence: `aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment/schema/SchemaOrchestratorService.java`)
- Schema orchestration → Cluster state keys: uses keys (evidence: `aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment/schema/SchemaOrchestratorService.java`)
- Schema orchestration → Cluster state values: uses values (evidence: `aether/aether-deployment/src/main/java/org/pragmatica/aether/deployment/schema/SchemaOrchestratorService.java`)
- Developer → Ember dev cluster: develops with (evidence: `README.md`)
- Ember dev cluster → Forge simulator: simulates with (evidence: `README.md`)
- Developer → Aether CLI: operates
- Developer → JBCT tools: formats and lints (evidence: `README.md`)
- Integration libraries → Consensus protocol: includes (evidence: `README.md`)
- Integration libraries → Distributed storage: includes (evidence: `README.md`)
- Integration libraries → Tiered storage: includes (evidence: `README.md`)
- Tiered storage → Append log: uses (evidence: `integrations/storage/src/main/java/org/pragmatica/storage/StorageInstance.java`)
- Consensus protocol → Consensus KV store: supports state
- Functional primitives → Integration libraries: underpins (evidence: `README.md`)
