Getting started
Install go-bananas and stand up a minimal SSR server.
go-bananas is a server-side-rendering web framework plus a small application-infrastructure layer for Go. It is assembled from focused, composable packages rather than a single monolith, so you import only what you need.
Web layer
| Package | Purpose |
|---|---|
render | html/template + text/template renderer with a rich FuncMap and SRI asset tags |
form | Bind, validate, and re-render HTML forms with preserved input and inline errors |
middleware | Composable gorilla/mux middleware + the Authenticator seam |
session · flash · cookiestore | Typed session accessors, one-shot flash messages, hot-reloadable cookie store |
webctx · response | Request-scoped context helpers and HTTP response/error helpers |
i18n | gettext (.po) translations with Accept-Language matching |
Infrastructure layer
| Package | Purpose |
|---|---|
server | Gracefully-stoppable HTTP server |
secrets · keys | Pluggable secret and key managers (filesystem/in-memory core; cloud opt-in) |
cache | Generic, TTL-based in-memory cache |
logging | Context-scoped log/slog logger |
Cross-cutting guides cover Forms (the bind/validate/re-render loop) and
Configuration (composing per-package env-tagged Config
structs with go-envconfig).
These guides walk through each area. For the complete, always-current API, see pkg.go.dev — every headline API there has a runnable example.
Install go-bananas and stand up a minimal SSR server.
Assemble the recommended middleware in the right order.
The renderer, its FuncMap, SRI asset tags, and hot reload.
Secure-cookie sessions, one-shot flash messages, and CSRF protection.
The pluggable auth seam, and wiring OIDC with it.
Pluggable secret and key managers with opt-in cloud providers.
A small, gracefully-stoppable HTTP server.
A generic TTL cache and a context-scoped slog logger.
Translate your templates with gettext (.po) files.
Bind, validate, and re-render HTML forms with preserved input and inline errors.
Compose per-package env-tagged Config structs with go-envconfig — no central config package.