finds.dev

w3cj/stoker

Utilities for hono and @hono/zod-openapi

View on GitHub

★ 440TypeScriptMITupdated Aug 2025

// the take

stoker is a small utility belt for building type-safe REST APIs with Hono and @hono/zod-openapi. It fills the gaps that @hono/zod-openapi leaves open: typed HTTP status constants that play nicely with Hono's StatusCode type, sensible default error handlers, and schema helpers that cut down the boilerplate on every route definition. Aimed squarely at developers already committed to the Hono ecosystem.

The http-status-codes module solves a real and specific problem — @hono/zod-openapi's type system rejects the enum exports from the popular http-status-codes package, so having individually typed constants that satisfy Hono's StatusCode union is genuinely useful, not just cosmetic. The json-content and json-content-required helpers eliminate a surprisingly verbose pattern you'd otherwise copy-paste across every route. The defaultHook for validation errors is the kind of thing every Hono+zod-openapi project writes once and then forgets about — having it pre-built and tested saves that yak shave. The getParamsSchema factory handles uuid/nanoid/cuid/cuid2/ulid variants cleanly, which matters when you're mixing ID schemes across a codebase.

The json-content-one-of helper ships with a visible warning in its own README that the TypeScript types from @hono/zod-openapi are wrong when you use it — that's a published footgun. The middleware set is thin: not-found, on-error, and serve-emoji-favicon; anything beyond the basics you're on your own. There's no pagination helper despite list endpoints being the most boilerplate-heavy part of any CRUD API. With 440 stars, it's not widely adopted, and it sits entirely downstream of both Hono and @hono/zod-openapi — a breaking change in either can strand this package.

We read the README, the directory tree and a key source file in July 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
440
Forks
37
Language
TypeScript
License
MIT
Last commit
4 Aug 2025

// nearby

If stoker isn't quite it.

All repos →