GoUI
Server-driven UI
Components in Go, thin browser runtime
An independent implementation inspired by LiveView. 40+ form controls, Blade-like template engine, keyed diff.
Why GoUI?
| Approach | Gain | Cost |
|---|---|---|
| React/Vue SPA | Rich client UX | Duplicate models, build pipeline |
| Classic MPA | Simple HTML | Full page reloads |
| HTMX | Progressive enhancement | Complex state is DIY |
| GoUI | Go component model, live patches | Persistent WS per session |
Features
Component lifecycle
Mount, Render, HandleEvent, Unmount — BaseComponent with dirty tracking and toast.
Diff engine
HTML parse → keyed patches (replace, insert, move, set_attr…) — list diff via data-key.
Forms library
From native controls to OTP, rich text, upload, cascader — validation stays on the server.
Template engine
.goui.html with @extends, @section, @component, @slot — hot reload support.
HTTP adapters
Fiber v3, Gin, Echo, net/http/Chi — framework-agnostic ws.Server.
Prefetch & reconnect
60s grace period session restore; hover/viewport prefetch.
Supported HTTP stacks
Fiber v3GinEchonet/httpChi