# danielmarquez11/ble-unreal-engine-5-project architecture

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

- Interactive diagram: https://gitdiagram.com/danielmarquez11/ble-unreal-engine-5-project
- Repository: https://github.com/danielmarquez11/ble-unreal-engine-5-project

## Overview

This Unreal Engine prototype scans for Bluetooth LE devices and opens a WebSocket connection to a local endpoint. Its main documented runtime path is BLE scan/connect/disconnect through a game-instance subsystem, with Blueprint events intended for UI use; the sampled code does not show the Blueprint bindings or any heart-rate measurement readout. The WebSocket connection is separate. The project tree includes heart-rate Blueprint assets, but their behavior is not visible here.

Main entry points: [`BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.cpp`](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.cpp) (BLE Subsystem), [`BluethoothHeartRate/Content/Developers/marqu/WBP_HeartRate.uasset`](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Content/Developers/marqu/WBP_HeartRate.uasset) (Heart Rate UI), [`BluethoothHeartRate/Content/Developers/marqu/BP_HeartRate.uasset`](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Content/Developers/marqu/BP_HeartRate.uasset) (Heart Rate BP), [`BluethoothHeartRate/Source/BluethoothHeartRate/WebSocketGameInstance.cpp`](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/WebSocketGameInstance.cpp) (WebSocket Instance)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ble["Bluetooth LE"]
  node_ble_subsystem["BLE Subsystem<br/>[BLESubsystem.cpp]"]
  node_ble_api["BLE Blueprint API<br/>[BLESubsystem.h]"]
  node_legacy_device["TCP Server Stub<br/>[BLEDevice.cpp]"]
end

subgraph group_app["Game App"]
  node_ui["Heart Rate UI"]
  node_blueprint["Heart Rate BP"]
  node_game_instance["WebSocket Instance"]
end

subgraph group_integration["External Integrations"]
  node_windows_ble["Windows BLE"]
  node_ws_server["Local WebSocket"]
end

node_user(("Player"))

node_user -.->|"uses"| node_ui
node_ui -.->|"uses"| node_blueprint
node_blueprint -.->|"may call"| node_ble_subsystem
node_ble_subsystem -->|"scans and connects"| node_windows_ble
node_ble_subsystem -->|"implements"| node_ble_api
node_game_instance -->|"connects to"| node_ws_server

click node_ui "https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Content/Developers/marqu/WBP_HeartRate.uasset"
click node_blueprint "https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Content/Developers/marqu/BP_HeartRate.uasset"
click node_ble_subsystem "https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.cpp"
click node_ble_api "https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.h"
click node_legacy_device "https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/BLEDevice.cpp"
click node_game_instance "https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/WebSocketGameInstance.cpp"

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_ble_subsystem,node_ble_api,node_legacy_device toneBlue
class node_ui,node_blueprint,node_game_instance toneAmber
class node_windows_ble,node_ws_server toneMint
class node_user toneIndigo
```

## Components

### Bluetooth LE

- [BLE Subsystem](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.cpp): `BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.cpp`
- [BLE Blueprint API](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.h): `BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.h`
- [TCP Server Stub](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/BLEDevice.cpp): `BluethoothHeartRate/Source/BluethoothHeartRate/BLEDevice.cpp`

### Game App

- [Heart Rate UI](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Content/Developers/marqu/WBP_HeartRate.uasset): `BluethoothHeartRate/Content/Developers/marqu/WBP_HeartRate.uasset`
- [Heart Rate BP](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Content/Developers/marqu/BP_HeartRate.uasset): `BluethoothHeartRate/Content/Developers/marqu/BP_HeartRate.uasset`
- [WebSocket Instance](https://github.com/danielmarquez11/ble-unreal-engine-5-project/blob/main/BluethoothHeartRate/Source/BluethoothHeartRate/WebSocketGameInstance.cpp): `BluethoothHeartRate/Source/BluethoothHeartRate/WebSocketGameInstance.cpp`

### External Integrations

- **Windows BLE**
- **Local WebSocket**

### Other components

- **Player**

## Connections

- Player → Heart Rate UI: uses
- Heart Rate UI → Heart Rate BP: uses
- Heart Rate BP → BLE Subsystem: may call
- BLE Subsystem → Windows BLE: scans and connects (evidence: `BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.cpp`)
- BLE Subsystem → BLE Blueprint API: implements (evidence: `BluethoothHeartRate/Source/BluethoothHeartRate/BLESubsystem.cpp`)
- WebSocket Instance → Local WebSocket: connects to (evidence: `BluethoothHeartRate/Source/BluethoothHeartRate/WebSocketGameInstance.cpp`)
