g-sui

Render server-side Go UIs with WebSocket patch updates.

2|Updated May 3, 2025
One-click install
npx skills add https://github.com/michalCapo/g-sui --skill g-sui
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: g-sui
Source: https://github.com/michalCapo/g-sui/tree/main/docs/skills
Command: npx skills add https://github.com/michalCapo/g-sui --skill g-sui

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

g-sui addresses the complexity of building dynamic, server-rendered UIs in Go by centralizing rendering, interaction logic, and state on the server. This approach reduces client-side JavaScript, speeds up development, and simplifies maintenance.

Core Features & Use Cases

  • Server-rendered components: Compose interactive UIs directly from Go strings, without heavy client frameworks.
  • Action-based interactivity: Use server actions (Click, Submit, etc.) to update UI and handle business logic.
  • WebSocket patches: Push real-time updates to the DOM with patch-based swaps, keeping pages snappy.
  • Data & forms: Built-in data tables, filtering, validation, and form helpers to accelerate data-driven apps.
  • Use Case: Build a dashboard with live updates, forms, and a data table where only changed parts are re-rendered.

Quick Start

Install Go 1.21+ and fetch the library, then create a minimal app:

  1. go get github.com/michalCapo/g-sui
  2. Create main.go that uses ui.MakeApp("en"), define a page at "/" returning app.HTML(...), and run with app.Listen(":8080").