Full-stack, idiomatic Go,
without the boilerplate.

Fabrik is a full-stack framework that generates the wiring you'd normally hand-write - routing, dependency injection, a runnable server - as idiomatic Go. Framework speed, without the magic.

Prefer the Go toolchain? Install from source with go install

How Fabrik works

Annotate your Go code with a few //fabrik:* directives. fabrik wire scans them and generates main.gen.go: all the wiring your app needs,
as idiomatic Go code, reviewable, without the implicit magic.

web.go - you write this
package web

//fabrik:http GET /hello/{name}
func Hello(w http.ResponseWriter, r *http.Request) {
    fmt.Fprintf(w, "Hello, %s!", r.PathValue("name"))
}
main.gen.go - Fabrik generates the route (abbreviated)
// Code generated by fabrik. DO NOT EDIT.
r := router.New()
r.Method("GET", "/hello/{name}", web.Hello)

server := httpserver.New(r, nil)

Get started in a minute

  1. Install the CLI
    curl -fsSL https://gofabrik.dev/install.sh | sh

    Prefer the Go toolchain? Install from source with go install

  2. Scaffold and run
    fabrik new hello
    cd hello
    fabrik run
  3. Say hello
    curl 'localhost:8080/?name=fabrik'
    # Hello, fabrik!