Ronny Eia 7bb77a93a7 Add CodeMirror-based script editor, verified against real hardware
New Script section: loads the device's current Lua script (GET
/api/script), edits it in a real code editor (CodeMirror 6 with Lua
syntax highlighting via @codemirror/legacy-modes -- no dedicated
@codemirror/lang-lua package exists, verified against the npm
registry), and saves it back (POST /api/script) as raw text, not
JSON, matching the device's endpoint. Not Blockly yet -- that's its
own, much larger task; this is the raw-text step toward it.

Verified end-to-end against a real ESP32-C6: load, edit, save
hot-reloads on-device within one tick, and the change survives a
power cycle.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-12 10:27:13 +02:00

kvida-sdk

Web client for configuring and (eventually) visually programming Kvida devices -- see kvida/AGENTS.md for the product vision (Blockly -> Lua, "Level 2" configuration).

Runs as a standalone web app, not on the device itself -- Blockly is far too large for the ESP32's flash. Talks to a device already on the local network via the JSON API kvida-os exposes (see kvida-os's transport README).

Not for initial Wi-Fi setup. The captive portal (SoftAP) that gets a device onto Wi-Fi for the first time has to be served by the device itself -- a phone connected to the isolated setup AP has no route to this app. This app is for configuring a device that's already online (MQTT broker/credentials today, more later).

Getting started

npm install
npm run dev

Open the printed local URL, enter the device's address (e.g. kvida-403ec1.local, or its IP), and click Connect.

Stack

Vite + TypeScript, no framework yet -- kept minimal until the Blockly editor itself is designed, at which point the UI needs will be much clearer.

Description
No description provided
Readme 54 KiB
Languages
TypeScript 91.4%
CSS 5.4%
HTML 3.2%