Skip to content
Rob Dobson edited this page May 4, 2026 · 48 revisions

Raft

Raft is an opinionated framework for embedded development. It picks up where the Arduino libraries stop and builds on the basic ideas of setup() and loop() to enable even the most complex applications to be built. Raft simplifies:

  • Cooperative multi-tasking
  • Configuration (smart, JSON-based)
  • Networking (WiFi, BLE, Ethernet, serial)
  • Communications (REST, WebSockets, MQTT, file transfer, BLE GATT)
  • OTA update (unified mechanism over BLE, WiFi or serial)
  • Web server (static files, REST API, WebSockets, SSE)
  • I2C bus (auto-detection, identification, polling, recovery)
  • Modular design (mix and match capabilities; few interdependencies)

Raft builds on Arduino setup() and loop() for configuration and async operations, and is opinionated about Convention over Configuration: most of what every connected device needs is provided by default, and configured with a single JSON document.

Raft currently targets the ESP32 family (ESP32, ESP32-S3, ESP32-C3, ESP32-C6) on top of ESP IDF.


1. Getting Started

2. Scaffolding and Building

3. Raft Architecture

4. Built-in SysMods

Networking and connectivity:

Comms channels:

Files, logging and updates:

Publishing and state:

Devices and buses:

  • See section 6 below.

5. Communications and Protocols

6. Devices and Buses

7. Helper Classes and Utilities

  • Helper Classes Index — RingBuffer, ThreadSafeQueue, ExpressionEval, NumericalFilters, DebounceButton, MiniHDLC, NamedValueProvider, SupervisorStats, ConfigPinMap, StatusIndicator, DNSResolver, ArPreferences, libb64
  • LEDPixels (JSON config)

8. Reference

9. Operations and Tooling


Repository map

The Raft framework is split across several repositories:

Repo Contents
RaftCore Framework core: SysManager, SysMod base, comms stack, configuration, helper classes
RaftSysMods Built-in SysMods: BLE, Network, MQTT, FileManager, LogManager, OTA, comms channels
RaftI2C I2C bus driver, device scanning, identification, polling
RaftWebServer HTTP / WebSocket / SSE web server with REST, static-file and upload handlers

Each repo also has a devdocs/ folder with internal design notes that may be promoted into this wiki over time.

Clone this wiki locally