# ciaran-mcdj/ciaran-kome_snowprobe architecture

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

- Interactive diagram: https://gitdiagram.com/ciaran-mcdj/ciaran-kome_snowprobe
- Repository: https://github.com/ciaran-mcdj/ciaran-kome_snowprobe

## Overview

This is a browser-based PWA for communicating with a snow probe and measuring ground temperature beneath snow. The documented user workflow is to open the page with Bluetooth enabled and connect to the probe; the sampled BLX code connects over Web Bluetooth, handles notifications and sensor messages, and exchanges device files. It persists device data in IndexedDB, with a separate file-saving helper. The README describes planned measurement and retrieval UI, but the available excerpts do not establish those controls or a CSV workflow. The HTML entry page and wiring were not sampled, so their runtime connections are omitted.

Main entry points: [`js/blx.js`](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/js/blx.js) (BLX protocol), [`js/blStore.js`](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/js/blStore.js) (IndexedDB store), [`GraceCode/blx.js`](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/GraceCode/blx.js) (Grace BLX variant), [`GraceCode/blx_GraceEdited.js`](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/GraceCode/blx_GraceEdited.js) (Edited BLX variant)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_device["Probe communication"]
  node_blx["BLX protocol<br/>[blx.js]"]
  node_graceblx["Grace BLX variant<br/>[blx.js]"]
  node_editedblx["Edited BLX variant<br/>[blx_GraceEdited.js]"]
  node_probe["Snow probe"]
end

subgraph group_data["Device data"]
  node_store[("IndexedDB store<br/>[blStore.js]")]
end

subgraph group_runtime["Browser runtime"]
  node_page["PWA page<br/>[index.html]"]
  node_filesaver["File saver<br/>[FileSaver.js]"]
end

node_user(("Field user"))

node_user -.->|"uses"| node_page
node_blx -->|"connects over BLE"| node_probe
node_blx -->|"exchanges data"| node_probe
node_blx -->|"reads and writes"| node_store
node_graceblx -->|"connects over BLE"| node_probe
node_graceblx -->|"reads and writes"| node_store
node_editedblx -->|"connects over BLE"| node_probe
node_editedblx -->|"reads and writes"| node_store

click node_page "https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/index.html"
click node_blx "https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/js/blx.js"
click node_graceblx "https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/GraceCode/blx.js"
click node_editedblx "https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/GraceCode/blx_GraceEdited.js"
click node_store "https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/js/blStore.js"
click node_filesaver "https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/js/FileSaver.js"

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_blx,node_graceblx,node_editedblx,node_probe,node_user toneBlue
class node_store toneAmber
class node_page,node_filesaver toneMint
```

## Components

### Probe communication

- [BLX protocol](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/js/blx.js): `js/blx.js`
- [Grace BLX variant](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/GraceCode/blx.js): `GraceCode/blx.js`
- [Edited BLX variant](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/GraceCode/blx_GraceEdited.js): `GraceCode/blx_GraceEdited.js`
- **Snow probe**

### Device data

- [IndexedDB store](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/js/blStore.js): `js/blStore.js`

### Browser runtime

- [PWA page](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/index.html): `index.html`
- [File saver](https://github.com/ciaran-mcdj/ciaran-kome_snowprobe/blob/master/js/FileSaver.js): `js/FileSaver.js`

### Other components

- **Field user**

## Connections

- Field user → PWA page: uses (evidence: `README.txt`)
- BLX protocol → Snow probe: connects over BLE (evidence: `js/blx.js`)
- BLX protocol → Snow probe: exchanges data (evidence: `js/blx.js`)
- BLX protocol → IndexedDB store: reads and writes
- Grace BLX variant → Snow probe: connects over BLE (evidence: `GraceCode/blx.js`)
- Grace BLX variant → IndexedDB store: reads and writes (evidence: `GraceCode/blx.js`)
- Edited BLX variant → Snow probe: connects over BLE (evidence: `GraceCode/blx_GraceEdited.js`)
- Edited BLX variant → IndexedDB store: reads and writes (evidence: `GraceCode/blx_GraceEdited.js`)
