# Echo From Zero

Echo is the other name you'll hear constantly in Go web work. Like [Gin](/guides/gin-from-zero), it's a
fast, focused framework over `net/http` - but with a slightly cleaner handler signature, a first-class
error-return style, and a generous set of built-in middleware. If Gin feels like "net/http with helpers,"
Echo feels like "net/http with helpers *and* good manners about errors." Many teams pick it precisely for
that: handlers that *return* an error instead of writing one by hand, and a centralized handler that turns
those errors into HTTP responses.

The mental model is one instance and one context. The **instance** (`echo.Echo`, made with `echo.New()`)
is your application - you register routes and middleware on it and start it. Every request gets an
**`echo.Context`**, the one value that reads input and writes output. The Echo twist worth holding onto:
a handler is `func(c echo.Context) error` - you **return** errors, and Echo's error handler decides what
the client sees. That single design choice shapes how clean Echo apps stay.

> 📝 This teaches the **framework** - it assumes you know **Go** ([Go From Zero](/guides/go-from-zero)).
> It's most illuminating read alongside [Gin](/guides/gin-from-zero) (the closest comparison) and
> [chi](/guides/chi-from-zero) (the minimalist), with the [net/http roots guide](/guides/web-services-with-only-net-http)
> showing the foundation under all three. Echo runs as a Go program, so examples are shown with the
> commands to run them.

## How to read this

Read in order - it grows one service (a small **books API**) from a single route to a tested, deployable
REST API. Phases carry difficulty badges.

## The phases

**Part 1 - The core (🟢 Basic)**
1. **[What Echo Is & Your First Server](01-what-echo-is.md)** 🟢 - the instance, the context, the error-returning handler, and a running server.
2. **[Routing & Groups](02-routing-and-groups.md)** 🟢 - methods, path and query params, and route groups.
3. **[Binding & Validation](03-binding-and-validation.md)** 🟡 - `c.Bind`, struct tags, and plugging in a validator.

**Part 2 - A real API (🟡 → 🔴)**
4. **[Responses & Rendering](04-responses-and-rendering.md)** 🟡 - `c.JSON`, status codes, templates, and static files.
5. **[Middleware](05-middleware.md)** 🟡 - the middleware signature, built-ins (Logger/Recover/CORS), and writing your own.
6. **[A REST API with Error Handling](06-rest-api-and-errors.md)** 🔴 - full CRUD plus Echo's centralized `HTTPErrorHandler`.

**Part 3 - Ship it (🟡 → 🟢)**
7. **[Testing & Production](07-testing-and-production.md)** 🟡 - `httptest` with Echo, graceful shutdown, and deployment.
8. **[Where to Go Next](08-where-to-go-next.md)** 🟢 - Echo vs Gin/chi, when to drop to net/http, and what to build.

> The throughline: an **instance** holds your routes, a **context** handles each request, and handlers
> **return errors** for a central handler to render. That error style is Echo's whole personality.
