Gooey (pronounced as /'ɡu.i/ or GUI) is divided in three parts:
- A pure Go WebASM bindings framework that bridges the gaps between Go, WebASM and Browser APIs.
- A pure Go Web UI components framework that structures a Web Application, ready for use in local Web Views.
- A pure CSS theme design optimized for accessibility, readability, and light/dark mode support.
- Web Components are great as a separation of feature concept.
- Web Components are bad for web accessibility (e.g.
aria-property fatigue). - Frontend-to-Backend communication is always a redundancy problem.
- Frontend schema safety and validation is always implemented in another language (e.g.
ECMAScript,TypeScript). - Backend schema safety and validation is great with
Marshal/Unmarshal. - Bug-to-bug differences from Frontend and Backend eat up a lot of development time.
- Using online-first Web Apps with slow internet connections is painful.
- Use Go's types, structs and schemas both on the Frontend and on the Backend side.
- Use dynamic Web Components for the Frontend.
- Use static Web Components for the Backend to provide server-side rendering.
- Build offline-first Web Apps with
webview/webviewpointing to a local web server. - Bundle all assets in
/publicviago:embedwithin the application binary.
Gooey uses a Reactive MVC Architecture and embraces the use of a unidirectional flow, meaning it is a circular pattern of state management.
This is a nice architecture pattern for deserialization and serialization of the Schemas into Views, because all custom application code lands in the separated controllers, which each manage their own View, Client, and Storage.
Custom Controllers with even Custom Views are easily integratable this way, because the Reactive MVC Architecture allows to build an App where each of the Views is just a Web Component layer and doesn't need to be touched for most cases.
- ERRATA.md documents the state of known errata and problems of using Go via WebASM.
IMPORTANT: Note that even if you have years of Go development experience, the Errata document is still relevant for you, because it highlights problems when using Go in the Web Browser and the quirks that come with it.
- ARCHITECTURE.md documents the architecture of a Gooey App.
- BINDINGS.md documents the state of implemented Web Bindings.
- COMPONENTS.md documents the state of implemented Web Components.
- TODO.md documents the work-in-progress of things that will be implemented in the near future.
The lint.sh script shows a list of syntax errors, missing build tags and missing files that need to be implemented. That list is a good starting point for contributions.
The examples folder contains minimal demos that show how to use the gooey bindings and components. Each example consists of the following files:
- The
build.shbuilds and serves the example onhttp://localhost:3000. - The
main.gois compiled into amain.wasm. - The
serve.gois the necessary local webserver.
Important: The examples also serve as unit tests, because go test cannot generate
binaries for the syscall/js platform right now. As soon as unit tests are available
upstream via go test -c, the plan is to migrate towards fully integrated unit tests.
- canvas2d
- console
- crypto-aescbc
- cookiestore
- dom
- encoding
- fetch
- history
- location
- navigator
- navigator-geolocation
- storages
- websockets
- app
- app-components
- app-views
- content-fieldset
- content-linechart
- content-piechart
- content-table
- layout
- ui
Changes, Additions and Removals are documented in CHANGELOG.md.
This project is licensed under the MIT license.

