Member-only story
Build a Desktop App in Go Using Wails and React
Go meets Web technologies

Many of us who’ve invested the time and effort to build a nice web application using React or another frontend framework have usually had the thought in the back of our heads at one time or another: “I wonder how hard it would be to create a desktop app just like this?”.
Let’s face it, we all use the web each and every day, and for many developers, it’s how we started getting into programming. While web apps are an awesome way to start building your skills and professional portfolio, sometimes we want to step it up a bit and get into the realm of standalone applications…perhaps even on to packaging and distribution for multiple platforms and devices.
There’s no better way to start than by creating a desktop application from a new or existing project using a web framework you know best! And now you can use these front ends with a super quick, easy to learn, concurrent, and statically typed back end with Go and the Wails framework!
Let’s get started, shall we? Firstly, it’s always important to get all your dependencies set up before setting out to do any projects. Fortunately, there’s not a whole lot to worry about when using Wails to set things up. Two key necessities are:
- Go v1.18+
- npm
If you fancy yourself a yarn
person (like myself), go ahead and make sure you have that as well…which you more than likely do if you’ve gone through building web applications already.
If you’re building your application on Mac, make sure you’ve got Xcode command line tools installed by running xcode-select --install
in a terminal. Wails utilizes native device browser APIs to avoid bundling an entire browser into the final binary, as a result, developers not running Windows 11 will need to make sure to install the WebView2 runtime.
With all that out of the way, the only thing left to do is install the Wails framework by running go install github.com/wailsapp/wails/v2/cmd/wails@latest
. For those planning on doing development on a Linux-based system, make sure to run wails doctor
to check whether you have the proper dependencies installed.