g-sui Framework - Server-Rendered Go UI

VerifiedCaution

Go framework for building server-rendered user interfaces. Handles HTML generation, business logic, and state management on the server with interactivity via server actions and WebSocket patches.

Sby Skills Guide Bot
DevelopmentIntermediate
406/2/2026
Claude Code
#go#server-rendered-ui#web-framework#websocket#server-actions

Recommended for

Our review

A server-rendered UI framework for Go that generates HTML server-side and uses WebSocket for real-time updates.

Strengths

  • Server-centric rendering simplifies state management
  • String-based components make composition straightforward
  • Action-based interactivity with WebSocket patches for low-latency updates
  • Comprehensive documentation covering components, data handling, and deployment

Limitations

  • Limited to the Go ecosystem
  • May require a different mindset for highly interactive applications
  • Learning curve for developers accustomed to client-side frameworks
When to use it

When building Go web applications that need server-side rendering, server actions, and real-time updates.

When not to use it

When building a heavy client-side single-page application where a JavaScript framework is more appropriate.

Security analysis

Caution
Quality score80/100

The skill allows Bash for development commands (go run, go test, build) and includes a deploy script that pushes git tags. While no malicious instructions are present, the use of Bash and a tag-pushing script could be misused if prompted maliciously, warranting caution.

No concerns found

Examples

Basic g-sui page
Create a g-sui application with a homepage that displays 'Hello World'.
Form with server action
Add a form in g-sui that submits a name and displays it back on the same page.

name: g-sui description: Server-rendered Go UI framework. Use when building g-sui applications, creating UI components, handling forms with server actions, using data tables, setting up routes, or implementing WebSocket patches. Triggered by "g-sui", "server-rendered UI", "Go UI framework", form handling, or data collation. allowed-tools: Read, Grep, Glob, Bash, Edit, Write

g-sui Framework

Server-rendered UI framework for Go. All HTML generation, business logic, and state management occur on the server. Interactivity achieved through server actions and WebSocket patches.

Quick Start

package main

import "github.com/michalCapo/g-sui/ui"

func main() {
    app := ui.MakeApp("en")

    app.Page("/", func(ctx *ui.Context) string {
        return app.HTML("Home", "bg-gray-100",
            ui.Div("p-8")(
                ui.Div("text-2xl font-bold")("Hello World"),
            ),
        )
    })

    app.Listen(":8080")
}

Documentation Index

| Topic | File | Description | |-------|------|-------------| | Core Concepts | CORE.md | Architecture, Context, Actions, Targets, server rendering | | UI Components | COMPONENTS.md | Buttons, inputs, forms, tables, alerts, cards, tabs, etc. | | Data Management | DATA.md | Data collation, search, sort, filter, pagination, Excel export | | Server Setup | SERVER.md | App initialization, routes, WebSocket, PWA, assets | | Best Practices | PATTERNS.md | Testing, validation, security, state management |

Core Philosophy

  1. Server-Centric Rendering - All HTML generated server-side as strings
  2. String-Based Components - Components are Go functions returning HTML strings
  3. Action-Based Interactivity - User interactions trigger server handlers returning HTML
  4. WebSocket-Enhanced - Real-time updates via /__ws endpoint

Key Types

type Callable = func(*ui.Context) string  // All handlers return HTML
type Attr struct { ID, Class, Value, OnClick, OnSubmit, ... }  // HTML attributes

Common Imports

import "github.com/michalCapo/g-sui/ui"

Development Commands

go run examples/main.go      # Run example app
go test ./...                # Run all tests
go test ./ui/...             # Test UI package
go build                     # Build project
./deploy                     # Create and push new version tag

Releases

To create a new version release:

./deploy

The deploy script automatically:

  • Starts at version v0.100 if no tags exist
  • Increments the minor version by 1 (e.g., v0.100v0.101v0.102)
  • Ensures working tree is clean before tagging
  • Creates an annotated git tag and pushes to remote

Version numbering: v0.XXX format, auto-incremented from v0.100.

Related skills