Gallery · Architecture explained · Score · TypeScript
Hono architecture: modules, API surface, dependency graph
Web framework built on Web Standards. Generated from honojs/hono at 5ca49b0, MIT.
- Files
- 188
- Modules
- 19
- API routes
- 53
- Documents
- 17
TypeScriptNode.js
Executive Summary
At a Glance
| Aspect | Summary |
|---|---|
| What | Hono is a well-structured API service |
| Built With | general-purpose + TypeScript, Node.js |
| Scale | 19 modules across 188 files |
| Maturity | Well-structured (2/3 indicators) |
What This System Does
Hono is a general-purpose API service built with TypeScript, Node.js. It exposes 53 API endpoints, designed for programmatic access by client applications, mobile apps, or external services.
Business Capabilities
The system is organized around 7 functional domains, each representing a distinct business capability:
| Domain | Capability | Scale |
|---|---|---|
| Other | Uncategorized module | 12 modules, 56 files |
| Shared Utilities | path src/utils matches util | 2 modules, 52 files |
| Integrations | path src/adapter matches adapter | 1 modules, 37 files |
| API Layer | path src/middleware matches middleware | 1 modules, 36 files |
| Services | path src/client matches client | 1 modules, 5 files |
| State Management | path src/context.ts matches context | 1 modules, 1 files |
| +1 more | Additional functional areas | — |
Technical Foundation
| Layer | Technologies | Purpose |
|---|---|---|
| Language | TypeScript, Node.js | Primary development language |
| Build | esbuild | Compilation and bundling |
| Testing | Vitest | Quality assurance |
Module Composition
The codebase follows a layered architecture with clear separation of concerns:
| Layer | Count | Key Modules | Responsibility |
|---|---|---|---|
| integration | 1 | adapter | Supporting application functionality |
| middleware | 1 | middleware | Supporting application functionality |
| Other Modules | 10 | jsx, client | General purpose functionality |
| Shared Libraries | 2 | utils, helper | Provides shared utilities and abstractions used across modules |
| Route/Page Modules | 1 | router | Maps URL paths to page components and handles navigation |
Codebase Health
Overall Health: 🟡 60/100
| Metric | Value | Status |
|---|---|---|
| Internal imports | 288 edges | ✅ Connected |
| External Packages | 0 | ✅ Manageable |
| Circular Dependencies | 5 | 🔴 5 detected |
| Orphan Files | 19 | ⚠️ 19 unused |
Key Insights
- 🔴 Architectural concern — 5 circular dependencies detected. These create tight coupling and make testing difficult.
- ⚠️ Potential dead code — 19 files (10%) are not imported anywhere.
Key Data Flows
The system processes information through 7 identified flows:
- dom Request Flow (critical) — Import chain starting from
src/jsx/dom— traces how this entry point depends on 1 downstream module - bun Request Flow (critical) — Import chain starting from
src/adapter/bun— traces how this entry point depends on 1 downstream module - css Request Flow (critical) — Import chain starting from
src/helper/css— traces how this entry point depends on 1 downstream module - deno Request Flow — Import chain starting from
src/adapter/deno— traces how this entry point depends on 3 downstream modules - jsx-runtime Request Flow — Import chain starting from
src/jsx/jsx-runtime— traces how this entry point depends on 2 downstream modules
Strategic Observations
- The codebase follows Middleware pipeline — `src/middleware`, Shared utility layer — `src/utils`, `src/helper`; high fan-in, Integration adapters — `src/adapter`, ⚠️ 5 circular dependency cycle(s) detected architectural patterns, providing a familiar structure for developers.
- With 7 distinct domains, the system has clear separation of concerns suitable for team-based development.
This executive summary was generated from comprehensive repository analysis including dependency graphs, data flow detection, and architectural pattern recognition. Enable AI enhancement with `GITHUB_TOKEN` for strategic recommendations, risk assessments, and plain-language explanations tailored for non-technical stakeholders.
<!-- repolens:docs-badge -->  · Examples
System Overview
The Big Picture
Hono is a focused codebase with a clear purpose, containing 19 modules spread across 188 files.
| Dimension | Details |
|---|---|
| Total Files | 188 |
| Module Count | 19 |
| Functional Domains | 7 |
| API Endpoints | 53 |
Technology Stack
The system is built on a modern technology foundation:
| Layer | Technologies | Purpose |
|---|---|---|
| Language | TypeScript, Node.js | Primary development language |
| Build | esbuild | Compilation and asset processing |
| Quality | Vitest | Automated testing |
Architecture Patterns
The codebase follows 4 identified architectural patterns:
- Middleware pipeline — `src/middleware` — A structured approach to organizing code and managing complexity.
- Shared utility layer — `src/utils`, `src/helper`; high fan-in — A structured approach to organizing code and managing complexity.
- Integration adapters — `src/adapter` — A structured approach to organizing code and managing complexity.
- ⚠️ 5 circular dependency cycle(s) detected — A structured approach to organizing code and managing complexity.
Module Architecture
The system is organized into 5 architectural layers:
| Layer | Modules | Key Examples | Responsibility |
|---|---|---|---|
| integration | 1 | adapter | Supporting application functionality |
| middleware | 1 | middleware | Supporting application functionality |
| Other Modules | 10 | jsx, client | General purpose functionality |
| Shared Libraries | 2 | utils, helper | Provides shared utilities and abstractions used across modules |
| Route/Page Modules | 1 | router | Maps URL paths to page components and handles navigation |
Layer Details
integration — 1 module
src/adapter— 37 files — Core application module
middleware — 1 module
src/middleware— 36 files — Request/response middleware
Other Modules — 10 modules
src/jsx— 27 files — Core application modulesrc/client— 5 files — Core application modulesrc/validator— 3 files — Core application modulesrc/preset— 2 files — Core application module- +6 more modules
Shared Libraries — 2 modules
src/utils— 27 files — Utility and helper functionssrc/helper— 25 files — Utility and helper functions
Route/Page Modules — 1 module
src/router— 16 files — API layer and route handlers
Functional Domains
The following domains represent the largest functional areas by file count:
| Rank | Domain | Scale | Business Capability |
|---|---|---|---|
| 1 | Other | 56 files | Uncategorized module |
| 2 | Shared Utilities | 52 files | path src/utils matches util |
| 3 | Integrations | 37 files | path src/adapter matches adapter |
| 4 | API Layer | 36 files | path src/middleware matches middleware |
| 5 | Services | 5 files | path src/client matches client |
| 6 | State Management | 1 files | path src/context.ts matches context |
| — | +1 more | — | Additional domains |
Route Summary
The system surfaces 50 API endpoints (GET, POST, ALL, DELETE).
API Endpoints (50)
| Endpoint | Methods | Purpose |
|---|---|---|
/ | GET | Data operations |
/ | GET | Data operations |
/json | GET | Data operations |
/ | GET | Data operations |
/ | GET | Data operations |
/ | GET | Data operations |
* | GET | Data operations |
/ | GET | Data operations |
| +42 more | — | Additional endpoints |
Dependency Graph
Codebase Health: 🟡 60/100
| Metric | Value | Assessment |
|---|---|---|
| Internal Imports | 288 | Modules are connected |
| External Packages | 0 | Lean dependencies |
| Circular Dependencies | 5 | ⚠️ Needs attention |
| Orphan Files | 19 | ⚠️ 19 unused |
This system overview was generated from comprehensive repository analysis. Enable AI enhancement with `GITHUB_TOKEN` for narrative context, architectural rationale, technology trade-off analysis, and scalability recommendations.
<!-- repolens:docs-badge -->  · Examples
Business Domains
Overview
Hono is organized into 7 functional domains, each representing a distinct area of business capability. This document maps the technical structure to business-oriented functional areas.
Quick Reference:
| Domain | Modules | Files | Primary Capability |
|---|---|---|---|
| Other | 12 | 56 | Supporting business operations |
| Shared Utilities | 2 | 52 | Cross-cutting utility functions |
| Integrations | 1 | 37 | Supporting business operations |
| API Layer | 1 | 36 | External API interface layer |
| Services | 1 | 5 | Supporting business operations |
| State Management | 1 | 1 | Application state and data flow management |
| Search & Discovery | 1 | 1 | Search and content discovery |
1. Other
Business Capability
Uncategorized module
This is a major domain with 12 modules and 56 source files.
Key Modules
| Module | Purpose |
|---|---|
src/jsx | Core application module |
src/router | API layer and route handlers |
src/validator | Core application module |
src/preset | Core application module |
src/compose.ts | Core application module |
User-Facing Interfaces
API Endpoints:
- 🔌
/itty-router/*[ALL] — Data operations
Business Impact
- Change Frequency Impact: High — Changes here affect 56 files
- Domain Complexity: Complex (multiple modules)
- Recommendation: Ensure comprehensive testing before modifying this domain
2. Shared Utilities
Business Capability
path src/utils matches util
This is a major domain with 2 modules and 52 source files.
Key Modules
| Module | Purpose |
|---|---|
src/utils | Utility and helper functions |
src/helper | Utility and helper functions |
Business Impact
- Change Frequency Impact: High — Changes here affect 52 files
- Domain Complexity: Simple
- Recommendation: Ensure comprehensive testing before modifying this domain
3. Integrations
Business Capability
path src/adapter matches adapter
This is a significant domain with 1 module and 37 source files.
Key Modules
| Module | Purpose |
|---|---|
src/adapter | Core application module |
Business Impact
- Change Frequency Impact: Medium — Changes here affect 37 files
- Domain Complexity: Simple
4. API Layer
Business Capability
path src/middleware matches middleware
This is a significant domain with 1 module and 36 source files.
Key Modules
| Module | Purpose |
|---|---|
src/middleware | Request/response middleware |
Business Impact
- Change Frequency Impact: Medium — Changes here affect 36 files
- Domain Complexity: Simple
5. Services
Business Capability
path src/client matches client
This is a focused domain with 1 module and 5 source files.
Key Modules
| Module | Purpose |
|---|---|
src/client | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 5 files
- Domain Complexity: Simple
6. State Management
Business Capability
path src/context.ts matches context
This is a focused domain with 1 module and 1 source file.
Key Modules
| Module | Purpose |
|---|---|
src/context.ts | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 1 file
- Domain Complexity: Simple
7. Search & Discovery
Business Capability
path src/index.ts matches index
This is a focused domain with 1 module and 1 source file.
Key Modules
| Module | Purpose |
|---|---|
src/index.ts | Core application module |
Business Impact
- Change Frequency Impact: Low — Changes here affect 1 file
- Domain Complexity: Simple
Domain Health Summary
| Metric | Value | Assessment |
|---|---|---|
| Total Domains | 7 | Well-balanced |
| Avg Files/Domain | 27 | Appropriate size |
| Largest Domain | Other (56 files) | Reasonable |
| Domain Concentration | 30% in largest | ✅ Well distributed |
Domain mapping is based on directory naming conventions and code organization patterns. Enable AI enhancement with `GITHUB_TOKEN` for business-language descriptions, stakeholder impact analysis, strategic recommendations, and cross-domain relationship narratives.
<!-- repolens:docs-badge -->  · Examples
Architecture Overview
Architectural Philosophy
Hono follows a Middleware pipeline — `src/middleware` architecture with elements of Shared utility layer — `src/utils`, `src/helper`; high fan-in, Integration adapters — `src/adapter`, ⚠️ 5 circular dependency cycle(s) detected.
Pattern Analysis
Middleware pipeline — `src/middleware`
A structured approach to organizing code and managing complexity.
Benefits: Structured organization, maintainability, clarity
Shared utility layer — `src/utils`, `src/helper`; high fan-in
A structured approach to organizing code and managing complexity.
Benefits: Structured organization, maintainability, clarity
Integration adapters — `src/adapter`
A structured approach to organizing code and managing complexity.
Benefits: Structured organization, maintainability, clarity
⚠️ 5 circular dependency cycle(s) detected
A structured approach to organizing code and managing complexity.
Benefits: Structured organization, maintainability, clarity
System Layers
The system is organized into 7 functional layers, each encapsulating a distinct area of responsibility:
| Layer | Responsibility | Scale | Key Insight |
|---|---|---|---|
| Other | Uncategorized module | 56 files | Standard domain |
| Shared Utilities | path src/utils matches util | 52 files | Shared infrastructure — high reuse |
| Integrations | path src/adapter matches adapter | 37 files | Single large module — evaluate decomposition |
| API Layer | path src/middleware matches middleware | 36 files | Single large module — evaluate decomposition |
| Services | path src/client matches client | 5 files | Standard domain |
| State Management | path `src/context | 1 files | Standard domain |
| Search & Discovery | path `src/index | 1 files | Standard domain |
Module Layers
Modules are classified into 5 architectural roles:
integration
Role: Supporting application functionality
| Module | Files | Description |
|---|---|---|
src/adapter | 37 | Core application module |
middleware
Role: Supporting application functionality
| Module | Files | Description |
|---|---|---|
src/middleware | 36 | Request/response middleware |
Other Modules
Role: General purpose functionality
| Module | Files | Description |
|---|---|---|
src/jsx | 27 | Core application module |
src/client | 5 | Core application module |
src/validator | 3 | Core application module |
src/preset | 2 | Core application module |
src/compose.ts | 1 | Core application module |
| +5 more | — | Additional modules |
Shared Libraries
Role: Provides shared utilities and abstractions used across modules
| Module | Files | Description |
|---|---|---|
src/utils | 27 | Utility and helper functions |
src/helper | 25 | Utility and helper functions |
Route/Page Modules
Role: Maps URL paths to page components and handles navigation
| Module | Files | Description |
|---|---|---|
src/router | 16 | API layer and route handlers |
Technology Foundation
| Layer | Technologies | Architectural Implication |
|---|---|---|
| Language | TypeScript, Node.js | Static typing enables tooling and refactoring confidence |
| Build | esbuild | Modern bundling and optimization |
| Quality | Vitest | Enables confident refactoring |
Scale & Complexity Analysis
| Dimension | Value | Assessment |
|---|---|---|
| Total Files | 188 | large project |
| Module Count | 19 | low complexity |
| Domain Spread | 7 domains | Good separation |
| API Surface | 53 endpoints | Large API |
Dependency Health
Architecture Health Score: 🟡 60/100
| Metric | Value | Status | Recommendation |
|---|---|---|---|
| Import Edges | 288 | ✅ | Healthy module connectivity |
| External Packages | 0 | ✅ | Lean dependency set |
| Circular Deps | 5 | 🔴 | Refactor to break cycles |
| Orphan Files | 19 | ⚠️ | Review for dead code |
Architectural Strengths
- Testing infrastructure — Automated testing with Vitest supports confident evolution.
Concerns
- Circular dependencies detected — 5 circular dependencies create tight coupling, complicate testing, and hinder refactoring. Priority: High.
This architecture overview was generated from comprehensive dependency graph analysis and pattern detection. Enable AI enhancement with `GITHUB_TOKEN` for architectural narratives, design rationale explanations, scalability analysis, and refactoring recommendations.
<!-- repolens:docs-badge -->  · Examples
Module Catalog
A complete inventory of all code modules in the repository, organized by location and size. Each module represents a distinct area of responsibility within the codebase.
Total modules: 19
Module Inventory
| Module | Files | Role |
|---|---|---|
src/adapter | 37 | Application module · Orchestrator (coordinates 12 modules) |
src/middleware | 36 | Request middleware and interceptors · Orchestrator (coordinates 43 modules) |
src/jsx | 27 | Application module · Orchestrator (coordinates 11 modules) |
src/utils | 27 | Shared utilities and helper functions · Critical shared infrastructure (imported by 48 modules) |
src/helper | 25 | Application module · Critical shared infrastructure (imported by 20 modules) |
src/router | 16 | Application module · Shared infrastructure (imported by 13 modules) |
src/client | 5 | Application module · Connector (2 in, 1 out) |
src/validator | 3 | Application module |
src/preset | 2 | Application module · Orchestrator (coordinates 6 modules) |
src/compose.ts | 1 | Application module |
src/context.ts | 1 | Application module |
src/hono-base.ts | 1 | Application module |
src/hono.ts | 1 | Application module |
src/http-exception.ts | 1 | Application module |
src/index.ts | 1 | Application module |
src/request.ts | 1 | Application module |
src/router.ts | 1 | Application module |
src/types.ts | 1 | Type definitions and interfaces |
src/request | 1 | Application module · Connector (3 in, 3 out) |
Module detection is based on the `module_roots` setting in your RepoLens configuration. Adjust this setting to change how modules are grouped.
<!-- repolens:docs-badge -->  · Examples
Route Map
A complete listing of user-facing pages and backend API endpoints. This map shows every URL a user or client can interact with, along with the source file that handles each route.
API Endpoints (53)
Backend services that handle data operations and business logic.
| Method | Path | Source File |
|---|---|---|
| GET | / | src/adapter/aws-lambda/conninfo.ts |
| GET | / | src/adapter/aws-lambda/handler.ts |
| GET | /json | src/adapter/aws-lambda/handler.ts |
| GET | / | src/adapter/cloudflare-pages/conninfo.ts |
| GET | / | src/adapter/netlify/conninfo.ts |
| GET | / | src/adapter/service-worker/index.ts |
| GET | * | src/context.ts |
| GET | / | src/context.ts |
| GET | /welcome | src/context.ts |
| GET | /say | src/context.ts |
| GET | /api | src/context.ts |
| GET | /redirect | src/context.ts |
| GET | /redirect-permanently | src/context.ts |
| GET | /notfound | src/context.ts |
| GET | /www1.example.com/hello | src/hono-base.ts |
| GET | /hello | src/hono-base.ts |
| POST | /auth | src/http-exception.ts |
| GET | / | src/index.ts |
| POST, GET | / | src/request.ts |
| GET | /about/me | src/request.ts |
| GET | /search | src/request.ts |
| POST | /entry | src/request.ts |
| GET | /posts/:id | src/request.ts |
| POST | /forward | src/request.ts |
| GET | /users | src/helper/accepts/accepts.ts |
| GET, ALL | /proxy/:path | src/helper/proxy/index.ts |
| GET | /internal-proxy/:path | src/helper/proxy/index.ts |
| GET | /posts/:id | src/helper/route/index.ts |
| GET | /auth/page | src/middleware/basic-auth/index.ts |
| GET | /api/page | src/middleware/bearer-auth/index.ts |
| GET | / | src/middleware/context-storage/index.ts |
| ALL | /api/abc | src/middleware/cors/index.ts |
| ALL | /api2/abc | src/middleware/cors/index.ts |
| GET | /etag/abc | src/middleware/etag/index.ts |
| GET | / | src/middleware/ip-restriction/index.ts |
| GET | /page/about | src/middleware/jsx-renderer/index.ts |
| GET | /page/info | src/middleware/jsx-renderer/index.ts |
| GET | /auth/page | src/middleware/jwk/jwk.ts |
| GET | /auth/page | src/middleware/jwt/jwt.ts |
| GET | / | src/middleware/language/language.ts |
| GET | / | src/middleware/logger/index.ts |
| GET, POST | /hello | src/middleware/method-not-allowed/index.ts |
| DELETE | /posts | src/middleware/method-override/index.ts |
| GET | /hello | src/middleware/mount/index.ts |
| ALL | /itty-router/* | src/middleware/mount/index.ts |
| ALL | /app/* | src/middleware/mount/index.ts |
| GET | / | src/middleware/pretty-json/index.ts |
| GET | / | src/middleware/request-id/request-id.ts |
| GET | /long-request | src/middleware/timeout/index.ts |
| GET | / | src/middleware/timing/timing.ts |
| GET | /about/me/ | src/middleware/trailing-slash/index.ts |
| GET | /my-path/* | src/middleware/trailing-slash/index.ts |
| GET | /unknown | src/utils/http-status.ts |
Paths starting with `/api/` are backend endpoints; all others are user-facing pages.
<!-- repolens:docs-badge -->  · Examples
API Surface
This page documents both the API endpoints the application exposes and the external services it integrates with. Use it as a reference for understanding the system's interfaces.
Internal API Endpoints
These are the backend services the application provides to handle incoming requests.
Total endpoints: 53
| Method | Path | Implementation |
|---|---|---|
| GET | / | src/adapter/aws-lambda/conninfo.ts |
| GET | / | src/adapter/aws-lambda/handler.ts |
| GET | /json | src/adapter/aws-lambda/handler.ts |
| GET | / | src/adapter/cloudflare-pages/conninfo.ts |
| GET | / | src/adapter/netlify/conninfo.ts |
| GET | / | src/adapter/service-worker/index.ts |
| GET | * | src/context.ts |
| GET | / | src/context.ts |
| GET | /welcome | src/context.ts |
| GET | /say | src/context.ts |
| GET | /api | src/context.ts |
| GET | /redirect | src/context.ts |
| GET | /redirect-permanently | src/context.ts |
| GET | /notfound | src/context.ts |
| GET | /www1.example.com/hello | src/hono-base.ts |
| GET | /hello | src/hono-base.ts |
| POST | /auth | src/http-exception.ts |
| GET | / | src/index.ts |
| POST, GET | / | src/request.ts |
| GET | /about/me | src/request.ts |
| GET | /search | src/request.ts |
| POST | /entry | src/request.ts |
| GET | /posts/:id | src/request.ts |
| POST | /forward | src/request.ts |
| GET | /users | src/helper/accepts/accepts.ts |
| GET, ALL | /proxy/:path | src/helper/proxy/index.ts |
| GET | /internal-proxy/:path | src/helper/proxy/index.ts |
| GET | /posts/:id | src/helper/route/index.ts |
| GET | /auth/page | src/middleware/basic-auth/index.ts |
| GET | /api/page | src/middleware/bearer-auth/index.ts |
| GET | / | src/middleware/context-storage/index.ts |
| ALL | /api/abc | src/middleware/cors/index.ts |
| ALL | /api2/abc | src/middleware/cors/index.ts |
| GET | /etag/abc | src/middleware/etag/index.ts |
| GET | / | src/middleware/ip-restriction/index.ts |
| GET | /page/about | src/middleware/jsx-renderer/index.ts |
| GET | /page/info | src/middleware/jsx-renderer/index.ts |
| GET | /auth/page | src/middleware/jwk/jwk.ts |
| GET | /auth/page | src/middleware/jwt/jwt.ts |
| GET | / | src/middleware/language/language.ts |
| GET | / | src/middleware/logger/index.ts |
| GET, POST | /hello | src/middleware/method-not-allowed/index.ts |
| DELETE | /posts | src/middleware/method-override/index.ts |
| GET | /hello | src/middleware/mount/index.ts |
| ALL | /itty-router/* | src/middleware/mount/index.ts |
| ALL | /app/* | src/middleware/mount/index.ts |
| GET | / | src/middleware/pretty-json/index.ts |
| GET | / | src/middleware/request-id/request-id.ts |
| GET | /long-request | src/middleware/timeout/index.ts |
| GET | / | src/middleware/timing/timing.ts |
| GET | /about/me/ | src/middleware/trailing-slash/index.ts |
| GET | /my-path/* | src/middleware/trailing-slash/index.ts |
| GET | /unknown | src/utils/http-status.ts |
External API Integrations
Third-party services the application connects to, grouped by category.
Package Management
| Service | Detected In |
|---|---|
| npm Registry | src/adapter/cloudflare-workers/serve-static.ts |
Documented Exports
Exported functions with JSDoc/TSDoc documentation. Documentation coverage: 38%
⚠️ Deprecated Functions
isContentEncodingBinaryinsrc/adapter/aws-lambda/handler.ts:hono/aws-lambdawill be removed in v5. Install@hono/aws-lambdaand import from there instead.handleinsrc/adapter/vercel/handler.ts:hono/vercelwill be removed in v5. Install@hono/verceland import from there instead.SSG_DISABLED_RESPONSEinsrc/helper/ssg/middleware.ts: UseX_HONO_DISABLE_SSG_HEADER_KEYinstead. This constant will be removed in the next minor version.
Function Documentation
src/adapter/aws-lambda/handler.ts
`isContentEncodingBinary()` ⚠️
src/adapter/vercel/handler.ts
`handle()` ⚠️
src/client/fetch-result-please.ts
`fetchRP()`
Smartly parses and return the consumable result from a fetch Response. Throwing a structured error if the response is not ok. ({@link DetailedError})
src/helper/ssg/middleware.ts
`SSG_DISABLED_RESPONSE()` ⚠️
src/jsx/streaming.ts
`renderToReadableStream()`
src/middleware/cache/index.ts
`cache()`
Cache Middleware for Hono.
Parameters:
options(Object): The options for the cache middleware.options.cacheName(string | Function): The name of the cache. Can be used to store multiple caches with different identifiers.options.wait(boolean) (optional): =false] - A boolean indicating if Hono should wait for the Promise of thecache.putfunction to resolve before continuing with the request. Required to be true for the Deno environment.options.cacheControl(string) (optional): A string of directives for theCache-Controlheader.options.vary(string | string[]) (optional): Adds the configured request headers to the cache key variants and sets theVaryheader in the response. If the original response header already contains aVaryheader, the values are merged, removing any duplicates.options.keyGenerator(Function) (optional): Generates keys for every request in thecacheNamestore. This can be used to cache data based on request parameters or context parameters. QUERY keys additionally include a digest of the request content and its representation metadata.options.maxQueryBodySize(number) (optional): =65536] - The maximum QUERY request body size in bytes that can be cached. Larger QUERY requests bypass the cache.options.cacheableStatusCodes(number[]) (optional): =[200]] - An array of status codes that can be cached.options.onCacheNotAvailable(Function | false) (optional): A callback invoked with the reason whenglobalThis.cachesis not available or QUERY caching cannot use Web Crypto. By default, the reason is logged to the console. Set tofalseto suppress the log, or provide a custom function.
Returns: MiddlewareHandler — The middleware handler function.
Throws:
- {Error} If the
varyoption includes "*".
src/middleware/ip-restriction/index.ts
`ipRestriction()`
IP Restriction Middleware for Hono.
Parameters:
getIP(GetConnInfo | ((c: Context) => string)): A function to retrieve the client IP address. UsegetConnInfofrom the appropriate runtime adapter.rules(IPRestrictionRules): An object with optionaldenyListandallowListarrays of IP rules. Each rule can be a static IP, a CIDR range, or a custom function.
Returns: MiddlewareHandler — The middleware handler function.
src/middleware/jwk/jwk.ts
`jwk()`
JWK Auth Middleware for Hono.
Parameters:
options(object): The options for the JWK middleware.options.keys(HonoJsonWebKey[] | ((ctx: Context) => Promise<HonoJsonWebKey[]> | HonoJsonWebKey[])) (optional): The public keys used for JWK verification, or a function that returns them.options.jwks_uri(string | ((ctx: Context) => Promise<string> | string)) (optional): If set to a URI string or a function that returns a URI string, attempt to fetch JWKs from it. The response must be a JSON object containing akeysarray, which will be merged with thekeysoption.options.allow_anon(boolean) (optional): If set totrue, the middleware allows requests without a token to proceed without authentication.options.cookie(string) (optional): If set, the middleware attempts to retrieve the token from a cookie with these options (optionally signed) only if no token is found in the header.options.headerName(string) (optional): ='Authorization'] - The name of the header to look for the JWT token. Default is 'Authorization'.options.realm(string) (optional): The protection space described by therealmparameter of the returnedWWW-Authenticatechallenge header. Defaults to the request URL.options.alg(AsymmetricAlgorithm[]): An array of allowed asymmetric algorithms for JWT verification. Only tokens signed with these algorithms will be accepted.init(RequestInit) (optional): Optional init options for thefetchrequest when retrieving JWKS from a URI.options.verification(VerifyOptions) (optional): Additional options for JWK payload verification.
Returns: MiddlewareHandler — The middleware handler function.
src/middleware/language/language.ts
`parseAcceptLanguage()`
Parse Accept-Language header values with quality scores
Parameters:
header(any): Accept-Language header string
Returns: void — Array of parsed languages with quality scores
`detectFromHeader()`
Detects language from Accept-Language header
`detectFromPath()`
Detects language from URL path
`validateOptions()`
Validate detector options
Parameters:
options(any): Detector options to validate
Throws:
- Error if options are invalid
src/middleware/request-id/request-id.ts
`requestId()`
Request ID Middleware for Hono.
Parameters:
options(object): Options for Request ID middleware.options.limitLength(number) (optional): =255] - The maximum length of request id.options.headerName(string) (optional): =X-Request-Id] - The header name used in request id.options.generator(generator) (optional): =() => crypto.randomUUID()] - The request id generation function.
Returns: MiddlewareHandler — The middleware handler function.
src/middleware/timing/timing.ts
`startTime()`
Start a timer for the timing middleware.
Parameters:
c(Context): The context of the request.name(string): The name of the timer.description(string) (optional): The description of the timer.
`endTime()`
End a timer for the timing middleware.
Parameters:
c(Context): The context of the request.name(string): The name of the timer.precision(number) (optional): The precision of the timer value.
src/utils/color.ts
`getColorEnabled()`
Get whether color change on terminal is enabled or disabled. If NO_COLOR environment variable is set, this function returns false. Unlike getColorEnabledAsync(), this cannot check Cloudflare environment variables.
Returns: boolean
`getColorEnabledAsync()`
Get whether color change on terminal is enabled or disabled. If NO_COLOR environment variable is set, this function returns false.
Returns: boolean
Documentation Summary:
- Total exports: 45
- Documented: 17
- Undocumented: 28
- Coverage: 38%
HTTP method reference — GET: retrieve data, POST: create, PUT/PATCH: update, DELETE: remove.
<!-- repolens:docs-badge -->  · Examples
Data Flows
Understanding Data Movement
Data flows describe how information moves through Hono — from external inputs through processing layers to storage or presentation. Understanding these flows is essential for debugging, performance optimization, and architectural decisions.
Flow Summary
7 data flows identified in the codebase:
| Flow | Type | Complexity | Critical |
|---|---|---|---|
| dom Request Flow | Integration | Low (2 steps) | 🔴 Yes |
| bun Request Flow | Integration | Low (2 steps) | 🔴 Yes |
| css Request Flow | Integration | Low (2 steps) | 🔴 Yes |
| deno Request Flow | Integration | Medium (4 steps) | — |
| jsx-runtime Request Flow | Integration | Medium (3 steps) | — |
| Authentication Flow | Integration | Medium (5 steps) | 🔴 Yes |
| API Integration Flow | Integration | Medium (5 steps) | — |
1. dom Request Flow 🔴 CRITICAL FLOW
Description
Import chain starting from src/jsx/dom — traces how this entry point depends on 1 downstream module
Characteristics
| Property | Value |
|---|---|
| Steps | 2 |
| Modules Involved | 2 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | dom (entry point, imports 10 modules) | Data acquisition |
| 2 | constants (shared infrastructure, used by 13 files) | Processing step |
Flow Diagram
┌─ START ─┐
│ `dom` (entry point, imports 10 modules) │
│ ↓
│ `constants` (shared infrastructure, used by 13 ... │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
dom | Core application module |
constants | Core application module |
Dependencies
Shared libraries used: src/utils
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
2. bun Request Flow 🔴 CRITICAL FLOW
Description
Import chain starting from src/adapter/bun — traces how this entry point depends on 1 downstream module
Characteristics
| Property | Value |
|---|---|
| Steps | 2 |
| Modules Involved | 2 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | bun (entry point, imports 5 modules) | Data acquisition |
| 2 | server (leaf — no further dependencies) | Processing step |
Flow Diagram
┌─ START ─┐
│ `bun` (entry point, imports 5 modules) │
│ ↓
│ `server` (leaf — no further dependencies) │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
bun | Core application module |
server | Core application module |
Dependencies
Shared libraries used: src/utils
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
3. css Request Flow 🔴 CRITICAL FLOW
Description
Import chain starting from src/helper/css — traces how this entry point depends on 1 downstream module
Characteristics
| Property | Value |
|---|---|
| Steps | 2 |
| Modules Involved | 2 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | css (entry point, imports 5 modules) | Data acquisition |
| 2 | constants (shared infrastructure, used by 13 files) | Processing step |
Flow Diagram
┌─ START ─┐
│ `css` (entry point, imports 5 modules) │
│ ↓
│ `constants` (shared infrastructure, used by 13 ... │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
css | Utility and helper functions |
constants | Core application module |
Dependencies
Shared libraries used: src/utils
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
4. deno Request Flow
Description
Import chain starting from src/adapter/deno — traces how this entry point depends on 3 downstream modules
Characteristics
| Property | Value |
|---|---|
| Steps | 4 |
| Modules Involved | 4 |
| Criticality | Standard |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | deno (entry point, imports 4 modules) | Data acquisition |
| 2 | serve-static → imports 1 module | Data acquisition |
| 3 | serve-static → imports 5 modules | Data acquisition |
| 4 | url (shared infrastructure, used by 9 files) | Processing step |
Flow Diagram
┌─ START ─┐
│ `deno` (entry point, imports 4 modules) │
│ ↓
│ `serve-static` → imports 1 module │
│ ↓
│ `serve-static` → imports 5 modules │
│ ↓
│ `url` (shared infrastructure, used by 9 files) │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
deno | Core application module |
serve-static | Core application module |
serve-static | Request/response middleware |
url | Utility and helper functions |
Dependencies
Shared libraries used: src/utils
Insights
- Standard integration flow with 4 processing steps
5. jsx-runtime Request Flow
Description
Import chain starting from src/jsx/jsx-runtime — traces how this entry point depends on 2 downstream modules
Characteristics
| Property | Value |
|---|---|
| Steps | 3 |
| Modules Involved | 3 |
| Criticality | Standard |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | jsx-runtime (entry point, imports 4 modules) | Data acquisition |
| 2 | html (shared infrastructure, used by 9 files) | Processing step |
| 3 | html (shared infrastructure, used by 8 files) | Processing step |
Flow Diagram
┌─ START ─┐
│ `jsx-runtime` (entry point, imports 4 modules) │
│ ↓
│ `html` (shared infrastructure, used by 9 files) │
│ ↓
│ `html` (shared infrastructure, used by 8 files) │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
jsx-runtime | Core application module |
html | Utility and helper functions |
html | Utility and helper functions |
Dependencies
Shared libraries used: src/utils
Insights
- Standard integration flow with 3 processing steps
6. Authentication Flow 🔴 CRITICAL FLOW
Description
User authentication and session management
Characteristics
| Property | Value |
|---|---|
| Steps | 5 |
| Modules Involved | 0 |
| Criticality | Critical |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | User submits login credentials | Security check |
| 2 | Auth API validates credentials | Input validation |
| 3 | Session is created and stored | Data persistence |
| 4 | User is redirected to authenticated area | Security check |
| 5 | Subsequent requests include auth token | Security check |
Flow Diagram
┌─ START ─┐
│ User submits login credentials │
│ ↓
│ Auth API validates credentials │
│ ↓
│ Session is created and stored │
│ ↓
│ User is redirected to authenticated area │
│ ↓
│ Subsequent requests include auth token │
└─ END ───┘
Dependencies
Shared libraries used: src/utils
External services: Authentication service
Insights
- ⚠️ Critical path — Failures here have significant business impact
- 📊 Consider adding monitoring and alerting
- 🧪 Ensure comprehensive test coverage
7. API Integration Flow
Description
External service integrations and backend processing
Characteristics
| Property | Value |
|---|---|
| Steps | 5 |
| Modules Involved | 1 |
| Criticality | Standard |
Processing Steps
| Step | Action | Purpose |
|---|---|---|
| 1 | Frontend makes API request | Processing step |
| 2 | API route receives and validates request | Input validation |
| 3 | Business logic is executed | Observability |
| 4 | External services may be called | Processing step |
| 5 | Response is formatted and returned | Output generation |
Flow Diagram
┌─ START ─┐
│ Frontend makes API request │
│ ↓
│ API route receives and validates request │
│ ↓
│ Business logic is executed │
│ ↓
│ External services may be called │
│ ↓
│ Response is formatted and returned │
└─ END ───┘
Involved Modules
| Module | Role |
|---|---|
53 API endpoints detected | API layer and route handlers |
Dependencies
Shared libraries used: src/utils
Insights
- Standard integration flow with 5 processing steps
Import Network
The system has 288 internal import edges connecting 188 source files.
Network Topology
| Metric | Value | Meaning |
|---|---|---|
| Total Edges | 288 | Direct import relationships |
| Hub Count | 0 | Central integration points |
| Avg Connections | ~1.5 per file | Coupling density |
Flow detection uses naming conventions, import patterns, and dependency graph analysis. Enable AI enhancement with `GITHUB_TOKEN` for end-to-end flow narratives, failure mode analysis, data transformation descriptions, and performance bottleneck identification.
<!-- repolens:docs-badge -->  · Examples
Architecture Diff
No changes detected.
<!-- repolens:docs-badge -->  · Examples
System Map
What is this? This visual diagram shows how different parts of your codebase connect to each other. Arrows indicate dependencies (which modules use which).
Showing: 19 modules and 43 relationships
Source: Real import analysis
Architecture Diagram
┌─────────────────────────────────────────────────────────────┐
│ 🏗️ SYSTEM ARCHITECTURE MAP │
└─────────────────────────────────────────────────────────────┘
🎯 CLI ENTRY
│
└── client (5 files)
→ utils
│
🔌 INTEGRATION
│
└── adapter (37 files)
→ utils
→ middleware
→ helper
... +2 more
│
📄 PAGES / ROUTES
│
├── router (16 files)
└── router.ts (1 file)
→ router
→ utils
│
🔀 MIDDLEWARE
│
└── middleware (36 files)
→ http-exception.ts
→ utils
→ request.ts
... +6 more
│
🛠️ UTILITIES
│
├── utils (27 files)
│ → helper
└── helper (25 files)
→ utils
→ jsx
→ hono.ts
... +5 more
│
📦 OTHER
│
├── jsx (27 files)
│ → helper
│ → utils
├── validator (3 files)
│ → helper
│ → http-exception.ts
│ → utils
├── preset (2 files)
│ → hono-base.ts
│ → router.ts
├── compose.ts (1 file)
├── context.ts (1 file)
│ → request.ts
│ → utils
├── hono-base.ts (1 file)
│ → compose.ts
│ → context.ts
│ → router
│ ... +1 more
├── hono.ts (1 file)
│ → hono-base.ts
│ → router.ts
├── http-exception.ts (1 file)
├── index.ts (1 file)
├── request.ts (1 file)
│ → http-exception.ts
│ → utils
├── types.ts (1 file)
└── request (1 file)
│
Legend:
→ imports / depends on
╌→ tests
Key Connections
Most depended-on modules (highest import count):
| Module | Imported by |
|---|---|
utils | 48 modules |
helper | 20 modules |
http-exception.ts | 12 modules |
router | 11 modules |
router.ts | 9 modules |
Most dependent modules (highest dependency count):
| Module | Depends on |
|---|---|
middleware | 43 modules |
helper | 22 modules |
adapter | 12 modules |
jsx | 11 modules |
router.ts | 11 modules |
<!-- repolens:docs-badge -->  · Examples
Developer Onboarding
Welcome to Hono! 👋
This guide will help you get up to speed quickly. Hono is a general-purpose tools project built with TypeScript, Node.js, containing 19 modules across 188 files.
What You'll Learn
- ✅ Repository structure and organization
- ✅ Technology stack and tools
- ✅ Key modules to understand first
- ✅ How data flows through the system
- ✅ How to start contributing
Quick Reference Card
| Aspect | Details |
|---|---|
| Languages | TypeScript, Node.js |
| Frameworks | general-purpose tools |
| Build Tools | esbuild |
| Testing | Vitest |
| Size | 19 modules, 188 files |
| Domains | 7 functional areas |
| API | 53 endpoints |
Repository Structure
Understanding the directory layout is your first step to navigating the codebase:
| Directory | Purpose | Start Here? |
|---|---|---|
src | Application source code | ⭐ Yes |
Where to Begin
Focus on these directories first:
- `src` — Application source code
Technology Stack
| Layer | Technologies | What to Learn |
|---|---|---|
| Language | TypeScript, Node.js | Strong typing — check types when debugging |
| Build | esbuild | Understand the build pipeline |
| Testing | Vitest | Run existing tests to understand behavior |
Core Modules to Understand
These are the most important modules by size and centrality. Understanding them will unlock the rest of the codebase:
| Priority | Module | Files | Type | Why It Matters |
|---|---|---|---|---|
| ⭐ High | src/adapter | 37 | integration | Large module — core functionality |
| ⭐ High | src/middleware | 36 | middleware | Large module — core functionality |
| ⭐ High | src/jsx | 27 | Other Modules | Large module — core functionality |
| Medium | src/utils | 27 | Shared Libraries | Shared code — reused throughout |
| Medium | src/helper | 25 | Shared Libraries | Shared code — reused throughout |
| Medium | src/router | 16 | Route/Page Modules | Key system component |
| Low | src/client | 5 | Other Modules | Key system component |
| Low | src/validator | 3 | Other Modules | Key system component |
| Low | src/preset | 2 | Other Modules | Key system component |
| Low | src/compose.ts | 1 | Other Modules | Key system component |
Key Routes
Understanding the routing structure helps you trace user interactions through the system.
API Endpoints
| Endpoint | Methods | File | Purpose |
|---|---|---|---|
/ | GET | src/adapter/aws-lambda/conninfo.ts | Data operations |
/ | GET | src/adapter/aws-lambda/handler.ts | Data operations |
/json | GET | src/adapter/aws-lambda/handler.ts | Data operations |
/ | GET | src/adapter/cloudflare-pages/conninfo.ts | Data operations |
/ | GET | src/adapter/netlify/conninfo.ts | Data operations |
/ | GET | src/adapter/service-worker/index.ts | Data operations |
| +44 more | — | — | Additional endpoints |
How Data Flows
Understanding these flows helps you see how the system processes information end-to-end:
| Flow | Description | Key Modules |
|---|---|---|
| dom Request Flow | Import chain starting from src/jsx/dom — traces how this e... | dom, constants |
| bun Request Flow | Import chain starting from src/adapter/bun — traces how th... | bun, server |
| css Request Flow | Import chain starting from src/helper/css — traces how thi... | css, constants |
| deno Request Flow | Import chain starting from src/adapter/deno — traces how t... | deno, serve-static |
| jsx-runtime Request Flow | Import chain starting from src/jsx/jsx-runtime — traces ho... | jsx-runtime, html |
Debugging tip: When investigating issues, trace the data flow from input to output to identify where problems occur.
Getting Started Checklist
Follow these steps to set up your development environment:
1. Clone and Install
git clone <repository-url>
cd hono
npm install # or yarn, pnpm
2. Explore the Structure
- Review the directory structure above
- Open the
README.mdfor project-specific instructions - Look for
CONTRIBUTING.mdfor contribution guidelines
3. Understand Core Modules
Start with the high-priority modules listed above. Read the code and comments to understand:
- What problem each module solves
- How modules interact with each other
- What data structures are used
4. Run the Tests
npm test # or: npx vitest run
Running tests helps you:
- Verify your setup is correct
- See expected behavior documented in test cases
- Understand module interfaces through test examples
5. Make Your First Change
Start small:
- Find a small bug or typo to fix
- Make the change in a feature branch
- Run tests to ensure nothing breaks
- Submit a pull request for review
Common Pitfalls
New contributors often run into these issues:
- Circular dependencies — This codebase has 5 circular imports. Be careful not to introduce more.
- Environment setup — Check for
.env.examplefiles and ensure you have all required environment variables. - Branch naming — Follow the team's branch naming conventions (usually
feature/,fix/,docs/).
Additional Resources
| Resource | Purpose |
|---|---|
README.md | Project overview and quick start |
CONTRIBUTING.md | Contribution guidelines (if exists) |
CHANGELOG.md | Recent changes and release history |
package.json | Available scripts and dependencies |
This onboarding guide was generated from comprehensive repository analysis. Enable AI enhancement with `GITHUB_TOKEN` for narrative walkthroughs, common pitfall documentation, debugging tips, architecture deep-dives, and personalized contribution recommendations.
Welcome to the team! Happy coding! 🚀
<!-- repolens:docs-badge -->  · Examples
GraphQL Schema
No GraphQL schema was detected in this repository.
RepoLens scans for .graphql and .gql schema files, inline SDL via tagged template literals (e.g. gql\...\``), resolver patterns, and popular GraphQL libraries including Apollo, Yoga, Nexus, Pothos, Mercurius, type-graphql, Relay, and urql.
If your project uses GraphQL, ensure the relevant source directories are included in your scan.include configuration.
<!-- repolens:docs-badge -->  · Examples
TypeScript Type Graph
80 file(s) with type declarations · 165 interface(s) · 59 type alias(es) · 28 class(es) · 3 enum(s) · 216 relationship(s)
This document maps the type system of the project, showing how interfaces, classes, and type aliases relate to one another. Understanding these relationships helps navigate the codebase and identify coupling between modules.
Interfaces
165 interfaces define the data contracts used across the application:
| Interface | Extends | Source |
|---|---|---|
LatticeProxyEventV2 | — | src/adapter/aws-lambda/handler.ts |
APIGatewayProxyEventV2 | — | src/adapter/aws-lambda/handler.ts |
APIGatewayProxyEvent | — | src/adapter/aws-lambda/handler.ts |
ALBProxyEvent | — | src/adapter/aws-lambda/handler.ts |
CognitoIdentity | — | src/adapter/aws-lambda/types.ts |
ClientContext | — | src/adapter/aws-lambda/types.ts |
ClientContextClient | — | src/adapter/aws-lambda/types.ts |
ClientContextEnv | — | src/adapter/aws-lambda/types.ts |
LambdaContext | — | src/adapter/aws-lambda/types.ts |
ClientCert | — | src/adapter/aws-lambda/types.ts |
Identity | — | src/adapter/aws-lambda/types.ts |
ApiGatewayRequestContext | — | src/adapter/aws-lambda/types.ts |
Authorizer | — | src/adapter/aws-lambda/types.ts |
ApiGatewayRequestContextV2 | — | src/adapter/aws-lambda/types.ts |
ALBRequestContext | — | src/adapter/aws-lambda/types.ts |
LatticeRequestContextV2 | — | src/adapter/aws-lambda/types.ts |
BunWebSocketData | — | src/adapter/bun/websocket.ts |
CloudFrontHeader | — | src/adapter/lambda-edge/handler.ts |
CloudFrontHeaders | — | src/adapter/lambda-edge/handler.ts |
CloudFrontCustomOrigin | — | src/adapter/lambda-edge/handler.ts |
CloudFrontS3Origin | — | src/adapter/lambda-edge/handler.ts |
CloudFrontRequest | — | src/adapter/lambda-edge/handler.ts |
CloudFrontResponse | — | src/adapter/lambda-edge/handler.ts |
CloudFrontConfig | — | src/adapter/lambda-edge/handler.ts |
CloudFrontEvent | — | src/adapter/lambda-edge/handler.ts |
CloudFrontEdgeEvent | — | src/adapter/lambda-edge/handler.ts |
Callback | — | src/adapter/lambda-edge/handler.ts |
CloudFrontResult | — | src/adapter/lambda-edge/handler.ts |
ExtendableEvent | Event | src/adapter/service-worker/types.ts |
FetchEvent | ExtendableEvent | src/adapter/service-worker/types.ts |
Response | ClientResponse | src/client/types.ts |
CallbackOptions | — | src/client/types.ts |
ExecutionContext | — | src/context.ts |
ContextVariableMap | — | src/context.ts |
ContextRenderer | — | src/context.ts |
DefaultRenderer | — | src/context.ts |
NewResponse | — | src/context.ts |
BodyRespond | — | src/context.ts |
TextRespond | — | src/context.ts |
JSONRespond | — | src/context.ts |
HTMLRespond | — | src/context.ts |
SetHeadersOptions | — | src/context.ts |
SetHeaders | — | src/context.ts |
RouterRoute | — | src/types.ts |
NotFoundResponse | — | src/types.ts |
HTTPResponseError | Error | src/types.ts |
Accept | — | src/helper/accepts/accepts.ts |
acceptsConfig | — | src/helper/accepts/accepts.ts |
acceptsOptions | acceptsConfig | src/helper/accepts/accepts.ts |
ConnInfo | — | src/helper/conninfo/types.ts |
GetCookie | — | src/helper/cookie/index.ts |
GetSignedCookie | — | src/helper/cookie/index.ts |
CssClassName | — | src/helper/css/common.ts |
CssEscapedString | — | src/helper/css/common.ts |
CssType | — | src/helper/css/index.ts |
CxType | — | src/helper/css/index.ts |
KeyframesType | — | src/helper/css/index.ts |
ViewTransitionType | — | src/helper/css/index.ts |
StyleType | — | src/helper/css/index.ts |
DefaultContextType | — | src/helper/css/index.ts |
ShowRoutesOptions | — | src/helper/dev/index.ts |
RouteData | — | src/helper/dev/index.ts |
ProxyFetch | — | src/helper/proxy/index.ts |
SSGParam | — | src/helper/ssg/middleware.ts |
SSGParamsMiddleware | — | src/helper/ssg/middleware.ts |
FileSystemModule | — | src/helper/ssg/ssg.ts |
ToSSGResult | — | src/helper/ssg/ssg.ts |
SSGPlugin | — | src/helper/ssg/ssg.ts |
ToSSGOptions | — | src/helper/ssg/ssg.ts |
ToSSGInterface | — | src/helper/ssg/ssg.ts |
FilterStaticGenerateRouteData | — | src/helper/ssg/utils.ts |
SSEMessage | — | src/helper/streaming/sse.ts |
SendOptions | — | src/helper/websocket/index.ts |
WebSocketHelperDefineContext | — | src/helper/websocket/index.ts |
ElementChildrenAttribute | — | src/jsx/base.ts |
IntrinsicAttributes | — | src/jsx/base.ts |
CSSProperties | — | src/jsx/intrinsic-elements.ts |
JSXAttributes | — | src/jsx/intrinsic-elements.ts |
EventAttributes | — | src/jsx/intrinsic-elements.ts |
HTMLAttributes | JSXAttributes, EventAttributes, AnyAttributes | src/jsx/intrinsic-elements.ts |
AnchorHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
AudioHTMLAttributes | MediaHTMLAttributes | src/jsx/intrinsic-elements.ts |
AreaHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
BaseHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
BlockquoteHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
ButtonHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
CanvasHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
ColHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
ColgroupHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
DataHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
DetailsHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
DelHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
DialogHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
EmbedHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
FieldsetHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
FormHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
HtmlHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
IframeHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
ImgHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
InsHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
InputHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
KeygenHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
LabelHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
LiHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
LinkHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
MapHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
MenuHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
MediaHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
MetaHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
MeterHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
QuoteHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
ObjectHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
OlHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
OptgroupHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
OptionHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
OutputHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
ParamHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
ProgressHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
SlotHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
ScriptHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
SelectHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
SourceHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
StyleHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
TableHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
TextareaHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
TdHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
ThHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
TimeHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
TrackHTMLAttributes | HTMLAttributes | src/jsx/intrinsic-elements.ts |
VideoHTMLAttributes | MediaHTMLAttributes | src/jsx/intrinsic-elements.ts |
IntrinsicElements | — | src/jsx/intrinsic-elements.ts |
Root | — | src/jsx/dom/client.ts |
CreateCssJsxDomObjectsType | — | src/jsx/dom/css.ts |
CssType | — | src/jsx/dom/css.ts |
CxType | — | src/jsx/dom/css.ts |
KeyframesType | — | src/jsx/dom/css.ts |
ViewTransitionType | — | src/jsx/dom/css.ts |
DefaultContextType | — | src/jsx/dom/css.ts |
RenderToStringOptions | — | src/jsx/dom/server.ts |
RenderToReadableStreamOptions | — | src/jsx/dom/server.ts |
CompressionOptions | — | src/middleware/compress/index.ts |
CSRFOptions | — | src/middleware/csrf/index.ts |
IPRestrictionRules | — | src/middleware/ip-restriction/index.ts |
ContextVariableMap | JwtVariables | src/middleware/jwt/index.ts |
ContextVariableMap | LanguageVariables | src/middleware/language/index.ts |
DetectorOptions | — | src/middleware/language/language.ts |
LanguageVariables | — | src/middleware/language/language.ts |
PrettyOptions | — | src/middleware/pretty-json/index.ts |
ContextVariableMap | RequestIdVariables | src/middleware/request-id/index.ts |
ContextVariableMap | SecureHeadersVariables | src/middleware/secure-headers/index.ts |
ContentSecurityPolicyOptions | — | src/middleware/secure-headers/secure-headers.ts |
ReportToOptions | — | src/middleware/secure-headers/secure-headers.ts |
ReportToEndpoint | — | src/middleware/secure-headers/secure-headers.ts |
ReportingEndpointOptions | — | src/middleware/secure-headers/secure-headers.ts |
SecureHeadersOptions | — | src/middleware/secure-headers/secure-headers.ts |
ContextVariableMap | TimingVariables | src/middleware/timing/index.ts |
Timer | — | src/middleware/timing/timing.ts |
TimingOptions | — | src/middleware/timing/timing.ts |
SetMetric | — | src/middleware/timing/timing.ts |
Context | — | src/router/reg-exp-router/node.ts |
Accept | — | src/utils/accept.ts |
ParseBody | — | src/utils/body.ts |
Pool | — | src/utils/concurrent.ts |
HonoJsonWebKey | JsonWebKey | src/utils/jwt/jws.ts |
TokenHeader | — | src/utils/jwt/jwt.ts |
Classes
28 classes provide concrete implementations:
| Class | Extends | Implements | Source |
|---|---|---|---|
FetcherLike | — | — | src/adapter/cloudflare-pages/handler.ts |
ClientRequestImpl | — | — | src/client/client.ts |
DetailedError | Error | — | src/client/fetch-result-please.ts |
HTTPException | Error | — | src/http-exception.ts |
UnsupportedPathError | Error | — | src/router.ts |
FetchEventLike | — | — | src/types.ts |
SSEStreamingApi | StreamingApi | — | src/helper/streaming/sse.ts |
JSXNode | — | HtmlEscaped | src/jsx/base.ts |
JSXFunctionNode | JSXNode | — | src/jsx/base.ts |
JSXFragmentNode | JSXNode | — | src/jsx/base.ts |
Node | — | — | src/router/reg-exp-router/node.ts |
Trie | — | — | src/router/reg-exp-router/trie.ts |
StreamingApi | — | — | src/utils/stream.ts |
JwtAlgorithmNotImplemented | Error | — | src/utils/jwt/types.ts |
JwtAlgorithmRequired | Error | — | src/utils/jwt/types.ts |
JwtAlgorithmMismatch | Error | — | src/utils/jwt/types.ts |
JwtTokenInvalid | Error | — | src/utils/jwt/types.ts |
JwtTokenNotBefore | Error | — | src/utils/jwt/types.ts |
JwtTokenExpired | Error | — | src/utils/jwt/types.ts |
JwtTokenIssuedAt | Error | — | src/utils/jwt/types.ts |
JwtTokenIssuer | Error | — | src/utils/jwt/types.ts |
JwtHeaderInvalid | Error | — | src/utils/jwt/types.ts |
JwtHeaderRequiresKid | Error | — | src/utils/jwt/types.ts |
JwtSymmetricAlgorithmNotAllowed | Error | — | src/utils/jwt/types.ts |
JwtAlgorithmNotAllowed | Error | — | src/utils/jwt/types.ts |
JwtTokenSignatureMismatched | Error | — | src/utils/jwt/types.ts |
JwtPayloadRequiresAud | Error | — | src/utils/jwt/types.ts |
JwtTokenAudience | Error | — | src/utils/jwt/types.ts |
Type Aliases
59 type aliases define computed or composite types:
| Type | References | Source |
|---|---|---|
LambdaEvent | APIGatewayProxyEvent, APIGatewayProxyEventV2, ALBProxyEvent, LatticeProxyEventV2, Install, LatticeRequestContextV2, When, HTTP, API, Lambda, ApiGatewayRequestContextV2, Gateway, ApiGatewayRequestContext, Application, Load, Balancer, ALBRequestContext, WithHeaders, WithMultiValueHeaders, APIGatewayProxyResult, LambdaEvent, ReadableStreamDefaultReader, Uint8Array, AsyncGenerator, NodeJS, WritableStream, E, Env, S, Schema, BasePath, Hono, Handler, LambdaContext, Check, Update, HttpResponseStream, Internal, Server, HandleOptions, Converts, AWS, Accepts, ALB, Function, URLs, The, Optional, A, If, Hello, JSON, With, L, TypeError, Response, Invalid, EventProcessor, Headers, Request, RequestInit, TextEncoder, EventV2Processor, Cookie | src/adapter/aws-lambda/handler.ts |
Params | P, Cloudflare, Workers | src/adapter/cloudflare-pages/handler.ts |
PagesFunction | EventContext, Env, Params, Data, Response, Cloudflare, Workers | src/adapter/cloudflare-pages/handler.ts |
CloudFrontOrigin | CloudFrontS3Origin | src/adapter/lambda-edge/handler.ts |
CloudFrontContext | Install, Callback, CloudFrontRequest, CloudFrontResult, AmazonCloudFront, DeveloperGuide, Accepts, Lambda, Edge, Headers, CloudFrontHeaders, Hono, CloudFrontEdgeEvent, CloudFrontContext, Response, Reads, CloudFront, The, Fail, CloudFrontEvent, Records, TypeError, Unable, Request, Uint8Array, ArrayBuffer, TextEncoder, GET, HEAD | src/adapter/lambda-edge/handler.ts |
MethodNameAll | METHOD_NAME_ALL_LOWERCASE, Type, HTTP, StandardMethods, METHODS, Expands, If, ExpandAllMethod, S, MethodNameAll, M, HonoRequest, Hono, BuildSearchParamsFn, URLSearchParams, ClientRequestOptions, T, ConstructorParameters, WebSocket, Standard, RequestInit, Custom, By, You, ClientRequest, Prefix, Path, Schema, Endpoint, R, HasRequiredKeys, ClientResponseOfEndpoint, Arg, P, Q | src/client/types.ts |
ClientResponseOfEndpoint | T, O, F, S, ClientResponse, ResponseFormat, U, StatusCode, ReadableStream, SuccessStatusCode, Exclude, Headers, Response, Uint8Array, ArrayBuffer, Blob, FormData, BuildSearch, Arg, Key, K, Query, IsEmptyObject, BuildPathname, P, Param, ApplyParam, TrimStartSlash, BuildPath, BuildTypedURL, Protocol, Host, Port, TypedURL, HonoURL, Prefix, Path, IsLiteral, TrimEndSlash, Rest, Hostname, ParseHostName, URL, R, Result, Head, Value, Pathname, Search, Fetch, InferRequestType, ClientRequestOptions, ClientResponseOfEndpoint, InferEndpointType, NonNullable | src/client/types.ts |
HeaderRecord | Content, Type, BaseMime, ResponseHeader, Data, ArrayBuffer, Blob, Uint8Array, ReadableStream, Interface, ExecutionContext, Extends, A, Allows, For, Wrangler, ContextVariableMap, ContextRenderer, DefaultRenderer, The, Response, Renderer, Function, Extracts, PropsForRenderer, Parameters, Props, Layout, T, E, Environment, Get, Env, Key, Variables, NewResponse, StatusCode, HeaderRecord, ResponseOrInit, BodyRespond, U, ContentfulStatusCode, TypedResponse, TextRespond, An, JSON, JSONRespond, JSONRespondReturn, JSONValue, InvalidJSONValue, JSONParsed, HTML, Optional, HTTP, HTMLRespond, Options, ContextOptions, Bindings, Execution, FetchEventLike, Handler, NotFoundHandler, Result, H, RouterRoute, SetHeadersOptions, SetHeaders, ResponseHeadersInit, Headers, ResponseInit, TEXT_PLAIN | src/context.ts |
GetPath | Request, E, Bindings, HonoOptions, Env, Hono, RegExpRouter, Router, H, RouterRoute, A, GetPath, When, MountOptionHandler, Context, MountReplaceRequest, MountOptions, S, Schema, BasePath, CurrentPath, HandlerInterface, OnHandlerInterface, MiddlewareHandlerInterface, This, To, Cannot, JavaScript, Implementation, METHODS, METHOD_NAME_ALL_LOWERCASE, MiddlewareHandler, METHOD_NAME_ALL, NotFoundHandler, ErrorHandler, Path, GET, SubPath, SubEnv, SubSchema, SubBasePath, SubCurrentPath, MergeSchemaPath, MergePath, Next | src/hono-base.ts |
Body | ArrayBuffer, Blob, FormData, BodyCache, Body, OptionalRequestInitProperties, RequiredRequestInit, RequestInit, Key, HonoRequest, P, I, Input, Request, For, Cloudflare, Workers, K, ValidationTargets, Short, Result, RouterRoute, P2, ParamKeys, RemoveQuestion, Simplify, UnionToIntersection, ParamKeyToRecord, Query, Get, A, B, User, Agent, RequestHeader, CustomHeader, Options, ParseBodyOptions, T, BodyData, BodyInit, JSON, Rebuilding, Response, Carry, Content, Type, Uint8Array, Parses | src/request.ts |
Runtime | T, C, Context, Bindings, Runtime, Deno, On, Fastly, Compute, ConfigStore, Bun, Cloudflare, Workers, Node, Edge, EdgeRuntime | src/helper/adapter/index.ts |
CssVariableBasicType | CssClassName, CssEscapedString, CssVariableAsyncType, CssVariableBasicType, CssVariableArrayType, CssVariableType, A, CSS, The, Whitespace, Must | src/helper/css/common.ts |
ClassNameSlug | A, ClassNameSlug, The, OnInvalidSlug, TemplateStringsArray, CssVariableType, CssClassName | src/helper/css/common.ts |
CssClassName | HtmlEscapedString, CssClassNameCommon, CssType, TemplateStringsArray, CssVariableType, CxType, CssClassName, KeyframesType, ViewTransitionType, StyleType | src/helper/css/index.ts |
InitApp | Hono, E, CreateHandlersInterface, Env, P, I, Input, R, HandlerResponse, E2, H, I2, R2, E3, IntersectNonAnyTypes, I3, R3, E4, I4, R4, E5, I5, R5, E6, I6, R6, E7, I7, R7, E8, I8, R8, E9, I9, R9, E10, I10, R10, E11, Factory, InitApp, HonoOptions | src/helper/factory/index.ts |
SSGParams | SSGParam, SSGParamsMiddleware, E, Env, Context, SSGParams, MiddlewareHandler, AddedSSGDataRequest, Request, Define, SSG, Route | src/helper/ssg/middleware.ts |
BeforeRequestHook | Request, AfterResponseHook, Response, AfterGenerateHook, ToSSGResult, FileSystemModule, ToSSGOptions, BeforeRequestHook, SSGPlugin, Use, The, API, E, Env, S, Schema, BasePath, Hono, Generator | src/helper/ssg/ssg.ts |
Props | FunctionComponentResult, HtmlEscapedString, JSXNode, Child, FC, P, Props, DOMAttributes, HonoJSX, HTMLAttributes, JSX, Element, ElementType, ElementChildrenAttribute, IntrinsicElements, TS2310, IntrinsicAttributes, Context, A, Z, Presentation, Or, Path, Rule, EMS, L, SuspendedContext, T, StringBufferWithCallbacks | src/jsx/base.ts |
Child | JSXNode, Child, HtmlEscapedString, StringBufferWithCallbacks, HtmlEscaped, Function, Props, Invalid, JSX, Added, React | src/jsx/base.ts |
MemorableFC | FC, T, DOM_MEMO, MemorableFC, This, DOM, So, DOM_RENDERER | src/jsx/base.ts |
ErrorHandler | FallbackRender, Child, ErrorBoundary, The, API, FC, PropsWithChildren, ErrorHandler, StreamingContext, ReturnType, HtmlEscapedString, Fragment, Prime, E | src/jsx/components.ts |
RenderStore | WeakMap, Context, AsyncLocalStorageLike, T, R, AsyncLocalStorageClass, AsyncHooksModule, AsyncLocalStorage, RenderStore, Unsettled, While, Stays, DOM, Node, Deno, Bun, Cloudflare, Workers, Property, CJS, To, Write, Provider, Read, LocalContexts, Resolve, Establish, Without, React, Reading, Already, Fallback, Capture, Shared, Create, Server | src/jsx/context.ts |
HasRenderToDom | FC, DOM_RENDERER, ErrorHandler, Child, Container, HTMLElement, DocumentFragment, LocalJSXContexts, JSXContext, SupportedElement, SVGElement, MathMLElement, PreserveNodeType, NodeObject, Props, Node, Text, DOM_STASH, Context, Function, JSXNode, NodeString, PendingType, UpdateHook, WeakMap, Element, A, Z, PointerCapture, Capture, Presentation, Other, HTMLSelectElement, Unlike, SSR, DOM, DOMException, InvalidCharacterError, Event, SELECT, Deferred, INPUT, TEXTAREA | src/jsx/dom/render.ts |
UpdateMapResolve | NodeObject, WeakMap, UpdateMapResolve, Function, Context | src/jsx/dom/render.ts |
FormStatus | FormData, FormContext, Context, FormStatus, This, The, T, N, Function | src/jsx/dom/hooks/index.ts |
MessageFunction | Context, BasicAuthOptions, Function, MessageFunction, Basic, Auth, Middleware, Hono, The, Secure, Area, WWW, Authenticate, Unauthorized, Callback, MiddlewareHandler, HTTPException, If, You, With, User | src/middleware/basic-auth/index.ts |
OnError | Context, Response, BodyLimitOptions, OnError, Body, Limit, Middleware, Hono, The, MiddlewareHandler, File, Got, ERROR_MESSAGE, HTTPException, GET, HEAD, Only, Content, Length, Transfer, Encoding, Per, RFC, Read, Uint8Array | src/middleware/body-limit/index.ts |
CacheKeyRequest | GET, QUERY, CacheKeyRequest, URL, JSON, Response, Cache, Control, Cookie, Context, FormData, RFC, Section, TextEncoder, Uint8Array | src/middleware/cache/index.ts |
Condition | Context, Create, An, MiddlewareHandler, Condition, Middleware, You, If, A, Otherwise | src/middleware/combine/index.ts |
Encoding | ENCODING_TYPES, ContentTypeFilter, CompressionOptions, Encoding | src/middleware/compress/index.ts |
GetIPAddr | GetConnInfo, Context, IPv4, IPv6, CIDR, Notation, IPRestrictionRuleFunction | src/middleware/ip-restriction/index.ts |
IPRestrictionRule | — | src/middleware/ip-restriction/index.ts |
RendererOptions | ComponentResult, Exclude, ReturnType, FC, Component, PropsForRenderer, Layout, Context, ComponentWithChildren, PropsWithChildren, RendererOptions, JSXNode, DOCTYPE, RequestContext, Provider, Transfer, Encoding, Content, Type | src/middleware/jsx-renderer/index.ts |
JwtVariables | T, JWT, Auth, Middleware, Hono, The, SignatureKey, A, If, SignatureAlgorithm, An, Available, HS256, HS384, HS512, RS256, RS384, RS512, PS256, PS384, PS512, ES256, ES384, ES512, EdDSA, Authorization, Default, WWW, Authenticate, Defaults, URL, VerifyOptions, Additional, MiddlewareHandler, Optional, You | src/middleware/jwt/jwt.ts |
DetectorType | CacheType, DetectorOptions, Order, DetectorType, Query, Cookie, Index, URL, Header, Caching, Strict, Lax, None, Whether, Default, List, Optional, Enable, LanguageVariables, DEFAULT_OPTIONS, Parse, Accept, Language | src/middleware/language/language.ts |
SecureHeadersVariables | ContentSecurityPolicyOptionHandler, Context, ContentSecurityPolicyOptionValue, ContentSecurityPolicyOptions, ReportToOptions, ReportToEndpoint, ReportingEndpointOptions, PermissionsPolicyValue, PermissionsPolicyOptions, PermissionsPolicyDirective, SecureHeadersOptions, HeadersMap, HEADERS_MAP, Cross, Origin, Embedder, Policy, Resource, Opener, Agent, Cluster, Referrer, Strict, Transport, Security | src/middleware/secure-headers/secure-headers.ts |
SecureHeadersCallback | Context, Uint8Array, NONCE, ContentSecurityPolicyOptionHandler, Secure, Headers, Middleware, Hono, SecureHeadersOptions, The, ContentSecurityPolicyOptions, Settings, Content, Security, Policy, Report, Only, Cross, Origin, Embedder, Resource, Opener, Agent, Cluster, Referrer, ReportingEndpointOptions, Reporting, Endpoints, ReportToOptions, To, Strict, Transport, X, Type, Options, DNS, Prefetch, Control, Download, Frame, Permitted, Domain, Policies, XSS, Protection, Powered, By, PermissionsPolicyOptions, Permissions, MiddlewareHandler, DEFAULT_OPTIONS, SecureHeadersCallback, HEADERS_MAP, A, Z | src/middleware/secure-headers/secure-headers.ts |
TimingVariables | Timer, TimingOptions, Context, Server, Timing, Middleware, Hono, The, Show, Whether, Total, Response, Time, Description, If, MiddlewareHandler | src/middleware/timing/timing.ts |
RegExpMatchArrayWithIndices | RegExpMatchArray, LinearRouter, T, Router | src/router/linear-router/router.ts |
Route | T, PatternRouter, Router, Route, UnsupportedPathError, Result, Params | src/router/pattern-router/router.ts |
ParamAssocArray | Context, Sort, ONLY_WILDCARD_REG_EXP_STR, TAIL_WILDCARD_REG_EXP_STR, LABEL_REG_EXP_STR, Node, ParamAssocArray | src/router/reg-exp-router/node.ts |
RelocateMap | ParamIndexMap, PreparedRegExpRouter, T, Router, MatcherMap, RelocateMap, Matcher | src/router/reg-exp-router/prepared-router.ts |
ReplacementMap | Trie, Context, Node | src/router/reg-exp-router/trie.ts |
HandlerSet | T, HandlerParamsSet, HandlerSet, Node, Pattern | src/router/trie-router/node.ts |
Auth | Request | src/utils/basic-auth.ts |
BodyDataValueDot | File, BodyDataValueDot, BodyDataValueDotAll, SimplifyBodyData, T, K, BodyDataValueComponent, BodyDataValueObject, BodyDataValue, BodyData, ParseBodyOptions, Determines, FormData, If, HonoRequest, Request, Parses, The, Options, ParseBody, Content, Type | src/utils/body.ts |
StringHashFunction | StringHashFunction, TimingSafeEqual, Function, ArrayBuffer, TextDecoder, FormData, Response, Normalize, Content, Type | src/utils/buffer.ts |
Cookie | SignedCookie, PartitionedCookieConstraint | src/utils/cookie.ts |
SecureCookieConstraint | HostCookieConstraint | src/utils/cookie.ts |
CookieOptions | Strict, Lax, None, Low, Medium, High, CookiePrefixOptions, PartitionedCookieConstraint, CookieConstraint, Name, CookieOptions, SecureCookieConstraint, HostCookieConstraint, HMAC, SHA, BufferSource, CryptoKey, TextEncoder, Uint8Array | src/utils/cookie.ts |
HtmlEscapedCallbackOpts | HtmlEscapedCallbackPhase, An, JSX, This, WeakMap, HtmlEscapedCallback, HtmlEscapedCallbackOpts, HtmlEscaped, HtmlEscapedString, StringBuffer, The, When, Hono, StringBufferWithCallbacks, MIT | src/utils/html.ts |
InvalidIPAddressError | TypeError, INVALID_IP_ADDRESS_ERROR_CODE, CHAR_CODE_0, CHAR_CODE_9, CHAR_CODE_A, CHAR_CODE_F, CHAR_CODE_a, CHAR_CODE_f, CHAR_CODE_DOT, CHAR_CODE_COLON, CHAR_CODE_PERCENT, Distinct, Remote, Addr, AddressType, IPV4_REGEX, IPv4, Domain, IPv6, InvalidIPAddressError, Invalid | src/utils/ipaddr.ts |
BaseMime | — | src/utils/mime.ts |
Expect | T, Equal, X, Y, NotEqual, UnionToIntersection, U, I, RemoveBlankRecord, K, IfAnyThenEmptyObject, JSONPrimitive, JSONArray, JSONObject, InvalidJSONValue, InvalidToNull, IsInvalid, JSON, OmitSymbolKeys, JSONValue, Convert, Non, TypeError, This, TError, ReadonlyArray, You, JSONParsed, J, A | src/utils/types.ts |
Pattern | — | src/utils/url.ts |
Decoder | Decoder, Fa, Try, If, UTF, The, Hello, World, A4, A2, Request | src/utils/url.ts |
VerifyOptions | The, Verify, Acceptable, VerifyOptionsWithAlg, SignatureAlgorithm, VerifyOptions, SignatureKey, JWTPayload, JwtAlgorithmRequired, JwtTokenInvalid, JwtHeaderInvalid, JwtAlgorithmMismatch, Math, JwtTokenNotBefore, JwtTokenExpired, JwtTokenIssuedAt, JwtTokenIssuer, JwtPayloadRequiresAud, JwtTokenAudience, Uint8Array, ArrayBuffer, JwtTokenSignatureMismatched, Symmetric, JWK, SymmetricAlgorithm, AlgorithmTypes, HS256, HS384, HS512, HonoJsonWebKey, AsymmetricAlgorithm, RequestInit, JwtHeaderRequiresKid, Reject, JwtSymmetricAlgorithmNotAllowed, Validate, JwtAlgorithmNotAllowed, JWKS, JsonWebKey, JWT, TokenHeader | src/utils/jwt/jwt.ts |
ValidationTargetKeysWithBody | ValidationTargetByMethod, M, GET, HEAD, Exclude, ValidationTargets, ValidationTargetKeysWithBody, ValidationFunction, InputType, OutputType, E, Env, P, Context, TypedResponse | src/validator/validator.ts |
ExtractValidationResponse | VF, R, PR, TypedResponse, T, S, F, Response, Can, InputType, P, M, U, ValidationTargetByMethod, P2, Capture, ValidationTargets, Context, V, K, ExtractValidatorOutput, InferInput, FormValue, E, Env, MiddlewareHandler, ExtractValidationResponse, Content, Type, Malformed, JSON, HTTPException, FormData, BodyData | src/validator/validator.ts |
Enums
3 enums define named constant sets:
| Enum | Source |
|---|---|
LogPrefix | src/middleware/logger/index.ts |
AlgorithmTypes | src/utils/jwt/jwa.ts |
CryptoKeyUsage | src/utils/jwt/types.ts |
Type Relationships
The following diagram shows inheritance, implementation, and reference relationships between types:
LambdaEvent
├── uses → APIGatewayProxyEvent
├── uses → APIGatewayProxyEventV2
├── uses → ALBProxyEvent
├── uses → LatticeProxyEventV2
├── uses → LatticeRequestContextV2
├── uses → ApiGatewayRequestContextV2
├── uses → ApiGatewayRequestContext
├── uses → ALBRequestContext
├── uses → LambdaContext
├── uses → Response
└── uses → Cookie
PagesFunction
├── uses → Params
└── uses → Response
CloudFrontOrigin
└── uses → CloudFrontS3Origin
CloudFrontContext
├── uses → Callback
├── uses → CloudFrontRequest
├── uses → CloudFrontResult
├── uses → CloudFrontHeaders
├── uses → CloudFrontEdgeEvent
├── uses → Response
└── uses → CloudFrontEvent
FetchEvent
└── extends → ExtendableEvent
MethodNameAll
└── uses → ClientResponseOfEndpoint
ClientResponseOfEndpoint
└── uses → Response
HeaderRecord
├── uses → BaseMime
├── uses → ExecutionContext
├── uses → ContextVariableMap
├── uses → ContextRenderer
├── uses → DefaultRenderer
├── uses → Response
├── uses → Props
├── uses → NewResponse
├── uses → BodyRespond
├── uses → TextRespond
├── uses → JSONRespond
├── uses → HTMLRespond
├── uses → FetchEventLike
├── uses → RouterRoute
├── uses → SetHeadersOptions
└── uses → SetHeaders
GetPath
├── uses → RouterRoute
├── uses → Context
└── uses → ErrorHandler
Body
├── uses → RouterRoute
└── uses → Response
acceptsOptions
└── extends → acceptsConfig
Runtime
├── uses → Context
└── uses → Node
CssVariableBasicType
├── uses → CssClassName
└── uses → CssEscapedString
ClassNameSlug
└── uses → CssClassName
CssClassName
├── uses → CssType
├── uses → CxType
├── uses → KeyframesType
├── uses → ViewTransitionType
└── uses → StyleType
SSGParams
├── uses → SSGParam
├── uses → SSGParamsMiddleware
├── uses → Context
└── uses → Route
BeforeRequestHook
├── uses → Response
├── uses → ToSSGResult
├── uses → FileSystemModule
├── uses → ToSSGOptions
└── uses → SSGPlugin
SSEStreamingApi
└── extends → StreamingApi
Props
├── uses → JSXNode
├── uses → Child
├── uses → HTMLAttributes
├── uses → ElementChildrenAttribute
├── uses → IntrinsicElements
├── uses → IntrinsicAttributes
└── uses → Context
Child
├── uses → JSXNode
└── uses → Props
JSXFunctionNode
└── extends → JSXNode
JSXFragmentNode
└── extends → JSXNode
ErrorHandler
└── uses → Child
RenderStore
├── uses → Context
└── uses → Node
HTMLAttributes
├── extends → JSXAttributes
└── extends → EventAttributes
AnchorHTMLAttributes
└── extends → HTMLAttributes
AudioHTMLAttributes
└── extends → MediaHTMLAttributes
AreaHTMLAttributes
└── extends → HTMLAttributes
BaseHTMLAttributes
└── extends → HTMLAttributes
BlockquoteHTMLAttributes
└── extends → HTMLAttributes
ButtonHTMLAttributes
└── extends → HTMLAttributes
CanvasHTMLAttributes
└── extends → HTMLAttributes
ColHTMLAttributes
└── extends → HTMLAttributes
ColgroupHTMLAttributes
└── extends → HTMLAttributes
DataHTMLAttributes
└── extends → HTMLAttributes
DetailsHTMLAttributes
└── extends → HTMLAttributes
DelHTMLAttributes
└── extends → HTMLAttributes
DialogHTMLAttributes
└── extends → HTMLAttributes
EmbedHTMLAttributes
└── extends → HTMLAttributes
FieldsetHTMLAttributes
└── extends → HTMLAttributes
FormHTMLAttributes
└── extends → HTMLAttributes
HtmlHTMLAttributes
└── extends → HTMLAttributes
IframeHTMLAttributes
└── extends → HTMLAttributes
ImgHTMLAttributes
└── extends → HTMLAttributes
InsHTMLAttributes
└── extends → HTMLAttributes
InputHTMLAttributes
└── extends → HTMLAttributes
KeygenHTMLAttributes
└── extends → HTMLAttributes
LabelHTMLAttributes
└── extends → HTMLAttributes
LiHTMLAttributes
└── extends → HTMLAttributes
LinkHTMLAttributes
└── extends → HTMLAttributes
MapHTMLAttributes
└── extends → HTMLAttributes
MenuHTMLAttributes
└── extends → HTMLAttributes
MediaHTMLAttributes
└── extends → HTMLAttributes
MetaHTMLAttributes
└── extends → HTMLAttributes
MeterHTMLAttributes
└── extends → HTMLAttributes
QuoteHTMLAttributes
└── extends → HTMLAttributes
ObjectHTMLAttributes
└── extends → HTMLAttributes
OlHTMLAttributes
└── extends → HTMLAttributes
OptgroupHTMLAttributes
└── extends → HTMLAttributes
OptionHTMLAttributes
└── extends → HTMLAttributes
OutputHTMLAttributes
└── extends → HTMLAttributes
ParamHTMLAttributes
└── extends → HTMLAttributes
ProgressHTMLAttributes
└── extends → HTMLAttributes
SlotHTMLAttributes
└── extends → HTMLAttributes
ScriptHTMLAttributes
└── extends → HTMLAttributes
SelectHTMLAttributes
└── extends → HTMLAttributes
SourceHTMLAttributes
└── extends → HTMLAttributes
StyleHTMLAttributes
└── extends → HTMLAttributes
TableHTMLAttributes
└── extends → HTMLAttributes
TextareaHTMLAttributes
└── extends → HTMLAttributes
TdHTMLAttributes
└── extends → HTMLAttributes
ThHTMLAttributes
└── extends → HTMLAttributes
TimeHTMLAttributes
└── extends → HTMLAttributes
TrackHTMLAttributes
└── extends → HTMLAttributes
VideoHTMLAttributes
└── extends → MediaHTMLAttributes
HasRenderToDom
├── uses → ErrorHandler
├── uses → Child
├── uses → Props
├── uses → Node
├── uses → Context
└── uses → JSXNode
UpdateMapResolve
└── uses → Context
FormStatus
└── uses → Context
MessageFunction
├── uses → Context
├── uses → Auth
├── uses → Callback
└── uses → HTTPException
OnError
├── uses → Context
├── uses → Response
├── uses → Body
├── uses → HTTPException
└── uses → Encoding
CacheKeyRequest
├── uses → Response
├── uses → Cookie
└── uses → Context
Condition
└── uses → Context
Encoding
└── uses → CompressionOptions
GetIPAddr
└── uses → Context
RendererOptions
├── uses → Context
├── uses → JSXNode
└── uses → Encoding
ContextVariableMap
├── extends → JwtVariables
├── extends → LanguageVariables
├── extends → SecureHeadersVariables
└── extends → TimingVariables
JwtVariables
├── uses → Auth
└── uses → VerifyOptions
DetectorType
├── uses → DetectorOptions
├── uses → Cookie
├── uses → LanguageVariables
└── uses → Accept
SecureHeadersVariables
├── uses → Context
├── uses → ContentSecurityPolicyOptions
├── uses → ReportToOptions
├── uses → ReportToEndpoint
├── uses → ReportingEndpointOptions
└── uses → SecureHeadersOptions
SecureHeadersCallback
├── uses → Context
├── uses → SecureHeadersOptions
├── uses → ContentSecurityPolicyOptions
├── uses → ReportingEndpointOptions
└── uses → ReportToOptions
TimingVariables
├── uses → Timer
├── uses → TimingOptions
├── uses → Context
└── uses → Response
Route
├── uses → UnsupportedPathError
└── uses → Params
ParamAssocArray
├── uses → Context
└── uses → Node
ReplacementMap
├── uses → Trie
├── uses → Context
└── uses → Node
HandlerSet
├── uses → Node
└── uses → Pattern
BodyDataValueDot
└── uses → ParseBody
StringHashFunction
└── uses → Response
CookieOptions
└── uses → SecureCookieConstraint
VerifyOptions
├── uses → JwtAlgorithmRequired
├── uses → JwtTokenInvalid
├── uses → JwtHeaderInvalid
├── uses → JwtAlgorithmMismatch
├── uses → JwtTokenNotBefore
├── uses → JwtTokenExpired
├── uses → JwtTokenIssuedAt
├── uses → JwtTokenIssuer
├── uses → JwtPayloadRequiresAud
├── uses → JwtTokenAudience
├── uses → JwtTokenSignatureMismatched
├── uses → AlgorithmTypes
├── uses → HonoJsonWebKey
├── uses → JwtHeaderRequiresKid
├── uses → JwtSymmetricAlgorithmNotAllowed
├── uses → JwtAlgorithmNotAllowed
└── uses → TokenHeader
ValidationTargetKeysWithBody
└── uses → Context
ExtractValidationResponse
├── uses → Response
├── uses → Context
└── uses → HTTPException
Generated by RepoLens static analysis. Type detection uses regex-based parsing and may not capture all advanced TypeScript patterns.
<!-- repolens:docs-badge -->  · Examples
Dependency Graph
188 files · 288 imports · 0 external packages · ⚠️ 5 circular dependency cycle(s) · 19 orphan file(s)
This document maps every import relationship in the codebase, identifies the most-connected modules, and flags circular dependencies that may complicate refactoring or increase build times.
Overview
| Metric | Value |
|---|---|
| Source files | 188 |
| Import edges | 288 |
| External packages | 0 |
| Circular dependencies | 5 |
| Orphan files (no imports or importers) | 19 |
Circular Dependencies
5 circular dependency chains were detected. Circular imports can cause initialization errors, increase bundle sizes, and make modules harder to test in isolation. Consider refactoring shared logic into a separate module.
src/jsx/base→src/jsx/context→src/jsx/basesrc/jsx/context→src/jsx/dom/context→src/jsx/contextsrc/jsx/base→src/jsx/intrinsic-element/components→src/jsx/basesrc/jsx/hooks→src/jsx/dom/render→src/jsx/hookssrc/jsx/components→src/jsx/streaming→src/jsx/components
Generated by RepoLens import analysis. Dependency detection covers JavaScript and TypeScript (ES modules, dynamic import, CommonJS, re-exports; comments, strings, and type-only imports are skipped), Python (`import` / `from ... import`, including relative imports), and Go (`go.mod` module paths). Go `_test.go` files are not part of the graph.*
<!-- repolens:docs-badge -->  · Examples
Architecture Drift
No baseline found. Run
repolens publishonce to establish a baseline.
A baseline snapshot of the current architecture has been saved. On subsequent runs, this report will track structural changes across the following dimensions:
| Dimension | What is Tracked |
|---|---|
| Modules | New, removed, or significantly resized modules |
| API Endpoints | Added or removed backend routes |
| Dependencies | Changes to external package imports |
| Frameworks | Technology stack additions or removals |
| Circular Dependencies | Increases in dependency cycles |
| GraphQL Schema | Type additions or removals |
| Codebase Scale | Overall file count changes |
<!-- repolens:docs-badge -->  · Examples
Security Hotspots
24 security finding(s) · 3 high severity · 4 medium severity · 17 low severity · across 17 file(s)
This report identifies code patterns that are commonly associated with security vulnerabilities. Each finding includes the relevant CWE classification and a recommended remediation.
Severity Overview
| Severity | Count |
|---|---|
| 🔴 High | 3 |
| 🟡 Medium | 4 |
| 🔵 Low | 17 |
188 source files scanned · 17 files with findings
Prototype Pollution
Deep merge utilities may be vulnerable to prototype pollution if they don't check hasOwnProperty. Verify the implementation.
| File | Line | Pattern | Severity | CWE |
|---|---|---|---|---|
src/client/utils.ts | 78 | Recursive object merge without prototype check | 🔵 Low | CWE-1321 |
src/hono-base.ts | 189 | Recursive object merge without prototype check | 🔵 Low | CWE-1321 |
src/helper/css/index.ts | 159 | Recursive object merge without prototype check | 🔵 Low | CWE-1321 |
src/helper/css/index.ts | 163 | Recursive object merge without prototype check | 🔵 Low | CWE-1321 |
src/jsx/dom/intrinsic-element/components.ts | 429 | Recursive object merge without prototype check | 🔵 Low | CWE-1321 |
ReDoS
Dynamic regex construction from user input can cause ReDoS. Use static regex or input validation.
| File | Line | Pattern | Severity | CWE |
|---|---|---|---|---|
src/client/utils.ts | 20 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/helper/css/common.ts | 3 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/helper/css/index.ts | 86 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/jsx/streaming.ts | 112 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/middleware/bearer-auth/index.ts | 119 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/router/linear-router/router.ts | 104 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/router/pattern-router/router.ts | 32 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/router/reg-exp-router/router.ts | 23 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/router/reg-exp-router/trie.ts | 82 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/utils/ipaddr.ts | 41 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/utils/url.ts | 67 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
src/utils/url.ts | 68 | Potentially catastrophic regex | 🔵 Low | CWE-1333 |
Cross-Site Scripting (XSS)
dangerouslySetInnerHTML bypasses React's XSS protection. Ensure content is sanitized before use.
| File | Line | Pattern | Severity | CWE |
|---|---|---|---|---|
src/jsx/base.ts | 281 | React dangerouslySetInnerHTML | 🟡 Medium | CWE-79 |
src/jsx/base.ts | 283 | React dangerouslySetInnerHTML | 🟡 Medium | CWE-79 |
src/jsx/intrinsic-elements.ts | 22 | React dangerouslySetInnerHTML | 🟡 Medium | CWE-79 |
src/jsx/dom/render.ts | 188 | innerHTML assignment | 🔴 High | CWE-79 |
src/jsx/dom/render.ts | 187 | React dangerouslySetInnerHTML | 🟡 Medium | CWE-79 |
src/jsx/dom/intrinsic-element/components.ts | 194 | innerHTML assignment | 🔴 High | CWE-79 |
SQL Injection
Concatenating user input into SQL queries enables injection attacks. Use parameterized queries or prepared statements.
| File | Line | Pattern | Severity | CWE |
|---|---|---|---|---|
src/jsx/hooks/index.ts | 425 | SQL string concatenation | 🔴 High | CWE-89 |
Affected Files
src/client/utils.tssrc/hono-base.tssrc/helper/css/common.tssrc/helper/css/index.tssrc/jsx/base.tssrc/jsx/intrinsic-elements.tssrc/jsx/streaming.tssrc/jsx/dom/render.tssrc/jsx/dom/intrinsic-element/components.tssrc/jsx/hooks/index.tssrc/middleware/bearer-auth/index.tssrc/router/linear-router/router.tssrc/router/pattern-router/router.tssrc/router/reg-exp-router/router.tssrc/router/reg-exp-router/trie.tssrc/utils/ipaddr.tssrc/utils/url.ts
Generated by RepoLens security pattern analysis. Detection is regex-based and may produce false positives. Findings should be triaged by a security-aware engineer.
<!-- repolens:docs-badge -->  · Examples
Code Health Report
188 files analyzed · Average health: 84/100 · 129 A, 23 B, 31 C, 3 D, 2 F
This report synthesizes complexity, coupling, documentation, and security signals into a single health score per module. Lower scores indicate higher risk and maintenance burden.
Overview
| Metric | Value |
|---|---|
| Files analyzed | 188 |
| Average health score | 84/100 |
| Average complexity | 20 |
| Hotspots (score < 60) | 20 |
Grade Distribution
| Grade | Count | Meaning |
|---|---|---|
| 🟢 A (80–100) | 129 | Healthy — low complexity, well-documented |
| 🔵 B (60–79) | 23 | Acceptable — minor improvements possible |
| 🟡 C (40–59) | 31 | Needs attention — elevated complexity or coupling |
| 🟠 D (20–39) | 3 | At risk — multiple quality signals degraded |
| 🔴 F (0–19) | 2 | Critical — immediate refactoring recommended |
Hotspots — Priority Refactoring Targets
These modules have the lowest health scores and should be prioritized for improvement:
| Module | Score | Grade | Complexity | Coupling | Doc% | Security |
|---|---|---|---|---|---|---|
src/jsx/base.ts | 18 | 🔴 F | 54 | 8↓ 7↑ | 0% | 2 (0 high) |
src/jsx/dom/render.ts | 18 | 🔴 F | 236 | 5↓ 6↑ | 0% | 2 (1 high) |
src/jsx/dom/intrinsic-element/components.ts | 25 | 🟠 D | 84 | 1↓ 5↑ | 0% | 2 (1 high) |
src/jsx/hooks/index.ts | 28 | 🟠 D | 64 | 6↓ 2↑ | 0% | 1 (1 high) |
src/utils/jwt/jwt.ts | 35 | 🟠 D | 72 | 1↓ 5↑ | 0% | — |
src/jsx/intrinsic-elements.ts | 40 | 🟡 C | 434 | 0↓ 0↑ | — | 1 (0 high) |
src/utils/jwt/jws.ts | 41 | 🟡 C | 36 | 1↓ 4↑ | 0% | — |
src/adapter/aws-lambda/handler.ts | 45 | 🟡 C | 95 | 1↓ 1↑ | 100% | — |
src/adapter/lambda-edge/handler.ts | 45 | 🟡 C | 46 | 1↓ 1↑ | — | — |
src/client/client.ts | 45 | 🟡 C | 57 | 1↓ 2↑ | — | — |
src/client/types.ts | 45 | 🟡 C | 85 | 0↓ 0↑ | — | — |
src/hono-base.ts | 45 | 🟡 C | 50 | 3↓ 5↑ | — | 1 (0 high) |
src/types.ts | 45 | 🟡 C | 69 | 0↓ 0↑ | — | — |
src/helper/ssg/ssg.ts | 45 | 🟡 C | 86 | 1↓ 6↑ | — | — |
src/jsx/components.ts | 45 | 🟡 C | 48 | 2↓ 7↑ | — | — |
src/jsx/intrinsic-element/components.ts | 45 | 🟡 C | 52 | 1↓ 6↑ | — | — |
src/middleware/compress/index.ts | 45 | 🟡 C | 42 | 0↓ 2↑ | — | — |
src/middleware/serve-static/index.ts | 45 | 🟡 C | 39 | 3↓ 5↑ | — | — |
src/router/linear-router/router.ts | 45 | 🟡 C | 57 | 1↓ 2↑ | — | 1 (0 high) |
src/router/reg-exp-router/node.ts | 45 | 🟡 C | 60 | 2↓ 1↑ | — | — |
Most Complex Functions
These functions have the highest cyclomatic complexity and are the most likely sources of bugs:
| Function | File | Line | Complexity |
|---|---|---|---|
normalizeFormValue() | src/jsx/dom/render.ts | 144 | 182 |
sanitizeHeaderValue() | src/adapter/aws-lambda/handler.ts | 14 | 94 |
isTokenHeader() | src/utils/jwt/jwt.ts | 44 | 70 |
parseIPv4ToBinary() | src/utils/ipaddr.ts | 84 | 66 |
compareKey() | src/router/reg-exp-router/node.ts | 22 | 60 |
isDeDupeCandidateLink() | src/jsx/dom/intrinsic-element/components.ts | 82 | 51 |
buildWildcardRegExp() | src/router/reg-exp-router/router.ts | 22 | 34 |
createProxy() | src/client/client.ts | 15 | 30 |
fallbackUpdateFn() | src/jsx/dom/render.ts | 678 | 29 |
promise() | src/jsx/dom/intrinsic-element/components.ts | 227 | 25 |
bearerAuth() | src/middleware/bearer-auth/index.ts | 156 | 24 |
render() | src/jsx/base.ts | 129 | 22 |
documentMetadataTag() | src/jsx/intrinsic-element/components.ts | 96 | 22 |
defaultOnInvalidSlug() | src/helper/css/common.ts | 75 | 21 |
logger() | src/helper/route/index.ts | 16 | 21 |
All Modules by Health Score
Showing 50 of 188 modules (sorted worst-first)
| Module | Score | Grade | Lines | Complexity | Fan-In | Fan-Out |
|---|---|---|---|---|---|---|
src/jsx/base.ts | 18 | 🔴 F | 491 | 54 | 8 | 7 |
src/jsx/dom/render.ts | 18 | 🔴 F | 880 | 236 | 5 | 6 |
src/jsx/dom/intrinsic-element/components.ts | 25 | 🟠 D | 439 | 84 | 1 | 5 |
src/jsx/hooks/index.ts | 28 | 🟠 D | 438 | 64 | 6 | 2 |
src/utils/jwt/jwt.ts | 35 | 🟠 D | 293 | 72 | 1 | 5 |
src/jsx/intrinsic-elements.ts | 40 | 🟡 C | 925 | 434 | 0 | 0 |
src/utils/jwt/jws.ts | 41 | 🟡 C | 235 | 36 | 1 | 4 |
src/adapter/aws-lambda/handler.ts | 45 | 🟡 C | 727 | 95 | 1 | 1 |
src/adapter/lambda-edge/handler.ts | 45 | 🟡 C | 264 | 46 | 1 | 1 |
src/client/client.ts | 45 | 🟡 C | 250 | 57 | 1 | 2 |
src/client/types.ts | 45 | 🟡 C | 394 | 85 | 0 | 0 |
src/hono-base.ts | 45 | 🟡 C | 565 | 50 | 3 | 5 |
src/types.ts | 45 | 🟡 C | 2783 | 69 | 0 | 0 |
src/helper/ssg/ssg.ts | 45 | 🟡 C | 472 | 86 | 1 | 6 |
src/jsx/components.ts | 45 | 🟡 C | 258 | 48 | 2 | 7 |
src/jsx/intrinsic-element/components.ts | 45 | 🟡 C | 211 | 52 | 1 | 6 |
src/middleware/compress/index.ts | 45 | 🟡 C | 144 | 42 | 0 | 2 |
src/middleware/serve-static/index.ts | 45 | 🟡 C | 136 | 39 | 3 | 5 |
src/router/linear-router/router.ts | 45 | 🟡 C | 153 | 57 | 1 | 2 |
src/router/reg-exp-router/node.ts | 45 | 🟡 C | 171 | 60 | 2 | 1 |
src/utils/accept.ts | 45 | 🟡 C | 269 | 65 | 4 | 0 |
src/utils/ipaddr.ts | 45 | 🟡 C | 375 | 72 | 1 | 0 |
src/utils/url.ts | 45 | 🟡 C | 338 | 76 | 9 | 0 |
src/middleware/cache/index.ts | 46 | 🟡 C | 325 | 63 | 0 | 2 |
src/middleware/jwk/jwk.ts | 46 | 🟡 C | 197 | 37 | 1 | 4 |
src/middleware/ip-restriction/index.ts | 50 | 🟡 C | 280 | 51 | 0 | 2 |
src/middleware/language/language.ts | 50 | 🟡 C | 315 | 40 | 1 | 2 |
src/middleware/timing/timing.ts | 50 | 🟡 C | 258 | 35 | 1 | 1 |
src/utils/body.ts | 50 | 🟡 C | 264 | 35 | 2 | 1 |
src/middleware/secure-headers/secure-headers.ts | 52 | 🟡 C | 342 | 74 | 1 | 1 |
src/router/reg-exp-router/router.ts | 53 | 🟡 C | 175 | 34 | 2 | 6 |
src/router/trie-router/node.ts | 53 | 🟡 C | 222 | 34 | 1 | 3 |
src/utils/types.ts | 53 | 🟡 C | 121 | 34 | 0 | 0 |
src/adapter/aws-lambda/types.ts | 56 | 🟡 C | 202 | 33 | 0 | 0 |
src/jsx/context.ts | 56 | 🟡 C | 267 | 32 | 10 | 4 |
src/router/reg-exp-router/prepared-router.ts | 59 | 🟡 C | 166 | 32 | 1 | 3 |
src/context.ts | 60 | 🔵 B | 798 | 105 | 7 | 2 |
src/client/utils.ts | 62 | 🔵 B | 118 | 30 | 3 | 1 |
src/jsx/streaming.ts | 68 | 🔵 B | 232 | 28 | 4 | 8 |
src/middleware/bearer-auth/index.ts | 68 | 🔵 B | 222 | 27 | 0 | 2 |
src/middleware/cors/index.ts | 68 | 🔵 B | 165 | 30 | 0 | 0 |
src/middleware/trailing-slash/index.ts | 68 | 🔵 B | 159 | 28 | 0 | 0 |
src/helper/cookie/index.ts | 69 | 🔵 B | 146 | 26 | 4 | 1 |
src/helper/css/common.ts | 69 | 🔵 B | 338 | 26 | 2 | 0 |
src/utils/buffer.ts | 69 | 🔵 B | 118 | 26 | 4 | 1 |
src/middleware/etag/digest.ts | 72 | 🔵 B | 96 | 16 | 1 | 0 |
src/middleware/jwt/jwt.ts | 72 | 🔵 B | 191 | 28 | 1 | 4 |
src/middleware/etag/index.ts | 73 | 🔵 B | 137 | 25 | 0 | 1 |
src/jsx/dom/server.ts | 74 | 🔵 B | 77 | 21 | 0 | 2 |
src/middleware/method-override/index.ts | 74 | 🔵 B | 149 | 22 | 0 | 1 |
Scoring Methodology
The health score (0–100) is computed from four dimensions:
| Factor | Weight | How It's Measured |
|---|---|---|
| Complexity | –1/pt above 10, –2/pt above 30 | Cyclomatic complexity for JavaScript/TypeScript, Python, and Go (regex, not AST) |
| Function complexity | –2/pt above 8 per function | Highest complexity function in the file |
| Coupling | –1/5 units above 20 | Fan-in × Fan-out (import connections) |
| Documentation | –10 if <50%, –5 if <80% | JSDoc/TSDoc coverage of exports |
| Security | –10/high, –5/medium finding | Security anti-pattern findings in file |
Generated by RepoLens code health analysis. Complexity covers JavaScript/TypeScript, Python, and Go. It is regex-based and may differ from AST-based tools. Scores are relative indicators, not absolute quality measures.
<!-- repolens:docs-badge -->  · Examples