# go-chi/chi

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/go-chi-chi).**

21,700 stars · 1,075 forks · Go · mit

## Links

- GitHub: https://github.com/go-chi/chi
- Homepage: https://go-chi.io
- awesome-repositories: https://awesome-repositories.com/repository/go-chi-chi.md

## Topics

`api` `context` `go` `golang` `http` `microservices` `middleware` `rest-api` `router`

## Description

Chi is a lightweight, idiomatic router and middleware framework for building web services in Go. It is designed to integrate directly with the standard library, providing a set of utilities for managing HTTP request routing, context propagation, and modular service composition.

The project distinguishes itself through a radix-tree-based routing system that supports recursive nesting, allowing developers to mount independent sub-routers onto specific path prefixes. This hierarchical structure enables the creation of organized, modular applications where request handlers are grouped and managed through consistent middleware chains.

The framework provides a comprehensive toolkit for API development, including capabilities for request context management, URL parameter extraction, and role-based access control. It includes built-in utilities for common request processing tasks such as logging, compression, and authentication, which can be composed into sequences to ensure consistent behavior across an entire application.

## Tags

### Web Development

- [HTTP Routers](https://awesome-repositories.com/f/web-development/http-routers.md) — Provides a lightweight, idiomatic router for building modular web services in Go.
- [Middleware Frameworks](https://awesome-repositories.com/f/web-development/middleware-frameworks.md) — Offers a composable framework for managing request processing components like logging and authentication.
- [RESTful APIs](https://awesome-repositories.com/f/web-development/restful-apis.md) — Delivers a toolkit for managing request context, parameters, and routing in RESTful web services.
- [Request Routing](https://awesome-repositories.com/f/web-development/request-routing.md) — Directs incoming network requests to appropriate handlers using a flexible, pattern-based routing system. ([source](https://cdn.jsdelivr.net/gh/go-chi/chi@master/README.md))
- [HTTP Routing](https://awesome-repositories.com/f/web-development/routing-systems/http-routing.md) — Defines structured URL patterns and path parameters to direct traffic to specific handler functions.
- [Middleware Chains](https://awesome-repositories.com/f/web-development/middleware-chains.md) — Provides a structured pipeline for processing HTTP requests through sequences of reusable middleware components.
- [Middleware Orchestration](https://awesome-repositories.com/f/web-development/middleware-orchestration.md) — Orchestrates sequences of request processing logic to handle cross-cutting concerns across application endpoints.
- [Radix Tree Routers](https://awesome-repositories.com/f/web-development/radix-tree-routers.md) — Implements high-performance request routing using a compressed radix tree structure for efficient path matching.
- [Request Context](https://awesome-repositories.com/f/web-development/request-context.md) — Manages request-specific data and state throughout the lifecycle of an incoming network request. ([source](https://cdn.jsdelivr.net/gh/go-chi/chi@master/README.md))
- [Request Context Propagation](https://awesome-repositories.com/f/web-development/request-context-propagation.md) — Facilitates passing metadata and request-scoped state through the middleware stack to final handlers.
- [Request Middleware](https://awesome-repositories.com/f/web-development/request-middleware.md) — Provides built-in utilities for common request processing tasks like compression and authentication. ([source](https://cdn.jsdelivr.net/gh/go-chi/chi@master/README.md))

### Part of an Awesome List

- [Language Toolkits](https://awesome-repositories.com/f/awesome-lists/devtools/language-toolkits.md) — Lightweight, idiomatic router for Go HTTP services.
- [Web Frameworks](https://awesome-repositories.com/f/awesome-lists/devtools/web-frameworks.md) — Lightweight, idiomatic, and composable HTTP router.

### Software Engineering & Architecture

- [Recursive Router Mountings](https://awesome-repositories.com/f/software-engineering-architecture/software-architecture/architectural-patterns/layering-presentation/application-layer-architectures/recursive-router-mountings.md) — Supports mounting independent sub-routers to create modular, hierarchical application structures.

### Security & Cryptography

- [Role-Based Access Control](https://awesome-repositories.com/f/security-cryptography/role-based-access-control.md) — Restricts access to sensitive resources by verifying user permissions against defined roles. ([source](https://github.com/go-chi/chi/blob/master/_examples/rest/routes.md))

### Programming Languages & Runtimes

- [Standard Libraries](https://awesome-repositories.com/f/programming-languages-runtimes/programming-utilities/standard-libraries.md) — Integrates directly with standard library interfaces to ensure compatibility with existing ecosystem tools.
