# stratcraftsai/nexusfix architecture

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

- Interactive diagram: https://gitdiagram.com/stratcraftsai/nexusfix
- Repository: https://github.com/stratcraftsai/nexusfix

## Overview

NexusFIX is a header-only C++ FIX engine for low-latency trading. Its principal workflow is to accept or initiate a FIX connection, manage session state and sequencing, parse inbound messages into field views, and expose typed FIX messages; outbound messages are assembled and transported. The repository also advertises SBE codecs, multiple FIX versions, optimized I/O, and low-latency memory and logging facilities. The excerpts show session message construction and parser structure; connections not directly evidenced in sampled source are omitted or marked unverified.

Main entry points: [`include/nexusfix/messages`](https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/messages) (Typed FIX messages), [`include/nexusfix/session/session_manager.hpp`](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/session/session_manager.hpp) (Session manager), [`include/nexusfix/parser/runtime_parser.hpp`](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/parser/runtime_parser.hpp) (Runtime parser), [`include/nexusfix/transport`](https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/transport) (Network transports)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_session_transport["Session and transport"]
  node_engine_entry["FIX endpoints"]
  node_transport["Network transports"]
  node_io_uring["io_uring transport"]
  node_session_manager["Session manager"]
  node_session_state["Session state<br/>[state.hpp]"]
  node_sequence["Sequence tracking<br/>[sequence.hpp]"]
  node_message_store[("Message store")]
end

subgraph group_protocol["FIX protocol"]
  node_fix_messages["Typed FIX messages"]
  node_message_interface["Message interface<br/>[i_message.hpp]"]
  node_fix_types["Tags and field types"]
end

subgraph group_wire_formats["Parsing and encoding"]
  node_runtime_parser["Runtime parser<br/>[runtime_parser.hpp]"]
  node_field_views["Zero-copy field views<br/>[field_view.hpp]"]
  node_structural_index["Structural index"]
  node_simd_scanner["SIMD scanner<br/>[simd_scanner.hpp]"]
  node_serializer["FIX serializer"]
  node_sbe["SBE codecs"]
end

subgraph group_performance["Performance support"]
  node_memory["Memory primitives"]
  node_deferred_processor["Deferred processing"]
end

node_trader_app(("Trading application"))
node_counterparty(("FIX counterparty"))

node_trader_app -.->|"uses endpoints"| node_engine_entry
node_engine_entry -.->|"uses transport"| node_transport
node_counterparty -.->|"exchanges FIX"| node_transport
node_io_uring -->|"specializes"| node_transport
node_io_uring -->|"uses coroutines"| node_session_manager
node_session_manager -->|"uses state"| node_session_state
node_session_manager -->|"uses sequencing"| node_sequence
node_session_manager -->|"uses store"| node_message_store
node_session_manager -->|"builds session messages"| node_fix_messages
node_fix_messages -->|"implements contract"| node_message_interface
node_fix_messages -->|"parses fields"| node_runtime_parser
node_runtime_parser -->|"indexes fields"| node_field_views
node_runtime_parser -.->|"uses scanner"| node_simd_scanner
node_runtime_parser -.->|"may use index"| node_structural_index
node_serializer -.->|"encodes messages"| node_fix_messages
node_sbe -.->|"provides binary codecs"| node_fix_messages
node_fix_messages -->|"uses field definitions"| node_fix_types
node_memory -->|"backs queueing"| node_deferred_processor

