# open-arsenal/ams-gra-hello-world-sk-infra-sleet architecture

> Architecture diagram of the GitHub repository open-arsenal/ams-gra-hello-world-sk-infra-sleet, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet
- Repository: https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet

## Overview

Sleet is a Rust OMS LA-CAL server. Its main workflow accepts OWP WebSocket connections, authorizes and negotiates services, validates published OMS JSON against a loaded UCI schema, and routes messages to matching subscriptions; clients can subscribe, unsubscribe, and receive routed messages. Separate admin endpoints expose health, readiness, status, and metrics, while tracing can optionally export telemetry. The graph reflects README capabilities and sampled source; some subsystem wiring is documented but its implementation was not fully sampled.

Main entry points: [`sleet/src/server.rs`](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/server.rs) (WebSocket server), [`sleet/src/main.rs`](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/main.rs) (Runtime entry), [`sleet/src/validator.rs`](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/validator.rs) (OMS validator), [`sleet/src/schema/mod.rs`](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/schema/mod.rs) (Schema loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Server runtime"]
  node_main["Runtime entry<br/>[main.rs]"]
  node_config["Server config<br/>[config.rs]"]
  node_service_defs["Service authorization<br/>[services.d]"]
end

subgraph group_validation["Schema validation"]
  node_schema_loader["Schema loader<br/>[mod.rs]"]
  node_xsd_parser["XSD parser<br/>[parser.rs]"]
  node_schema_model["Schema model<br/>[model.rs]"]
  node_validator["OMS validator<br/>[validator.rs]"]
  node_facets["Facet evaluation<br/>[facets.rs]"]
end

subgraph group_messaging["Messaging protocol"]
  node_ws_server["WebSocket server<br/>[server.rs]"]
  node_owp_types["OWP frames<br/>[owp.rs]"]
  node_client_lib["OWP client library<br/>[lib.rs]"]
  node_router["Topic router<br/>[router.rs]"]
end

subgraph group_operations["Operations"]
  node_admin["Admin endpoints<br/>[admin.rs]"]
  node_telemetry["Tracing and metrics<br/>[telemetry.rs]"]
end

node_client_actor(("OWP clients"))
node_xsd_files["UCI XSD files"]
node_operator(("Operators and Prometheus"))
node_otlp(("OTLP collector"))

node_client_actor -->|"uses client"| node_client_lib
node_client_lib -->|"OWP WebSocket"| node_ws_server
node_main -->|"loads settings"| node_config
node_main -->|"loads schema"| node_schema_loader
node_main -->|"starts listener"| node_ws_server
node_main -->|"starts endpoints"| node_admin
node_main -->|"initializes"| node_telemetry
node_config -->|"loads services"| node_service_defs
node_xsd_files -->|"loaded at startup"| node_schema_loader
node_schema_loader -->|"parses XSD"| node_xsd_parser
node_xsd_parser -->|"builds model"| node_schema_model
node_ws_server -->|"parses frames"| node_owp_types
node_ws_server -->|"validates PUB"| node_validator
node_validator -->|"reads schema"| node_schema_model
node_validator -->|"checks facets"| node_facets
node_ws_server -->|"dispatches publish and subscriptions"| node_router
node_router -->|"queues deliveries"| node_ws_server
node_ws_server -->|"sends OWP replies"| node_client_actor
node_operator -->|"requests status and metrics"| node_admin
node_admin -->|"returns endpoints"| node_operator
node_telemetry -.->|"exports traces"| node_otlp

click node_main "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/main.rs"
click node_config "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/config.rs"
click node_service_defs "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/tree/main/config/services.d"
click node_ws_server "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/server.rs"
click node_owp_types "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet-types/src/owp.rs"
click node_client_lib "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet-client/src/lib.rs"
click node_router "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/router.rs"
click node_schema_loader "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/schema/mod.rs"
click node_xsd_parser "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/schema/parser.rs"
click node_schema_model "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/schema/model.rs"
click node_validator "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/validator.rs"
click node_facets "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/facets.rs"
click node_admin "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/admin.rs"
click node_telemetry "https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/telemetry.rs"

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_main,node_config,node_service_defs,node_client_actor toneBlue
class node_schema_loader,node_xsd_parser,node_schema_model,node_validator,node_facets toneAmber
class node_ws_server,node_owp_types,node_client_lib,node_router toneMint
class node_admin,node_telemetry toneRose
class node_xsd_files,node_operator,node_otlp toneIndigo
```

## Components

### Server runtime

- [Runtime entry](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/main.rs): `sleet/src/main.rs`
- [Server config](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/config.rs): `sleet/src/config.rs`
- [Service authorization](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/tree/main/config/services.d): `config/services.d`

### Schema validation

- [Schema loader](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/schema/mod.rs): `sleet/src/schema/mod.rs`
- [XSD parser](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/schema/parser.rs): `sleet/src/schema/parser.rs`
- [Schema model](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/schema/model.rs): `sleet/src/schema/model.rs`
- [OMS validator](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/validator.rs): `sleet/src/validator.rs`
- [Facet evaluation](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/facets.rs): `sleet/src/facets.rs`

### Messaging protocol

- [WebSocket server](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/server.rs): `sleet/src/server.rs`
- [OWP frames](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet-types/src/owp.rs): `sleet-types/src/owp.rs`
- [OWP client library](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet-client/src/lib.rs): `sleet-client/src/lib.rs`
- [Topic router](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/router.rs): `sleet/src/router.rs`

### Operations

- [Admin endpoints](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/admin.rs): `sleet/src/admin.rs`
- [Tracing and metrics](https://github.com/open-arsenal/ams-gra-hello-world-sk-infra-sleet/blob/main/sleet/src/telemetry.rs): `sleet/src/telemetry.rs`

### Other components

- **OWP clients**
- **UCI XSD files**
- **Operators and Prometheus**
- **OTLP collector**

## Connections

- OWP clients → OWP client library: uses client
- OWP client library → WebSocket server: OWP WebSocket
- Runtime entry → Server config: loads settings
- Runtime entry → Schema loader: loads schema
- Runtime entry → WebSocket server: starts listener
- Runtime entry → Admin endpoints: starts endpoints
- Runtime entry → Tracing and metrics: initializes
- Server config → Service authorization: loads services
- UCI XSD files → Schema loader: loaded at startup
- Schema loader → XSD parser: parses XSD
- XSD parser → Schema model: builds model
- WebSocket server → OWP frames: parses frames
- WebSocket server → OMS validator: validates PUB
- OMS validator → Schema model: reads schema
- OMS validator → Facet evaluation: checks facets
- WebSocket server → Topic router: dispatches publish and subscriptions
- Topic router → WebSocket server: queues deliveries
- WebSocket server → OWP clients: sends OWP replies
- Operators and Prometheus → Admin endpoints: requests status and metrics
- Admin endpoints → Operators and Prometheus: returns endpoints
- Tracing and metrics → OTLP collector: exports traces
