Burrow¶
A web framework for Go developers who want something like Django, Rails, or Flask — but with the deployment simplicity of a single static binary.
Most Go web development follows the "API backend + SPA frontend" pattern. Burrow takes a different approach: server-rendered HTML with templates, modular apps with their own routes and middleware, and a document database that just works. Deploy with embedded SQLite as a single binary, or connect to PostgreSQL for scale — same code, same API.
Built on Chi, Den (object-document mapper with SQLite and PostgreSQL backends), and Go's standard html/template. Ideal for self-hosted applications, internal tools, or any project where "download, start, use" is the goal.
Why Burrow?
A burrow is a network of interconnected chambers — each with its own purpose, yet part of a larger whole. That's exactly how the framework works: pluggable apps are the rooms, and your gophers live in them.
Note
Burrow is designed for server-rendered web applications, not API-only services. If you're building a JSON API with a separate frontend, a lighter router like Chi on its own is probably a better fit.
Features¶
- Modular app system — register self-contained apps with routes, middleware, document types, and config
- SQLite or PostgreSQL — embedded SQLite (pure Go, no CGO) for single-binary deploys, or PostgreSQL for scale — switch with
--database-dsn - Standard templates — Go's
html/templatewith per-app template files, FuncMaps, and automatic layout wrapping - WebAuthn authentication — passkey-based login with recovery codes and email verification
- Cookie-based sessions — encrypted, signed cookies via
gorilla/securecookie - Internationalization — Accept-Language detection with go-i18n translations
- Content-hashed static files — cache-busting URLs computed at startup
- CSS-agnostic — bring your own CSS framework and layout templates
- Convention over configuration — sensible defaults, override with CLI flags, env vars, or TOML
Minimal Example¶
package main
import (
"context"
"log"
"os"
"github.com/oliverandrich/burrow"
"github.com/oliverandrich/burrow/contrib/healthcheck"
"github.com/oliverandrich/burrow/contrib/session"
"github.com/urfave/cli/v3"
)
func main() {
srv := burrow.NewServer(
session.New(),
healthcheck.New(),
)
cmd := &cli.Command{
Name: "myapp",
Flags: srv.Flags(nil),
Action: srv.Run,
}
if err := cmd.Run(context.Background(), os.Args); err != nil {
log.Fatal(err)
}
}
go mod tidy
go run . --port 8080
curl http://localhost:8080/healthz
# {"database":"ok","status":"ok"}
Quick Links¶
- Installation — get the module and prerequisites
- Quick Start — build a working app in 5 minutes
- Creating an App — build a custom app step by step
- Tutorial — hands-on guide building a polls app from scratch
- Contrib Apps — use the built-in session, auth, i18n, and more
- Configuration Reference — every flag, env var, and TOML key