# toriumslurs/jolt architecture

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

- Interactive diagram: https://gitdiagram.com/toriumslurs/jolt
- Repository: https://github.com/toriumslurs/jolt

## Overview

Jolt is a Roblox networking library. Its principal workflow is for a server or client to create a named channel, send or invoke it, and receive events or invocation responses; outgoing values are binary-serialized and Fire calls are batched per frame. The README documents channel hashing and reliable/unreliable APIs, but no source excerpts were provided, so internal call ownership and the precise roles of utility modules cannot be verified. Edges below reflect only documented relationships.

Main entry points: [`src/Bridge.luau`](https://github.com/toriumslurs/jolt/blob/main/src/Bridge.luau) (Network bridge), [`src/Server.luau`](https://github.com/toriumslurs/jolt/blob/main/src/Server.luau) (Server channels), [`src/Client.luau`](https://github.com/toriumslurs/jolt/blob/main/src/Client.luau) (Client channels), [`src/init.luau`](https://github.com/toriumslurs/jolt/blob/main/src/init.luau) (Library entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_api["Channel APIs"]
  node_server_api["Server channels<br/>[Server.luau]"]
  node_client_api["Client channels<br/>[Client.luau]"]
  node_entry["Library entry<br/>[init.luau]"]
end

subgraph group_transport["Packet Transport"]
  node_bridge["Network bridge<br/>[Bridge.luau]"]
  node_remotes["Remote endpoints<br/>[Remotes.luau]"]
  node_packet["Packet framing<br/>[Packet.luau]"]
end

subgraph group_encoding["Encoding"]
  node_serializer["Value serialization<br/>[Buffers.luau]"]
  node_channel_hash["Channel hashing<br/>[Hash.luau]"]
end

subgraph group_support["Runtime Support"]
  node_signals["Event signals<br/>[Signal.luau]"]
  node_constants["Protocol constants<br/>[Constants.luau]"]
end

node_server_actor(("Server caller"))
node_client_actor(("Client caller"))

node_server_actor -->|"requires"| node_entry
node_client_actor -->|"requires"| node_entry
node_entry -->|"creates channels"| node_server_api
node_entry -->|"creates channels"| node_client_api
node_server_actor -->|"sends events"| node_server_api
node_client_actor -->|"sends events"| node_client_api
node_server_api -->|"exchanges packets"| node_client_api
node_client_api -->|"exchanges packets"| node_server_api
node_server_api -.->|"uses transport"| node_bridge
node_client_api -.->|"uses transport"| node_bridge
node_bridge -->|"serializes values"| node_serializer
node_bridge -->|"batches per frame"| node_packet
node_bridge -->|"hashes channels"| node_channel_hash
node_bridge -.->|"uses endpoints"| node_remotes

click node_server_api "https://github.com/toriumslurs/jolt/blob/main/src/Server.luau"
click node_client_api "https://github.com/toriumslurs/jolt/blob/main/src/Client.luau"
click node_entry "https://github.com/toriumslurs/jolt/blob/main/src/init.luau"
click node_bridge "https://github.com/toriumslurs/jolt/blob/main/src/Bridge.luau"
click node_remotes "https://github.com/toriumslurs/jolt/blob/main/src/Utils/Remotes.luau"
click node_packet "https://github.com/toriumslurs/jolt/blob/main/src/Utils/Packet.luau"
click node_serializer "https://github.com/toriumslurs/jolt/blob/main/src/Utils/Buffers.luau"
click node_channel_hash "https://github.com/toriumslurs/jolt/blob/main/src/Utils/Hash.luau"
click node_signals "https://github.com/toriumslurs/jolt/blob/main/src/Utils/Signal.luau"
click node_constants "https://github.com/toriumslurs/jolt/blob/main/src/Utils/Constants.luau"

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_server_api,node_client_api,node_entry,node_client_actor toneBlue
class node_bridge,node_remotes,node_packet toneAmber
class node_serializer,node_channel_hash,node_server_actor toneMint
class node_signals,node_constants toneRose
```

## Components

### Channel APIs

- [Server channels](https://github.com/toriumslurs/jolt/blob/main/src/Server.luau): `src/Server.luau`
- [Client channels](https://github.com/toriumslurs/jolt/blob/main/src/Client.luau): `src/Client.luau`
- [Library entry](https://github.com/toriumslurs/jolt/blob/main/src/init.luau): `src/init.luau`

### Packet Transport

- [Network bridge](https://github.com/toriumslurs/jolt/blob/main/src/Bridge.luau): `src/Bridge.luau`
- [Remote endpoints](https://github.com/toriumslurs/jolt/blob/main/src/Utils/Remotes.luau): `src/Utils/Remotes.luau`
- [Packet framing](https://github.com/toriumslurs/jolt/blob/main/src/Utils/Packet.luau): `src/Utils/Packet.luau`

### Encoding

- [Value serialization](https://github.com/toriumslurs/jolt/blob/main/src/Utils/Buffers.luau): `src/Utils/Buffers.luau`
- [Channel hashing](https://github.com/toriumslurs/jolt/blob/main/src/Utils/Hash.luau): `src/Utils/Hash.luau`

### Runtime Support

- [Event signals](https://github.com/toriumslurs/jolt/blob/main/src/Utils/Signal.luau): `src/Utils/Signal.luau`
- [Protocol constants](https://github.com/toriumslurs/jolt/blob/main/src/Utils/Constants.luau): `src/Utils/Constants.luau`

### Other components

- **Server caller**
- **Client caller**

## Connections

- Server caller → Library entry: requires (evidence: `README.md`)
- Client caller → Library entry: requires (evidence: `README.md`)
- Library entry → Server channels: creates channels (evidence: `README.md`)
- Library entry → Client channels: creates channels (evidence: `README.md`)
- Server caller → Server channels: sends events (evidence: `README.md`)
- Client caller → Client channels: sends events (evidence: `README.md`)
- Server channels → Client channels: exchanges packets (evidence: `README.md`)
- Client channels → Server channels: exchanges packets (evidence: `README.md`)
- Server channels → Network bridge: uses transport
- Client channels → Network bridge: uses transport
- Network bridge → Value serialization: serializes values (evidence: `README.md`)
- Network bridge → Packet framing: batches per frame (evidence: `README.md`)
- Network bridge → Channel hashing: hashes channels (evidence: `README.md`)
- Network bridge → Remote endpoints: uses endpoints
