GOTHUI / DOCUMENTATION
Ship a single binary.
Embed the assets, build with Go, and let your platform handle routing and TLS.
Build once
templ generate
CGO_ENABLED=0 go build -trimpath -o app .Generate your application’s templ files before the Go build. GothUI’s component Go is already included in the module. The executable contains the stylesheet; no asset directory or frontend toolchain is required at runtime.
Serve the asset route
Keep /gothui/static/ mapped to gothui.AssetHandler(). The handler supplies content-derived ETags and conditional requests. Do not put authenticated user data into shared public caches.
Own the HTTP server
Use timeouts, request-size limits, graceful shutdown, health probes, and your platform’s TLS routing. If a proxy terminates TLS, trust forwarded headers only from that proxy. Set cookies and cross-origin protection according to your deployment.
This website
GothUI’s site uses a non-root container built from Go. Tend deploys the GitHub main branch using the root Dockerfile, port 8080, and health endpoint /healthz. Documentation, examples, and assets ship together.
Version the artifact
Use git describe --tags --long --dirty for development builds after the first tag, and record the exact source revision for deployed artifacts. A green build proves the checks that ran; verify the actual public site and workflows after deployment.