Go can be used for server-rendered web apps as well as APIs. With templ for views and htmx for browser interactions, it is possible to build an admin UI in a mostly Go-first workflow.
In this series, we will build an e-commerce admin dashboard with Fiber , HTMX , Templ UI , and GORM . Part 1 focuses on the UI foundation: starting a small server, generating UI components, building a landing page, and composing a reusable dashboard layout.
The code samples below are intentionally simplified. They are closer to pseudocode than copy-paste production code, so the focus stays on structure instead of project-specific details.
Prerequisites
Fiber v3
HTMX
_hyperscript
templ
Templ UI
TailwindCSS standalone CLI
GORM
Set up the server
To begin, a very small Fiber server is enough. It only needs to serve static assets, render the landing page, and listen on a port.
func main () { app := fiber . New ()
app . Static ( "/assets" , "./assets" ) app . Get ( "/" , RenderTempl ( LandingPage ))
app .…