magic

Magic is a Golang web framework that simplifies web development.
With under 12kb JavaScript, it's powerful yet easy to use for building
efficient web applications.

Build full-stack applications
without JavaScript

Magic allows you to build applications out of components known from popular libraries like React or Vue.
The components are written in HTML and Go.

main.go
package main import ( "net/http" "github.com/Instantan/magic" ) var indexView = magic.View(`<html> <head><title>Magic</title></head> <body>{{ body }}</body> </html>`) var index = magic.Component(func(s magic.Socket, _ magic.Empty) magic.AppliedView { magic.Assign(s, "body", "Hello World") return indexView(s) }) func main() { http.Handle("/", magic.CompressedComponentHTTPHandler(index)) if err := http.ListenAndServe(":8070"); err != nil { panic(err) } }

Magic is fully server-side renderered.
Don't worry about writing API's, or syncing States.

Realtime out of the Box

State changes are pushed to the client in milliseconds. Build chat-apps, realtime data visualizations and more.
Stop worrying about creating WebSocket connections, reconnecting and heartbeats.
Magic does all of that for you.

Only minimal DOM-Patches are sent over the wire.

Hot reloading baked in

Add hot reloading to your application with only one line of code.
magic.HotReload()
Thanks to Go's fast compiler a hot reload happens in an instant.

SCtrl+