Skip to main content
Mizu is designed to feel natural for Go developers. It keeps things small, clear, and close to the standard library so you can build confidently without learning a new framework language.

Clear routing

Routing follows Go 1.22 patterns and stays compatible with net/http. You can define routes by method and use {param} syntax for path parameters.
app.Get("/users/{id}", showUser)
app.Post("/users", createUser)
Group routes or mix in standard handlers whenever you need flexibility.

Simple request and response helpers

Each handler gets a *mizu.Ctx that makes reading and writing data easy.
id := c.Param("id")
return c.JSON(200, map[string]string{"id": id})
Everything stays explicit—no hidden globals, reflection, or magic.

Composable middleware

Middleware in Mizu is just a function that wraps another handler. You can use it for logging, authentication, or recovery in a few lines of code.
app.Use(func(next mizu.Handler) mizu.Handler {
	return func(c *mizu.Ctx) error {
		start := time.Now()
		err := next(c)
		c.Logger().Info("done", "took", time.Since(start))
		return err
	}
})

Structured logging

Mizu uses Go’s slog for structured logs. You can log details about requests and responses anywhere in your code.
c.Logger().Info("handled request", "path", c.Request().URL.Path)
It supports color text logs for development and JSON logs for production.

Graceful shutdown

Mizu handles shutdown signals automatically and finishes active requests before stopping. You don’t need extra code to manage cleanup or race conditions.

Static files and templates

Serve static assets or HTML templates directly with built-in helpers.
app.Static("/assets/", http.Dir("public"))
For server-rendered pages, mizu/render provides simple template functions that integrate naturally with Go’s html/template.

Streaming and real-time

Mizu works well for streaming, long responses, and real-time updates. You can send chunks or server-sent events easily.
return c.SSE(ch)

Config and CLI

Mizu supports configuration through .env, JSON, or YAML files, and includes a simple CLI for creating and running projects. It’s designed for fast iteration, especially when you want to go from idea to running code quickly.

Small and extensible

Mizu is built around small, focused components. You can extend it with standard libraries or your own packages without losing clarity or performance. Mizu is enjoyable because it lets you write code that stays close to Go. It feels natural, clear, and built for long-term simplicity.