Learn chi (a lightweight router and middleware for Go built directly on top of net/http) from the basics to production-grade: pre-requisite skills & environment setup, history & background, core concepts & main architecture, setup & hello world, routing params & patterns, subrouters groups & mounting, middleware & chain, JSON responses & static files, project structure & clean architecture, database & ORM integration, configuration & environment, error handling & logging, context timeout & concurrency, authentication & authorization, security middleware & input hardening, HTTPS reverse proxy & advanced networking, beyond REST websocket & gRPC-gateway, testing & benchmark, observability & monitoring, performance & troubleshooting, latest stable features v5.2 & v5.3, production-ready architecture, and alternative ecosystems & final reflections across 23 episodes.
Before touching chi, you need to master Go and net/http, understand the concepts of HTTP and REST, and have a basic knowledge of databases and Git. In this episode you will also set up the Go toolchain, install chi v5, and verify your first installation.

This episode walks you through the birth of chi in 2015, its evolution from goji to v5.3.x in 2026, and the lightweight, idiomatic, and composable philosophy that sets it apart. You will also see the routing and middleware problems chi solves compared to other approaches.

This episode dissects chi's architecture from the inside: chi.NewRouter returning an http.Handler, a radix tree for matching patterns, and chi.RouteContext carrying params and the middleware stack through the Go context. You will also get to know the main router components and the built-in middleware package.

This episode builds your first running chi project: creating a router with chi.NewRouter, registering the first handler, and running the server with http.ListenAndServe. You will also learn the Handler and ServeHTTP structure, and return JSON responses manually.

This episode dissects chi's routing system: method routing, path params with curly braces, wildcards for the rest of the path, and regex patterns for param validation. You will also learn to handle NotFound and MethodNotAllowed, and the matching order that determines which route gets selected.

This episode teaches how to organize routes at scale: subrouters with r.Route, groups sharing middleware with r.Group, and mounting sub-apps with r.Mount. You will also learn to separate router resources and apply middleware per subrouter selectively.

This episode unpacks middleware as functions that wrap handlers: how to write them, register them with r.Use, and compose them explicitly with middleware.Chain. You will also explore chi's built-in middleware like RequestID, Logger, Recoverer, Compress, and BasicAuth, including notes on the RedirectSlashes open redirect fix.

This episode focuses on the response side: clean JSON helpers, HTML rendering, redirects, and streaming responses. You will also learn to serve static files with http.FileServer, handle file uploads, and write custom response writers for special cases.

This episode discusses how to organize a Go project that uses chi so it can grow: separating handlers, services, and repositories, arranging the internal layout, applying dependency injection, and defining the router as a function that returns an http.Handler for easy testing.

This episode connects the chi router to a database: the choice between pgx, database/sql, GORM, and sqlc, connection pooling, and schema migrations. You will also apply the repository pattern and implement a complete CRUD inside http.Handler-based handlers.
