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.

The Request Lifecycle

When a request arrives at your Mizu application, it flows through these components:
Each component has a specific role:

Core Components

App

Server lifecycle, configuration, and health checks.

Routing

URL patterns, path parameters, and route groups.

Handler

Functions that process requests and return responses.

Context

Request/response wrapper with helper methods.

Data Flow

Request

Reading path params, query strings, headers, and body.

Response

Sending JSON, HTML, files, and streaming data.

Cross-Cutting Concerns

Middleware

Composable request processing pipelines.

Error Handling

Centralized error handling and panic recovery.

Logging

Structured logging with Go’s slog package.

Static Files

Serving images, CSS, JavaScript, and embedded files.

How They Work Together

Here’s a minimal example showing all core concepts:

Learning Path

For the best learning experience, follow this order:
  1. App - Understand the server lifecycle
  2. Routing - Learn URL pattern matching
  3. Handler - Write request processing logic
  4. Context - Master the request/response wrapper
  5. Request and Response - Data in and out
  6. Middleware - Add cross-cutting behavior
  7. Error and Logging - Handle problems gracefully