# rwilliamspbg-ops/mohawk-nexus architecture

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

- Interactive diagram: https://gitdiagram.com/rwilliamspbg-ops/mohawk-nexus
- Repository: https://github.com/rwilliamspbg-ops/mohawk-nexus

## Overview

Mohawk Nexus is an integration workspace for a network stack: its documented core combines a Go control plane, Rust datapath, protocol assets, and a canonical bridge contract. A representative workflow is a client submitting an update to the federated-learning coordinator, which returns persisted round state; the workspace also provides SWIP operations and cross-language SDK logic. The README documents the stack’s components and integration purpose, but the Go, Rust datapath, protocol, and deployment implementations were not sampled, so their internal links are omitted.

Main entry points: [`fl/coordinator.py`](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/coordinator.py) (FL Coordinator), [`fl/client.py`](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/client.py) (FL Client), [`sdk/python/mohawk_sdk/__init__.py`](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/python/mohawk_sdk/__init__.py) (Python SDK Exports), [`SMIP-MWP`](https://github.com/rwilliamspbg-ops/mohawk-nexus/tree/main/SMIP-MWP) (Go Control Plane)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_integration["Stack Integration"]
  node_bridge["Bridge Contract"]
  node_go_control["Go Control Plane"]
  node_rust_datapath["Rust Datapath"]
  node_protocols["Protocol Definitions"]
end

subgraph group_fl["Federated Learning"]
  node_fl_client["FL Client<br/>[client.py]"]
  node_fl_config["FL Config Helpers<br/>[common.py]"]
  node_fl_coordinator["FL Coordinator<br/>[coordinator.py]"]
  node_fl_state[("Round State<br/>[coordinator.py]")]
end

subgraph group_services["Network Services"]
  node_swip["SWIP Service<br/>[service.py]"]
end

subgraph group_sdk["Cross-Language SDK"]
  node_sdk_python_logic["Python SDK Logic<br/>[logic.py]"]
  node_sdk_python_contract["Python SDK Contract<br/>[bridge_contract.py]"]
  node_sdk_python_exports["Python SDK Exports<br/>[__init__.py]"]
  node_sdk_go_logic["Go SDK Logic<br/>[logic.go]"]
  node_sdk_go_contract["Go SDK Contract<br/>[bridge_contract.go]"]
  node_sdk_rust_logic["Rust SDK Logic<br/>[lib.rs]"]
  node_sdk_rust_contract["Rust SDK Contract<br/>[bridge_contract.rs]"]
  node_sdk_ts_logic["TypeScript SDK Logic<br/>[index.js]"]
  node_sdk_ts_contract["TypeScript SDK Contract<br/>[bridgeContract.js]"]
end

node_operator(("Stack Operator"))

node_fl_client -->|"loads config"| node_fl_config
node_fl_client -.->|"requests state"| node_fl_coordinator
node_fl_coordinator -->|"loads config"| node_fl_config
node_fl_coordinator -->|"reads and writes"| node_fl_state
node_operator -.->|"uses stack"| node_go_control
node_operator -.->|"uses stack"| node_rust_datapath
node_go_control -.->|"integrates through"| node_bridge
node_rust_datapath -.->|"integrates through"| node_bridge
node_sdk_python_exports -->|"exports"| node_sdk_python_logic
node_sdk_python_exports -->|"exports"| node_sdk_python_contract
node_sdk_rust_logic -->|"declares module"| node_sdk_rust_contract
node_sdk_ts_logic -->|"imports"| node_sdk_ts_contract

click node_bridge "https://github.com/rwilliamspbg-ops/mohawk-nexus/tree/main/bridge"
click node_go_control "https://github.com/rwilliamspbg-ops/mohawk-nexus/tree/main/SMIP-MWP"
click node_rust_datapath "https://github.com/rwilliamspbg-ops/mohawk-nexus/tree/main/SMIP-MWP-Rust"
click node_protocols "https://github.com/rwilliamspbg-ops/mohawk-nexus/tree/main/Sovereign-Mohawk-Proto"
click node_fl_client "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/client.py"
click node_fl_config "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/common.py"
click node_fl_coordinator "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/coordinator.py"
click node_fl_state "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/coordinator.py"
click node_swip "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/swip/service.py"
click node_sdk_python_logic "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/python/mohawk_sdk/logic.py"
click node_sdk_python_contract "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/python/mohawk_sdk/bridge_contract.py"
click node_sdk_python_exports "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/python/mohawk_sdk/__init__.py"
click node_sdk_go_logic "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/go/mohawksdk/logic.go"
click node_sdk_go_contract "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/go/mohawksdk/bridge_contract.go"
click node_sdk_rust_logic "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/rust/src/lib.rs"
click node_sdk_rust_contract "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/rust/src/bridge_contract.rs"
click node_sdk_ts_logic "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/typescript/src/index.js"
click node_sdk_ts_contract "https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/typescript/src/bridgeContract.js"

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_bridge,node_go_control,node_rust_datapath,node_protocols toneBlue
class node_fl_client,node_fl_config,node_fl_coordinator,node_fl_state toneAmber
class node_swip toneMint
class node_sdk_python_logic,node_sdk_python_contract,node_sdk_python_exports,node_sdk_go_logic,node_sdk_go_contract,node_sdk_rust_logic,node_sdk_rust_contract,node_sdk_ts_logic,node_sdk_ts_contract toneRose
class node_operator toneIndigo
```

## Components

### Stack Integration

- [Bridge Contract](https://github.com/rwilliamspbg-ops/mohawk-nexus/tree/main/bridge): `bridge`
- [Go Control Plane](https://github.com/rwilliamspbg-ops/mohawk-nexus/tree/main/SMIP-MWP): `SMIP-MWP`
- [Rust Datapath](https://github.com/rwilliamspbg-ops/mohawk-nexus/tree/main/SMIP-MWP-Rust): `SMIP-MWP-Rust`
- [Protocol Definitions](https://github.com/rwilliamspbg-ops/mohawk-nexus/tree/main/Sovereign-Mohawk-Proto): `Sovereign-Mohawk-Proto`

### Federated Learning

- [FL Client](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/client.py): `fl/client.py`
- [FL Config Helpers](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/common.py): `fl/common.py`
- [FL Coordinator](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/coordinator.py): `fl/coordinator.py`
- [Round State](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/fl/coordinator.py): `fl/coordinator.py`

### Network Services

- [SWIP Service](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/swip/service.py): `swip/service.py`

### Cross-Language SDK

- [Python SDK Logic](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/python/mohawk_sdk/logic.py): `sdk/python/mohawk_sdk/logic.py`
- [Python SDK Contract](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/python/mohawk_sdk/bridge_contract.py): `sdk/python/mohawk_sdk/bridge_contract.py`
- [Python SDK Exports](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/python/mohawk_sdk/__init__.py): `sdk/python/mohawk_sdk/__init__.py`
- [Go SDK Logic](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/go/mohawksdk/logic.go): `sdk/go/mohawksdk/logic.go`
- [Go SDK Contract](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/go/mohawksdk/bridge_contract.go): `sdk/go/mohawksdk/bridge_contract.go`
- [Rust SDK Logic](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/rust/src/lib.rs): `sdk/rust/src/lib.rs`
- [Rust SDK Contract](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/rust/src/bridge_contract.rs): `sdk/rust/src/bridge_contract.rs`
- [TypeScript SDK Logic](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/typescript/src/index.js): `sdk/typescript/src/index.js`
- [TypeScript SDK Contract](https://github.com/rwilliamspbg-ops/mohawk-nexus/blob/main/sdk/typescript/src/bridgeContract.js): `sdk/typescript/src/bridgeContract.js`

### Other components

- **Stack Operator**

## Connections

- FL Client → FL Config Helpers: loads config (evidence: `fl/client.py`)
- FL Client → FL Coordinator: requests state
- FL Coordinator → FL Config Helpers: loads config (evidence: `fl/coordinator.py`)
- FL Coordinator → Round State: reads and writes (evidence: `fl/coordinator.py`)
- Stack Operator → Go Control Plane: uses stack
- Stack Operator → Rust Datapath: uses stack
- Go Control Plane → Bridge Contract: integrates through
- Rust Datapath → Bridge Contract: integrates through
- Python SDK Exports → Python SDK Logic: exports (evidence: `sdk/python/mohawk_sdk/__init__.py`)
- Python SDK Exports → Python SDK Contract: exports (evidence: `sdk/python/mohawk_sdk/__init__.py`)
- Rust SDK Logic → Rust SDK Contract: declares module (evidence: `sdk/rust/src/lib.rs`)
- TypeScript SDK Logic → TypeScript SDK Contract: imports (evidence: `sdk/typescript/src/index.js`)
