Introduction
Introduction
Steward is a server-rendered admin-panel framework for Go — a ground-up rewrite of the Laravel dcat-admin package. You declare resources with typed builders; Steward renders the grids, forms, and detail pages, enforces roles and permissions, and ships everything — templates, CSS, JavaScript, icons — inside your Go binary.
Why Steward?
Go has excellent web frameworks but no actively maintained, library-style, server-rendered admin panel: the incumbents are dormant, abandoned, or uncustomizable SPAs. Steward fills that gap with a design borrowed from the best of the Laravel ecosystem and rebuilt on Go idioms:
- Generics at the edge —
Register[Post](app)gives youGrid[Post],Form[Post], andDetail[Post]. Hooks receive*Post, not maps. - Declared once — fields are parsed from your GORM model; grids, forms, and detail views project from the same table. Bad column references fail at boot, not in production clicks.
- Server-rendered with htmx — instant-feel navigation without an SPA build; every endpoint also serves JSON for headless use.
- Operable — versioned migrations, RBAC administered in the panel, operation log, and a separately deployable background worker.
At a glance
app, _ := steward.New(steward.Config{DB: db, SecretKey: key})
steward.Register[Author](app) // zero config — full CRUD
posts := steward.Register[Post](app).Title("Posts").Icon("news")
posts.Grid(func(g *steward.Grid[Post]) {
g.Column("Title").Limit(40).Sortable()
g.Column("Status").Badge(map[any]string{"draft": "secondary", "published": "green"})
g.Column("Author.Name", "Author")
g.QuickSearch("Title", "Body")
})
http.ListenAndServe(":8080", app)