ui-engine

module
v0.14.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2026 License: MIT

README

ui-engine

Version: 0.14.2

Write HTML and app logic for your desktop apps. Skip the rest.

No frontend JavaScript. No API layers. No state management boilerplate. Define your domain and presentation objects in backend code, add HTML templates with declarative bindings, and ui-engine handles the rest.

The Problem

Traditional web apps require massive amounts of non-application code:

  • API endpoints and OpenAPI specs
  • Data fetching, serialization, DTOs
  • State management (Redux, Vuex, etc.)
  • Form handling and validation
  • Real-time sync infrastructure

Your actual domain logic becomes a fraction of the codebase.

The Solution

ui-engine eliminates the client/server boundary for application code:

-- Backend: domain objects + presenters
Contact = {type = "Contact"}
function Contact:fullName()
    return self.firstName .. " " .. self.lastName
end

ContactPresenter = {type = "ContactPresenter"}
function ContactPresenter:delete()
    app:removeContact(self.contact)
end
<!-- Frontend: just HTML templates with bindings -->
<input ui-value="firstName">
<span ui-value="fullName()"></span>
<button ui-action="save()">Save</button>

Modify objects directly. UI updates automatically. No plumbing required.

Quick Start

./build/ui-engine-demo --port 8000 --dir demo

Open http://localhost:8000 to see the Contact Manager demo.

See demo/README.md for details.

Documentation

  • USAGE.md — Complete guide: bindings, events, path properties, ViewList, namespaces
  • TRADEOFFS.md — When to use ui-engine vs traditional web architecture
  • demo/ — Working examples (Contact Manager, Simple Adder)

Key Features

  • Declarative bindingsui-value, ui-action, ui-view, ui-html, ui-attr-*, ui-class-*
  • Automatic change detection — no observer pattern, no boilerplate
  • Hot-reloading — edit backend code or templates, see changes instantly (state preserved)
  • ViewList — automatic presenter wrapping for collections
  • Namespace system — multiple views per type (list-item, detail, etc.)

Best For

  • Desktop applications — Electron-style apps without the complexity
  • Internal tools — Admin panels, dashboards, dev tools
  • Kiosk/embedded UIs — Local displays, point-of-sale, industrial HMI
  • Rapid prototyping — Get from idea to working UI in minutes

The reactive WebSocket architecture assumes low latency between client and server, making it ideal for local or LAN deployments rather than internet-scale web apps.

Current Focus

Embedded Lua backend for the frictionless project. The architecture supports other backends (Go, proxied external programs) but Lua is the priority.

Directories

Path Synopsis
Package cli provides the command-line interface for remote-ui.
Package cli provides the command-line interface for remote-ui.
cmd
ui command
Package main is the entry point for the UI server.
Package main is the entry point for the UI server.
ui-engine command
Package main is the entry point for the remote-ui server.
Package main is the entry point for the remote-ui server.
internal
backend
CRC: crc-Backend.md Spec: main.md (UI Server Architecture section) Package backend provides the Backend interface and implementations for the UI server's backend layer.
CRC: crc-Backend.md Spec: main.md (UI Server Architecture section) Package backend provides the Backend interface and implementations for the UI server's backend layer.
bundle
Package bundle provides functionality for bundling site files into the binary.
Package bundle provides functionality for bundling site files into the binary.
config
Package config handles configuration loading from CLI flags, environment variables, and TOML files.
Package config handles configuration loading from CLI flags, environment variables, and TOML files.
lua
Package lua provides the Lua runtime and hot-loading support.
Package lua provides the Lua runtime and hot-loading support.
path
CRC: crc-PathSyntax.md Spec: protocol.md
CRC: crc-PathSyntax.md Spec: protocol.md
presenter
Package presenter implements the Presenter System.
Package presenter implements the Presenter System.
protocol
CRC: crc-MessageBatcher.md Spec: protocol.md
CRC: crc-MessageBatcher.md Spec: protocol.md
router
CRC: crc-Router.md Spec: interfaces.md
CRC: crc-Router.md Spec: interfaces.md
server
CRC: crc-BackendSocket.md, crc-ProtocolDetector.md, crc-PacketProtocol.md Spec: deployment.md
CRC: crc-BackendSocket.md, crc-ProtocolDetector.md, crc-PacketProtocol.md Spec: deployment.md
session
CRC: crc-SessionManager.md Spec: interfaces.md, protocol.md
CRC: crc-SessionManager.md Spec: interfaces.md, protocol.md
viewdef
Package viewdef provides viewdef hot-loading support.
Package viewdef provides viewdef hot-loading support.
lib
go
CRC: crc-BackendConnection.md Spec: libraries.md Package uiclient provides a client library for connecting to UI server.
CRC: crc-BackendConnection.md Spec: libraries.md Package uiclient provides a client library for connecting to UI server.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL