Skip to main content
Mizu is built to feel like Go itself: clear, small, and easy to understand. It adds only the essential tools needed to build real web applications while keeping everything familiar.
You still use standard library types and patterns, but with a simpler structure for routing, context, and middleware.

App

An app is the main entry point of a Mizu project. You can start with a single file or grow it into a larger application. Mizu does not force any layout or configuration style; it provides small, composable parts that scale with your needs.

Routing

Routing defines how your app responds to different paths and methods. You write routes with plain Go functions, without annotations or generators. Everything stays explicit and easy to test, just like with net/http.

Handler

A handler is a small Go function that returns an error. You write your logic directly, and Mizu handles errors or panics safely. This keeps your handlers short, clear, and predictable.

Context

Each incoming request has a Ctx, a small wrapper around http.ResponseWriter and *http.Request. It provides helper methods for headers, responses, and logging, while still giving you access to the original Go objects.

Request

Reading input from a request is simple. You can get path parameters, query values, headers, form data, or JSON with clear, direct methods. There is no reflection, code generation, or hidden behavior.

Response

Sending output works the same way. You can return plain text, JSON, HTML, or serve files directly through Ctx. Everything follows Go’s HTTP design for consistency.

Static

Mizu can serve static files like images, CSS, or JavaScript from a folder or embedded data. It only takes one line to enable and needs no extra setup or plugins.

Logging

Logging in Mizu uses Go’s slog package for structured logs. It provides clean, consistent output for both development and production. You can log from any handler or middleware.

Error

Error handling is centralized in Mizu. You can define a global error handler that catches all returned errors and panics. This keeps your app behavior consistent and your code easy to maintain.