TypeScript 482 FILES 7 FINDINGS

HOW HONO
ACTUALLY WORKS

Web framework built on Web Standards for the edge. Conventions, patterns, and architecture extracted from the honojs/hono repository by sourcebook.

QUICK_REF:
Routing: Hono routes Testing: Vitest.

WHAT_MATTERS

  • Uses Hono routes for routing — follow this pattern, don't add REST routes directly

  • src/types.ts is a hub file (imported by 47 files) — changes here ripple everywhere

  • Circular import chains detected — avoid adding to these cycles

KEY_FINDINGS

Tests are co-located with source files (*.test.ts next to *.ts). Keep this pattern -- don't create a separate test/ directory.

HIGH

Project uses barrel exports (index.ts files that re-export). Import from the directory, not from deep paths.

HIGH
11 barrel export files found

API endpoints use Hono routes. Follow this pattern for new routes.

HIGH
23 files use Hono routes

Tests use Vitest.

HIGH
29 test files

Hub files (most depended on): src/types.ts (imported by 47 files); src/context.ts (imported by 41 files); src/jsx/base.ts (imported by 25 files); src/router.ts (imported by 21 files); src/utils/html.ts (imported by 18 files). Changes here have the widest blast radius.

HIGH

Circular import chains detected: request.ts → body.ts; compose.ts → types.ts → hono-base.ts; jws.ts → types.ts. Avoid adding to these cycles.

HIGH
GENERATED IN ~3 SECONDS WITH

npx sourcebook init

VIEW ON GITHUB star

FROM_THE_BLOG

RELATED_REPOS