Notre avis
g-sui est un framework Go qui génère des interfaces utilisateur côté serveur, avec composants réutilisables et interactions via WebSocket.
Points forts
- Tout le rendu HTML est côté serveur, simplifiant la logique client.
- Composants sous forme de fonctions Go renvoyant des chaînes HTML.
- Mises à jour en temps réel via WebSocket.
- Gestion intégrée des formulaires et des actions serveur.
Limites
- Nécessite une bonne connaissance de Go et du rendu serveur.
- Pas de support natif pour des frameworks front-end modernes (React, Vue).
- La documentation supplémentaire est dispersée dans plusieurs fichiers.
Utilisez g-sui lorsque vous développez une application web en Go nécessitant peu de JavaScript et une logique serveur centralisée.
Évitez g-sui si vous avez besoin d'une interactivité client riche ou d'intégration avec des bibliothèques front-end populaires.
Analyse de sécurité
PrudenceThe skill uses Bash for standard Go development tasks (running, testing, building, deploying) without destructive actions. The allowed-tools include Bash, which is powerful but used legitimately.
Aucun point d'attention détecté
Exemples
Create a g-sui application with a homepage showing 'Hello World' and a second page with a form that submits via server action.Add a data table to my g-sui project that supports sorting, filtering, and pagination with WebSocket updates.Implement WebSocket patches in g-sui to push real-time notifications to the UI when new data arrives.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
- Server-Centric Rendering - All HTML generated server-side as strings
- String-Based Components - Components are Go functions returning HTML strings
- Action-Based Interactivity - User interactions trigger server handlers returning HTML
- WebSocket-Enhanced - Real-time updates via
/__wsendpoint
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.100if no tags exist - Increments the minor version by 1 (e.g.,
v0.100→v0.101→v0.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.
Expert Next.js App Router
Developpement
Un skill qui transforme Claude en expert Next.js App Router.
Générateur de README
Developpement
Crée des README.md professionnels et complets pour vos projets.
Rédacteur de Documentation API
Developpement
Génère de la documentation API complète au format OpenAPI/Swagger.