The articles describe the ERTH Stack (ElectroBun + Robyn + Turso + HTMX) as an alternative to Electron-style desktop apps, aiming for smaller size and lower idle resource use while still enabling Python-based AI and backend logic. Instead of bundling Chromium and Node.js, ElectroBun is presented as a lightweight shell that binds to the operating system’s native web view (WebKit/WebView2). The architecture splits the application into two processes: a Bun “main process” that manages the UI and IPC, and a Python “sidecar” service built with Robyn, a Rust-powered async Python web framework.

A key implementation detail is dynamic port negotiation. The Bun process spawns the Robyn server while forcing it to bind to port 0, letting the OS choose an available free port. Bun then reads the sidecar’s startup output and detects the actual “listening on 127.0.0.1:XXXXX” line, uses the discovered port to connect the UI, and avoids port-collision crashes caused by hardcoded ports. The second piece also outlines broader ERTH pillars, including using Turso/libSQL for a local-first database and HTMX for a “zero-JS” style UI that receives HTML fragments from the backend. It further claims additional safeguards such as a watchdog restart mechanism and opaque token-based access control to prevent port scanning or hijacking.