WTH Stack

Server-Side Render Your Desktop Apps

Introducing a new desktop application stack for web developers who love HTML and CSS, but hate JavaScript! The WTH stack allows you to write a fully-featured desktop application using Go. With the WTH stack, you can bring your hypermedia-driven applications to the desktop. The WTH stack embraces the concept of HATEOAS and server-side-rendered UIs.

The WTH Stack

There are three components to the WTH Stack:

What the Hell is This?

Currently, the best option for building HTML/CSS-based desktop applications is Electron with React, but that requires that you write JavaScript. Using JavaScript to render HTML client-side is slow, and thus the industry has been moving towards server-side rendering (SSR). Unfortunately, this move has left desktop applications behind because there's no server to handle rendering.

The WTH stack solves this problem by handling the HTTP requests made by your application using Wails. Wails allows you to provide a standard Go backend which your application UI can interact with as if it were over HTTP.

One major advantage of the WTH stack is that it allows backend-focused developers to build desktop applications using tools and techniques they are already familiar with. It also centralizes the application's state, logic, and rendering in a single place (the backend) which makes the frontend a true view layer (in the MVC sense).

Isn't This Kinda Cursed?


How Do I Get Started?

There is a Wails template for this stack already: PylotLight/wails-htmx-templ-template, however you may find that it has a lot of complexity (Tailwind, Chi, etc.) that you don't need. It's very easy to rip that stuff out.