Discussion

Show HN: Gofred – Build responsive web apps in Go with WebAssembly

I've been working on a new approach to web development that lets you build responsive web applications entirely in Go using WebAssembly. I'm excited to share the gofred ecosystem with the community, though I should mention it's still very much in early development with lots of work ahead.

What is gofred?

Gofred is a Go library that compiles to WebAssembly and runs directly in the browser. Instead of writing JavaScript, you write pure Go code and get a small set of primitives for layout, components, routing, and events.

Key features:

WASM-first: Compile Go to WebAssembly and run directly in the browser

Composable widgets: container, row, column, text, image, button, and more

Routing and navigation: Lightweight router and navigation helpers

Responsive layout: Breakpoints and spacing utilities

Hot reload development: Built-in dev server with WebSocket support

Links:

https://gofred.io/ - Official website, live documentation and examples

https://github.com/gofred-io/gofred - The core library (MIT licensed)

https://github.com/gofred-io/gofred-cli - Command-line tool for creating and running apps with hot reload

https://github.com/gofred-io/gofred-website - Website source code

Why I built this:

I wanted to explore what's possible when you treat Go as a first-class language for web development. The result is a small, focused library that gives you the power of Go's type system and tooling while running in the browser.

Current status:

- Core library is stable and MIT licensed

- CLI tool supports cross-platform builds (Windows, macOS, Linux) - Hot reload development server

- Comprehensive documentation - Still under heavy development - there's a lot to do and many features are planned

What's coming:

This is very much a work in progress. I'm actively working on expanding the widget library, improving performance, adding more layout primitives, and building out the developer experience. There's still a lot of work to be done, but I wanted to share the current state and get feedback from the community.

I'd love to hear your thoughts and feedback! What do you think about using Go for frontend development?

1 points gursoyhas 1 year ago 4 comments

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton