mir-backend-bun-hono

Solid

Make It Right (Hono module). Hono 4 reliability augmentation for backends on the Web-standard Request/Response model - Bun, Cloudflare Workers, Deno, and Node via @hono/node-server. Footguns the runtime tiers omit: the request body is a stream read once, so c.req.raw throws after a validator ran; use cloneRawRequest; `await next()` never throws, so try/catch cleanup middleware sees nothing and the error lands in c.error instead; validator() parses but does not authorize, and yields an empty object when Content-Type is missing; the hono/bun vs hono/cloudflare-workers adapter split, where Node built-ins, the filesystem, and module-scope state work on Bun and fail on Workers. Plus 2026 advisories: CORS credentials-with-wildcard origin reflection (CVE-2026-54290, HIGH). Chains: mir-backend -> mir-backend-bun (or mir-backend-node when served through @hono/node-server) -> this. TRIGGER only when the web framework is Hono - a Hono route, middleware, validator, RPC client, adapter, or stream handler, on any runtime.

API & Backend 15 stars 0 forks Updated 1 weeks ago Apache-2.0

Install

View on GitHub

Quality Score: 81/100

Stars 20%
40
Recency 20%
90
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# /mir-backend-bun-hono · Make It Right (Hono) Bottom tier of the chain: `mir-backend` (generic gates) → `mir-backend-bun` (Bun runtime model) → **this** (Hono library mechanics). Run the gates first; load the runtime tier for the process, scheduler, and install-time concerns; reach for *this* at Gate 5 (design mechanics), Gate 6 (implementation), and Gate 7 review. **Runtime-level concerns (Bun's event loop and worker model, Bun-native APIs, the test runner and bundler, install scripts and lockfile trust) live in `mir-backend-bun` — not here.** If the deploy target is Node through `@hono/node-server`, load `mir-backend-node` as the runtime tier instead. **Stack assumed (npm registry + GitHub advisory DB, 13 Aug 2026):** `hono@4.13.1` is `latest`, published 2026-08-07. Hono 4 is the only current major; there is no v5. The package has **zero runtime dependencies** and declares `engines.node >= 16.9.0`, but target the runtime tier's floor, not Hono's. Bun `1.3.14`. Companions: `@hono/node-server@2.1.0`, `@hono/zod-validator@0.9.0` (peer `hono >= 4.11.2`, `zod ^3.25 || ^4`), `@hono/standard-validator@0.4.0`, `@hono/zod-openapi@1.5.2`. Rate limiting is **not** built in — `hono-rate-limiter@0.5.3` is third-party. **Minimum patched version is 4.12.34**, not just "4.x" — see the advisory table in Security. 4.13.0 also reworked the core request path for speed and added HTTP `QUERY` method support; treat a 4.12→4.13 bump as a real upgrade and re-run route tests. ## The Hono footgu...

Details

Author
anantbhandarkar
Repository
anantbhandarkar/make-it-right
Created
3 months ago
Last Updated
1 weeks ago
Language
Python
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

AI & Automation Solid

mir-backend-bun

Make It Right (Bun runtime tier). Bun 1.3 reliability footguns shared across every Bun backend (Bun.serve, Hono, Elysia, or Express under bun) - Bun is a separate runtime on JavaScriptCore, not a faster Node. Covers: Node API gaps that present as silent stubs rather than errors, caught in CI or not at all; native addons that require() cleanly then abort on first real use; Bun.serve defaults that differ from node:http (10s idleTimeout that kills SSE, development:true leaking source in 500 pages); the single-thread model and silently ignored worker_threads options; bun:test running every file in ONE process with leaking globals; the text bun.lock and the blocked-install-scripts default. Chains: mir-backend -> this -> framework module. TRIGGER when the service runs on Bun in production, or when a Node-deployed project uses bun install / bun test in CI (then only the lockfile, install-script, and test sections apply). SKIP when the production runtime is Node.js with npm/pnpm/yarn - that is mir-backend-node, which

15 Updated 1 weeks ago
anantbhandarkar
API & Backend Solid

mir-backend-node

Make It Right (Node.js runtime tier). V8/Node 22–26 runtime reliability footguns that are shared across EVERY Node backend framework (Express, Fastify, NestJS, Hapi, Koa) — distinct from the generic backend gates and from any one framework's mechanics. Covers: the single-threaded event loop and what blocks it (sync I/O, huge JSON, synchronous crypto/zlib, long CPU loops, pathological regex), the absence of CPU parallelism on one process and how to get it (worker_threads / cluster), unhandled promise rejection crashes, serializing awaits in a loop vs. bounded Promise.all concurrency, stream backpressure, AbortSignal.timeout on every outbound call, uncaughtException semantics, heap limits under container memory, graceful shutdown with keep-alive sockets, async-context loss across callbacks and timers, require(esm) and native TypeScript type stripping, and npm supply-chain defaults after the 2025–2026 registry compromises. TRIGGER when the backend runtime is Node.js / V8 — sits between mir-backend (generic gates

15 Updated 1 weeks ago
anantbhandarkar
API & Backend Solid

mir-backend-node-nestjs

Make It Right (NestJS module). NestJS 11 + TypeScript specific reliability augmentation. Use alongside mir-backend and mir-backend-node when the target stack is NestJS — it carries the mechanical footguns that the framework-agnostic tiers deliberately omit: singleton DI scope bleeding request state across users, the full execution-order pipeline (middleware → guards → interceptors → pipes → handler → interceptors → exception filters) and why middleware is not a security boundary on the Fastify adapter, ValidationPipe with whitelist and forbidNonWhitelisted to stop mass assignment, ClassSerializerInterceptor as the outbound allow-list, the Express 5 route-syntax break that NestJS 11 inherits, the TypeScript 7 compiler-API break that stops nest build, and offloading durable work to BullMQ rather than running it in a request. TRIGGER only when the Node backend stack is NestJS — building, reviewing, or debugging a NestJS controller, provider, module, guard, pipe, interceptor, or exception filter, on either the Ex

15 Updated 1 weeks ago
anantbhandarkar