CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl-labs/hono-best-practices

Production Hono patterns — zValidator hooks, typed generics, error handling, middleware composition, testing, and multi-runtime deployment

87

2.57x
Quality

80%

Does it follow best practices?

Impact

98%

2.57x

Average score across 5 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

Evaluation results

100%

55%

Build a Bookmark Manager API

Criteria
Without context
With context

zValidator with hook callback

0%

100%

c.req.valid() for validated data

100%

100%

Query param validation

0%

100%

Global onError handler

0%

100%

notFound handler

0%

100%

Bun entry point pattern

100%

100%

Built-in middleware

50%

100%

Route grouping

100%

100%

Env generic declared

0%

100%

Separate app from entry

100%

100%

CRUD endpoints functional

100%

100%

100%

60%

Build a Notes API for Cloudflare Workers

Criteria
Without context
With context

Bindings type for c.env

100%

100%

Cloudflare entry point

0%

100%

zValidator with hook callback

0%

100%

c.req.valid() for validated data

0%

100%

Global onError handler

0%

100%

notFound handler

0%

100%

Typed KV access

100%

100%

Consistent Env generic on child instances

100%

100%

Built-in middleware

0%

100%

Route grouping

100%

100%

Consistent error shape

28%

100%

98%

75%

Build a Coffee Shop Order API

Criteria
Without context
With context

zValidator with hook callback

0%

100%

c.req.valid() not c.req.json()

0%

100%

Global onError handler

0%

100%

notFound handler

0%

100%

Env generic with Variables

0%

100%

Middleware with await next()

0%

75%

Built-in middleware registered

0%

100%

Route grouping with app.route()

100%

100%

Node.js entry point with @hono/node-server

100%

100%

App separated from entry point

100%

100%

Consistent error response shape

0%

100%

100%

61%

Build an Inventory Tracking API

Criteria
Without context
With context

zValidator with hook callback

0%

100%

c.req.valid() for validated data

80%

100%

Global onError handler

0%

100%

notFound handler

0%

100%

Bun entry point

100%

100%

Built-in middleware

0%

100%

createMiddleware for custom middleware

100%

100%

Route grouping

100%

100%

Env generic declared

0%

100%

Business logic error as HTTPException

62%

100%

Consistent error shape

14%

100%

93%

47%

Build a URL Shortener API

Criteria
Without context
With context

Tests use app.request()

100%

100%

zValidator with hook callback

0%

100%

c.req.valid() for validated data

0%

100%

Global onError handler

0%

100%

notFound handler

0%

100%

Node.js entry point

100%

100%

App separated from entry

100%

100%

Param validation

0%

0%

Built-in middleware

0%

100%

Route grouping

100%

100%

Redirect uses c.redirect()

100%

100%

Consistent error shape

40%

100%

Evaluated
Agent
Claude Code
Model
Claude Sonnet 4.6

Table of Contents