a-h / templ

A language for writing HTML user interfaces in Go.
https://templ.guide/
MIT License
7.95k stars 261 forks source link

Will templ be able to form a desktop app? #345

Closed Purple-CSGO closed 8 months ago

Purple-CSGO commented 9 months ago

The way of writing golang directly with html is quite insane and clear, and I'm wondering if this can be used to form a desktop app?

  1. Combine Webview2 and some desktop tools to build up apps
  2. Combine PWA app and the GUI is actually a PWA app with golang as the backend

kind of brainstorming, but really looking forward to some cool stuff :)

a-h commented 9 months ago

Interesting idea. I've seen https://github.com/wailsapp/wails but that uses Vite. Maybe it's possible to switch out the frontend for SSR.

The webview_go bindings look pretty straightforward: https://github.com/webview/webview_go/tree/master/examples/basic