gitmyhub

go-app

Go ★ 8.9k updated 17d ago

A package to build progressive web apps with Go programming language and WebAssembly.

A Go package for building installable Progressive Web Apps entirely in Go, no JavaScript or HTML required, by compiling components to WebAssembly and serving them through Go's standard HTTP model.

GoWebAssemblysetup: moderatecomplexity 3/5

go-app is a Go package that lets developers build Progressive Web Apps, often called PWAs, using the Go programming language and WebAssembly. A PWA is a type of website that can be installed on a device like a regular app, works offline, and can run in its own window separate from a browser tab. go-app makes this possible entirely within Go code, without requiring developers to write JavaScript or HTML directly.

The core idea is a declarative syntax for building user interfaces. Instead of describing a web page in HTML markup, you write Go code that defines what each piece of the page looks like and how it behaves. These pieces are called components. A component might represent a button, a form, a heading, or any section of a page. You assemble components together to build the full interface. The code is then compiled to WebAssembly so it runs in the browser.

go-app fits into Go's standard HTTP model, which is the built-in way Go programs serve web content. You define which URL path shows which component, then start the server with a few lines of code. Because it follows the standard HTTP interfaces, it works alongside other Go web tools without special adapters.

Apps built with go-app can run in standalone windows like desktop applications, support offline use, and are structured in a way that makes their content readable to search engines. The README lists several live apps built with the package, including a lofi music player and a network scanner tool.

Installation requires Go 1.18 or newer and uses Go's standard module system. The README itself is brief and refers readers to a separate documentation site for full guides on getting started, component composition, and advanced usage.

Where it fits