https://github.com/zot/ui-engine
hot-loadable agnostic ui package for desktop apps and rapid prototyping
https://github.com/zot/ui-engine
Last synced: about 1 month ago
JSON representation
hot-loadable agnostic ui package for desktop apps and rapid prototyping
- Host: GitHub
- URL: https://github.com/zot/ui-engine
- Owner: zot
- License: mit
- Created: 2025-12-26T16:36:04.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2026-02-01T04:56:56.000Z (about 2 months ago)
- Last Synced: 2026-02-01T15:53:52.078Z (about 2 months ago)
- Language: Go
- Homepage:
- Size: 906 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ui-engine
**Version: 0.17.2**
**Objects present themselves. You write HTML templates.**
This is not your grandfather's web framework. Traditional frameworks build UIs from pages, routes, and components. ui-engine builds UIs from **objects that present themselves**—a `Contact` renders as a detail view, a list row, an editor, or a dropdown option depending on context. Same object, different presentations.
```
Contact object → presents as:
├── Contact.DEFAULT.html (full detail view)
├── Contact.list-item.html (compact row)
└── Contact.option.html (dropdown option)
```
No frontend JavaScript. No API layers. No state management. Objects ARE the state.
## How It Works
```lua
-- 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
```
```html
Save
```
Modify objects directly. UI updates automatically. No plumbing required.
## Quick Start
```bash
./build/ui-engine-demo --port 8000 --dir demo
```
Open http://localhost:8000 to see the Contact Manager demo.
See [demo/README.md](demo/README.md) for details.
## Documentation
- **[USAGE.md](USAGE.md)** — Complete guide: bindings, events, path properties, ViewList, namespaces
- **[TRADEOFFS.md](TRADEOFFS.md)** — When to use ui-engine vs traditional web architecture
- **[demo/](demo/README.md)** — Working examples (Contact Manager, Simple Adder)
## Key Features
- **Declarative bindings** — `ui-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](https://github.com/zot/frictionless) project. The architecture supports other backends (Go, proxied external programs) but Lua is the priority.