# dotintent/react-native-ble-plx architecture

> Architecture diagram of the GitHub repository dotintent/react-native-ble-plx, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dotintent/react-native-ble-plx
- Repository: https://github.com/dotintent/react-native-ble-plx

## Overview

react-native-ble-plx is a React Native BLE client library. An app uses the exported BleManager API to observe adapter state, scan for peripherals, connect, discover GATT services, and perform characteristic or descriptor operations; results and events return through the JavaScript/native bridge. Platform code performs BLE operations, while JavaScript model objects expose devices and GATT resources. The README also documents RSSI, MTU negotiation, iOS background support, and an Expo config plugin. Native implementation details beyond the sampled Android and bridge files are represented only at the subsystem level.

Main entry points: [`android/src/main/java/com/bleplx/BlePlxModule.java`](https://github.com/dotintent/react-native-ble-plx/blob/master/android/src/main/java/com/bleplx/BlePlxModule.java) (Android module), [`src/BleModule.js`](https://github.com/dotintent/react-native-ble-plx/blob/master/src/BleModule.js) (Native module bridge), [`src/BleManager.js`](https://github.com/dotintent/react-native-ble-plx/blob/master/src/BleManager.js) (BLE manager), [`plugin/src/withBLE.ts`](https://github.com/dotintent/react-native-ble-plx/blob/master/plugin/src/withBLE.ts) (Expo config plugin)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_js["JavaScript API"]
  node_exports["Public exports<br/>[index.js]"]
  node_manager["BLE manager<br/>[BleManager.js]"]
  node_bridge["Native module bridge<br/>[BleModule.js]"]
  node_models["GATT models<br/>[Service.js]"]
end

subgraph group_native["Native BLE"]
  node_androidmodule["Android module<br/>[BlePlxModule.java]"]
  node_androidadapter["Android BLE adapter<br/>[BleAdapter.java]"]
  node_androidmodels["Android GATT models<br/>[Service.java]"]
  node_converters["Native converters"]
  node_iosbridge["iOS native bridge<br/>[BlePlx.h]"]
  node_iosadapter["iOS BLE adapter"]
end

subgraph group_config["App configuration"]
  node_plugin["Expo config plugin<br/>[withBLE.ts]"]
  node_androidpermissions["Android permissions"]
  node_iosbackground["iOS background modes"]
end

subgraph group_external["BLE environment"]
  node_ble["Bluetooth LE system"]
  node_peripheral(("BLE peripheral"))
end

node_app(("React Native app"))
node_expo(("Expo app config"))

node_app -->|"imports API"| node_exports
node_exports -->|"exports manager"| node_manager
node_manager -->|"invokes native API"| node_bridge
node_manager -->|"creates models"| node_models
node_bridge -->|"bridges calls"| node_androidmodule
node_androidmodule -->|"uses adapter"| node_androidadapter
node_androidadapter -->|"performs BLE"| node_ble
node_ble -->|"communicates"| node_peripheral
node_androidmodule -->|"uses GATT data"| node_androidmodels
node_androidmodule -->|"converts results"| node_converters
node_converters -->|"returns objects"| node_bridge
node_bridge -->|"bridges calls"| node_iosbridge
node_iosbridge -->|"exposes adapter"| node_iosadapter
node_iosadapter -->|"performs BLE"| node_ble
node_expo -.->|"configures app"| node_plugin
node_plugin -->|"configures permissions"| node_androidpermissions
node_plugin -->|"sets background modes"| node_iosbackground

click node_exports "https://github.com/dotintent/react-native-ble-plx/blob/master/src/index.js"
click node_manager "https://github.com/dotintent/react-native-ble-plx/blob/master/src/BleManager.js"
click node_bridge "https://github.com/dotintent/react-native-ble-plx/blob/master/src/BleModule.js"
click node_models "https://github.com/dotintent/react-native-ble-plx/blob/master/src/Service.js"
click node_androidmodule "https://github.com/dotintent/react-native-ble-plx/blob/master/android/src/main/java/com/bleplx/BlePlxModule.java"
click node_androidadapter "https://github.com/dotintent/react-native-ble-plx/blob/master/android/src/main/java/com/bleplx/adapter/BleAdapter.java"
click node_androidmodels "https://github.com/dotintent/react-native-ble-plx/blob/master/android/src/main/java/com/bleplx/adapter/Service.java"
click node_converters "https://github.com/dotintent/react-native-ble-plx/blob/master/android/src/main/java/com/bleplx/converter/ServiceToJsObjectConverter.java"
click node_iosbridge "https://github.com/dotintent/react-native-ble-plx/blob/master/ios/BlePlx.h"
click node_iosadapter "https://github.com/dotintent/react-native-ble-plx/tree/master/ios"
click node_plugin "https://github.com/dotintent/react-native-ble-plx/blob/master/plugin/src/withBLE.ts"
click node_androidpermissions "https://github.com/dotintent/react-native-ble-plx/blob/master/plugin/src/withBluetoothPermissions.ts"
click node_iosbackground "https://github.com/dotintent/react-native-ble-plx/blob/master/plugin/src/withBLEBackgroundModes.ts"

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_exports,node_manager,node_bridge,node_models toneBlue
class node_androidmodule,node_androidadapter,node_androidmodels,node_converters,node_iosbridge,node_iosadapter toneAmber
class node_plugin,node_androidpermissions,node_iosbackground toneMint
class node_ble,node_peripheral toneRose
class node_app,node_expo toneIndigo
```

## Components

### JavaScript API

- [Public exports](https://github.com/dotintent/react-native-ble-plx/blob/master/src/index.js): `src/index.js`
- [BLE manager](https://github.com/dotintent/react-native-ble-plx/blob/master/src/BleManager.js): `src/BleManager.js`
- [Native module bridge](https://github.com/dotintent/react-native-ble-plx/blob/master/src/BleModule.js): `src/BleModule.js`
- [GATT models](https://github.com/dotintent/react-native-ble-plx/blob/master/src/Service.js): `src/Service.js`

### Native BLE

- [Android module](https://github.com/dotintent/react-native-ble-plx/blob/master/android/src/main/java/com/bleplx/BlePlxModule.java): `android/src/main/java/com/bleplx/BlePlxModule.java`
- [Android BLE adapter](https://github.com/dotintent/react-native-ble-plx/blob/master/android/src/main/java/com/bleplx/adapter/BleAdapter.java): `android/src/main/java/com/bleplx/adapter/BleAdapter.java`
- [Android GATT models](https://github.com/dotintent/react-native-ble-plx/blob/master/android/src/main/java/com/bleplx/adapter/Service.java): `android/src/main/java/com/bleplx/adapter/Service.java`
- [Native converters](https://github.com/dotintent/react-native-ble-plx/blob/master/android/src/main/java/com/bleplx/converter/ServiceToJsObjectConverter.java): `android/src/main/java/com/bleplx/converter/ServiceToJsObjectConverter.java`
- [iOS native bridge](https://github.com/dotintent/react-native-ble-plx/blob/master/ios/BlePlx.h): `ios/BlePlx.h`
- [iOS BLE adapter](https://github.com/dotintent/react-native-ble-plx/tree/master/ios): `ios`

### App configuration

- [Expo config plugin](https://github.com/dotintent/react-native-ble-plx/blob/master/plugin/src/withBLE.ts): `plugin/src/withBLE.ts`
- [Android permissions](https://github.com/dotintent/react-native-ble-plx/blob/master/plugin/src/withBluetoothPermissions.ts): `plugin/src/withBluetoothPermissions.ts`
- [iOS background modes](https://github.com/dotintent/react-native-ble-plx/blob/master/plugin/src/withBLEBackgroundModes.ts): `plugin/src/withBLEBackgroundModes.ts`

### BLE environment

- **Bluetooth LE system**
- **BLE peripheral**

### Other components

- **React Native app**
- **Expo app config**

## Connections

- React Native app → Public exports: imports API
- Public exports → BLE manager: exports manager
- BLE manager → Native module bridge: invokes native API
- BLE manager → GATT models: creates models
- Native module bridge → Android module: bridges calls
- Android module → Android BLE adapter: uses adapter
- Android BLE adapter → Bluetooth LE system: performs BLE
- Bluetooth LE system → BLE peripheral: communicates
- Android module → Android GATT models: uses GATT data
- Android module → Native converters: converts results
- Native converters → Native module bridge: returns objects
- Native module bridge → iOS native bridge: bridges calls
- iOS native bridge → iOS BLE adapter: exposes adapter
- iOS BLE adapter → Bluetooth LE system: performs BLE
- Expo app config → Expo config plugin: configures app
- Expo config plugin → Android permissions: configures permissions
- Expo config plugin → iOS background modes: sets background modes