click node_engine_entry "https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/engine"
click node_transport "https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/transport"
click node_io_uring "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/transport/io_uring_transport.hpp"
click node_session_manager "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/session/session_manager.hpp"
click node_session_state "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/session/state.hpp"
click node_sequence "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/session/sequence.hpp"
click node_message_store "https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/store"
click node_fix_messages "https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/messages"
click node_message_interface "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/interfaces/i_message.hpp"
click node_fix_types "https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/types"
click node_runtime_parser "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/parser/runtime_parser.hpp"
click node_field_views "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/parser/field_view.hpp"
click node_structural_index "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/parser/structural_index.hpp"
click node_simd_scanner "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/parser/simd_scanner.hpp"
click node_serializer "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/serializer/constexpr_serializer.hpp"
click node_sbe "https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/sbe"
click node_memory "https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/memory"
click node_deferred_processor "https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/util/deferred_processor.hpp"

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_engine_entry,node_transport,node_io_uring,node_session_manager,node_session_state,node_sequence,node_message_store toneBlue
class node_fix_messages,node_message_interface,node_fix_types toneAmber
class node_runtime_parser,node_field_views,node_structural_index,node_simd_scanner,node_serializer,node_sbe toneMint
class node_memory,node_deferred_processor toneRose
class node_trader_app,node_counterparty toneIndigo
```

## Components

### Session and transport

- [FIX endpoints](https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/engine): `include/nexusfix/engine`
- [Network transports](https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/transport): `include/nexusfix/transport`
- [io_uring transport](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/transport/io_uring_transport.hpp): `include/nexusfix/transport/io_uring_transport.hpp`
- [Session manager](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/session/session_manager.hpp): `include/nexusfix/session/session_manager.hpp`
- [Session state](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/session/state.hpp): `include/nexusfix/session/state.hpp`
- [Sequence tracking](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/session/sequence.hpp): `include/nexusfix/session/sequence.hpp`
- [Message store](https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/store): `include/nexusfix/store`

### FIX protocol

- [Typed FIX messages](https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/messages): `include/nexusfix/messages`
- [Message interface](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/interfaces/i_message.hpp): `include/nexusfix/interfaces/i_message.hpp`
- [Tags and field types](https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/types): `include/nexusfix/types`

### Parsing and encoding

- [Runtime parser](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/parser/runtime_parser.hpp): `include/nexusfix/parser/runtime_parser.hpp`
- [Zero-copy field views](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/parser/field_view.hpp): `include/nexusfix/parser/field_view.hpp`
- [Structural index](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/parser/structural_index.hpp): `include/nexusfix/parser/structural_index.hpp`
- [SIMD scanner](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/parser/simd_scanner.hpp): `include/nexusfix/parser/simd_scanner.hpp`
- [FIX serializer](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/serializer/constexpr_serializer.hpp): `include/nexusfix/serializer/constexpr_serializer.hpp`
- [SBE codecs](https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/sbe): `include/nexusfix/sbe`

### Performance support

- [Memory primitives](https://github.com/stratcraftsai/nexusfix/tree/main/include/nexusfix/memory): `include/nexusfix/memory`
- [Deferred processing](https://github.com/stratcraftsai/nexusfix/blob/main/include/nexusfix/util/deferred_processor.hpp): `include/nexusfix/util/deferred_processor.hpp`

### Other components

- **Trading application**
- **FIX counterparty**

## Connections

- Trading application → FIX endpoints: uses endpoints
- FIX endpoints → Network transports: uses transport
- FIX counterparty → Network transports: exchanges FIX
- io_uring transport → Network transports: specializes (evidence: `include/nexusfix/transport/io_uring_transport.hpp`)
- io_uring transport → Session manager: uses coroutines (evidence: `include/nexusfix/transport/io_uring_transport.hpp`)
- Session manager → Session state: uses state (evidence: `include/nexusfix/session/session_manager.hpp`)
- Session manager → Sequence tracking: uses sequencing (evidence: `include/nexusfix/session/session_manager.hpp`)
- Session manager → Message store: uses store (evidence: `include/nexusfix/session/session_manager.hpp`)
- Session manager → Typed FIX messages: builds session messages (evidence: `include/nexusfix/session/session_manager.hpp`)
- Typed FIX messages → Message interface: implements contract (evidence: `include/nexusfix/messages/fixt11/session.hpp`)
- Typed FIX messages → Runtime parser: parses fields (evidence: `include/nexusfix/messages/fixt11/session.hpp`)
- Runtime parser → Zero-copy field views: indexes fields (evidence: `include/nexusfix/parser/runtime_parser.hpp`)
- Runtime parser → SIMD scanner: uses scanner (evidence: `include/nexusfix/parser/runtime_parser.hpp`)
- Runtime parser → Structural index: may use index
- FIX serializer → Typed FIX messages: encodes messages
- SBE codecs → Typed FIX messages: provides binary codecs
- Typed FIX messages → Tags and field types: uses field definitions (evidence: `include/nexusfix/messages/fixt11/session.hpp`)
- Memory primitives → Deferred processing: backs queueing (evidence: `include/nexusfix/util/deferred_processor.hpp`)
