# blade47/hono > AI-generated documentation for github.com/blade47/hono ## Technical docs: Getting Started - [Overview](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/getting-started/overview): Hono is a lightweight web framework built natively on Runtime Adapters and Web Standard request-response interfaces src/index.ts:4-4. By exposing modular components through package export maps in P... - [Quick Start](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/getting-started/quick-start): Hono is a web framework built on Web Standards that provides a fast, lightweight core for building applications capable of running across multiple serverless and edge environments. Designed around ... - [Project Structure](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/getting-started/project-structure): The repository structure of Hono organizes its codebase around clear boundaries for core application logic, execution contexts, platform-specific runtime adapters, pluggable routers, and dual-runti... ## Technical docs: Core Engine - [Application Core](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/core-engine/application-core): The application core of Hono centers around the Hono class and its foundational base HonoBase in [[Application Core]], serving as the central dispatcher and routing engine that handles request life... - [Request Lifecycle](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/core-engine/request-lifecycle): The request lifecycle governs how inbound HTTP requests flow through Hono, starting from native runtime objects or serverless gateway event wrappers src/adapter/aws-lambda/handler.ts:318-342, movin... - [Execution Context](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/core-engine/execution-context): The Context class manages the complete execution lifecycle for incoming HTTP requests src/context.ts. It encapsulates routing parameters, request headers, environment bindings, and response generat... - [Middleware Composition](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/core-engine/middleware-composition): Middleware composition in Hono orchestrates request processing pipelines through recursive dispatching and onion-model execution src/compose.ts:15-72. By combining middleware functions, conditional... - [Presets and Builds](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/core-engine/presets-and-builds): The presets and builds system provides specialized distribution bundles, entry points, and routing optimizations tailored for different runtime performance characteristics and footprint constraints... ## Technical docs: Routing Subsystem - [Router Contracts](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/routing/router-contracts): Hono defines a generic Router Contracts through the Router interface, standardizing how route registration and execution path resolution behave across multiple routing backends Linear and Patter... - [RegExp Router](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/routing/regexp-router): The RegExpRouter implements the unified Router Contracts interface by compiling registered path structures and HTTP method sets into a single optimized regular expression src/router/reg-exp-router/... - [Trie and Smart Routers](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/routing/trie-and-smart-routers): Hono's TrieRouter and SmartRouter deliver hierarchical prefix routing and dynamic dispatch across multiple matching backends. TrieRouter manages route registration through tree node insertion, supp... - [Linear and Pattern Routers](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/routing/linear-and-pattern-routers): Linear and Pattern routers provide lightweight path-matching backends designed to minimize bundle footprints and execution overhead in constrained environments. Operating as alternative routing eng... ## Technical docs: Runtime Adapters - [Runtime Adapters](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/runtime-adapters/runtime-adapters): Runtime Adapters bridge Hono's Web Standard-based Application Core and Execution Context with platform-specific execution environments, request event structures, bindings, and asset-serving facilit... - [Bun Adapter](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/runtime-adapters/bun-adapter): The Bun adapter package exposes public barrel exports including serveStatic, bunFileSystemModule, toSSG, createBunWebSocket, upgradeWebSocket, websocket, getConnInfo, and getBunServer. - [Deno Adapter](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/runtime-adapters/deno-adapter): The Deno Adapter provides runtime integration for running Hono applications within the Deno environment. It bridges Hono's middleware and helper systems with Deno-specific platform APIs, exposing m... ## Technical docs: Security Middleware - [JWT and JWK](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/security-middleware/jwt-and-jwk): Hono provides native JSON Web Token (JWT) and JSON Web Key (JWK) utilities alongside dedicated middleware handlers to authenticate HTTP requests securely across Web Standard runtimes. By leveraging... - [Basic and Bearer Auth](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/security-middleware/basic-and-bearer-auth): Hono provides built-in middleware for HTTP Basic and Bearer Auth to secure API endpoints by validating credentials against static configurations or custom verification handlers. These middlewares i... - [Secure Headers and CORS](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/security-middleware/secure-headers-and-cors): Hono provides robust middleware components for enforcing web security policies and managing cross-origin resource sharing. The secureHeaders middleware injects foundational defense headers such as ... - [CSRF and Body Limit](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/security-middleware/csrf-and-body-limit): Hono provides built-in middleware to protect web applications against Cross-Site Request Forgery (CSRF) and control inbound request payload sizesCSRF Protection Middleware for Hono, Body Limit Midd... - [IP Restriction](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/security-middleware/ip-restriction): The IP restriction middleware restricts incoming HTTP requests by evaluating client IP addresses against configurable allow and deny rules. It processes static IP addresses, CIDR notation subnets f... ## Technical docs: Traffic and Utility Middleware - [ETag and Cache](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/traffic-middleware/etag-and-cache): Hono provides robust ETag and Cache middleware features that optimize HTTP request-response lifecycles through automated cryptographic hashing, conditional validation, and Web Standard Cache API in... - [Response Compression](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/traffic-middleware/response-compression): Hono provides built-in response compression via the compress middleware, allowing applications to reduce network payload sizes by applying compression algorithms such as gzip and deflate. The middl... - [Logger and Timing](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/traffic-middleware/logger-and-timing): The logger middleware intercepts incoming requests, tracks elapsed execution time, and records access logs via configurable print functions. - [Request ID and Language](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/traffic-middleware/request-id-and-language): Hono provides specialized middleware and utilities for tracking requests and managing client localization across web applications. The request ID middleware assigns or propagates unique correlation... - [Trailing Slash and Override](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/traffic-middleware/trailing-slash-and-override): The trailing slash and method override middleware modules provide essential URL normalization and protocol adaptation capabilities for Hono applicationsTrailing Slash and Override. The trimTrailing... - [Context Storage](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/traffic-middleware/context-storage): The Hono context storage mechanism leverages Node.js Execution Context AsyncLocalStorage to maintain request-scoped access to the Execution Context instance across asynchronous call boundaries with... ## Technical docs: JSX and UI Engine - [JSX Runtime](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/jsx-and-ui/jsx-runtime): Hono's JSX runtime provides both server-side rendering and client-side DOM execution models JSX Components and Context, Client DOM and Hooks. It processes functional components and intrinsic tags t... - [JSX Components and Context](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/jsx-and-ui/jsx-components-and-context): Hono's JSX implementation bridges server-side rendering, streaming, and client DOM interaction JSX Runtime, Client DOM and Hooks, JSX Streaming and Suspense. It provides robust APIs for component h... - [JSX Streaming and Suspense](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/jsx-and-ui/jsx-streaming-and-suspense): Hono provides experimental JSX streaming and Suspense capabilities via renderToReadableStream and the Suspense component, enabling server-rendered HTML chunks to be flushed progressively to clients... - [Client DOM and Hooks](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/jsx-and-ui/client-dom-and-hooks): Hono provides a lightweight, React-compatible client DOM rendering and reconciliation engine via hono/jsx/dom that manages browser mounting, state management, and updates. It exposes mounting APIs ... - [CSS Styling](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/jsx-and-ui/css-styling): Hono's CSS styling utilities provide a unified, zero-dependency mechanism for authoring, scoping, hashing, and injecting styles across both server-side template rendering and client-side browser ru... ## Technical docs: Helpers and Tooling - [RPC Client](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/helpers-and-tooling/rpc-client): The RPC client provides a type-safe client interface for Application Core instances via the hc client factory and recursive proxy mechanism. It bridges server route definitions with client-side inv... - [Validation](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/helpers-and-tooling/validation): Hono provides a flexible validation middleware via the validator helper src/validator/index.ts:6, enabling developers to inspect, parse, and validate incoming request data across multiple targets i... - [Streaming and SSE](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/helpers-and-tooling/streaming-and-sse): Hono provides robust streaming primitives and specialized helpers for real-time data delivery, chunked data pipelines, and server-sent events across modern web runtimes. By leveraging underlying We... - [WebSocket Support](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/helpers-and-tooling/websocket-support): WebSocket support in Hono provides a unified, cross-runtime abstraction for establishing, managing, and interacting with persistent bidirectional socket connections. Built around the core WSContext... - [Static Site Generation](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/helpers-and-tooling/static-site-generation): Static site generation (SSG) in Hono compiles application routes into static HTML assets and files through programmatic orchestrators like toSSG and generator functions such as fetchRoutesContent. ... - [Static File Serving](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/helpers-and-tooling/static-file-serving): Hono provides a unified static file serving middleware that bridges web standards with runtime-specific file system and asset APIs across different JavaScript runtimes. By abstracting lower-level f... - [Testing and Dev Tools](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/helpers-and-tooling/testing-and-dev-tools): Hono provides dedicated testing and development utilities designed to streamline application verification and inspection without requiring a running network server. These tools enable developers to... - [Utilities and Encoding](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/technical/helpers-and-tooling/utilities-and-encoding): The Hono framework provides a comprehensive set of low-level utilities and encoding helpers to support core operations, HTTP protocol management, templating, and request handling across diverse Jav... ## User guide: Getting Started - [Installation and Setup](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/getting-started/installation-and-setup): Hono is a web framework built on Web Standards. Because it is designed to run on any JavaScript runtime, you can install it using your favorite package manager and deploy your application across mu... - [Routing and Handlers](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/getting-started/routing-and-handlers): Routing and handlers form the core of any application built with the library. This guide explains how to register HTTP routes, extract path parameters and query strings, chain multiple route handle... ## User guide: How-To Guides - [Configuring Middleware](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/how-to-guides/configuring-middleware): Middleware functions in Hono intercept incoming HTTP requests and outgoing responses. They allow you to attach cross-cutting features—such as security headers, CORS protection, JWT or bearer authen... - [Streaming and SSE](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/how-to-guides/streaming-and-sse): Streaming allows your server to send data to clients piece-by-piece (in chunks) rather than waiting to generate the entire response all at once. This is especially useful for large payloads, real-t... - [Server JSX Rendering](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/how-to-guides/server-jsx-rendering): Hono provides a built-in JSX rendering system that allows developers to build server-side rendered (SSR) web pages and static HTML components using familiar JSX syntax. By combining the jsxRenderer... - [Handling WebSockets](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/how-to-guides/handling-websockets): WebSockets enable real-time, bi-directional communication channels between a client and a server over a single TCP connection. Hono provides built-in WebSocket helper functions that abstract away r... ## User guide: Configuration - [Runtime Adapters](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/configuration/runtime-adapters): Runtime adapters allow you to run and deploy your Hono applications seamlessly across different JavaScript runtimes and serverless platforms like Cloudflare Workers, Node.js, Bun, Deno, AWS Lambda,... - [App Presets Configuration](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/configuration/app-presets-configuration): Hono allows you to customize how your application behaves through initialization options, strict path routing, and lightweight minimal router presets. By selecting specific router presets or config... ## User guide: Troubleshooting - [Errors and Exceptions](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/troubleshooting/errors-and-exceptions): Handling errors cleanly and returning appropriate HTTP responses are crucial parts of building robust web applications. This guide covers how to manage application exceptions using HTTPException, c... - [Testing Hono Apps](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/guide/troubleshooting/testing-hono-apps): Testing Hono applications is straightforward thanks to built-in helper methods and standard Web Standards Request and Response objects. Hono provides the .request() method on application instances ... ## Optional - [Full Documentation](https://www.doc0.dev/docs/552ca36e-f67e-41c3-a07a-def9bd9551b0/llms-full.txt): Complete documentation content in a single file