The first TypeScript REST API framework built for secure AI-assisted services
DaloyJS combines runtime portability, contract-first OpenAPI, generated typed clients, zero-dependency runtime guardrails, and supply-chain-aware project defaults in one framework.
$ pnpm create daloy@latest my-api- 2,357/2,357 tests passing
- ≥90% line/function and ≥92% branch coverage gates
- 0 runtime dependencies
- Node 24 LTS, Node 26+, Bun, Deno, Cloudflare
- MIT licensed
Any framework can route a request. DaloyJS is built for what happens next: one route definition drives validation, types, OpenAPI 3.1, and a Hey API typed client, and the guardrails AI-assisted code forgets (body limits, timeouts, prototype-pollution-safe parsing, 5xx redaction) ship already switched on. Rate limits, CORS allowlists, and CSRF are one app.use() line, because those are policy. Set docs: true on the App constructor and DaloyJS auto-mounts a Scalar API reference at /docs and the live OpenAPI 3.1 spec at /openapi.json, the same DX as FastAPI.
ᜇᜎᜓᜌ᜔ Daloy means flow in Tagalog, pronounced da-loy. About, the name
New to backend TypeScript? Start with the bookstore tutorial. Evaluating options for a team? Everything below answers one question: what does DaloyJS have that the others don't?
Why DaloyJS
There are plenty of good ways to route an HTTP request in JavaScript. This is what the others don't give you: secure by default at the runtime layer, pnpm install-time hardening shipped with create-daloy, and an optional hardened GitHub Actions bundle, so the app-safe pieces of the LLM-era supply-chain defense are on the happy path without giving up OpenAPI ergonomics, runtime portability, typed clients, or Node ops.
Secure-by-default runtime
Zero runtime dependencies
Supply-chain-hardened scaffolds
AI-native scaffolding
Contract-first by design
Runtime-portable
Hey API typed clients
Streaming & observability
Batteries included
Hello, contract
One route, types, validation, OpenAPI, and the typed client all generated from it.
Scalar API reference, one line
Scalar is the modern successor to Swagger UI: fast, clean, dark-mode-native, with built-in try-it requests. In DaloyJS it is the default docs UI, not a plugin: docs: true on the App constructor auto-mounts this page at /docs and the live OpenAPI 3.1 spec at /openapi.json.
Generated from your route contracts, zero extra code. Prefer Swagger UI or Redoc? Both are one config field away. OpenAPI & docs UI guide →
Competitor strengths, fewer tradeoffs
DaloyJS is not trying to win one checkbox. It is trying to remove the glue work between the best ideas developers already like.
Benchmarks
The numbers, with the asterisks attached
DaloyJS ships security on by default, so a fair comparison has to say so out loud. These charts come straight from the repo's own benchmark suite, and the caveats are part of the chart.
How DaloyJS measures up
Transitive dependencies installed
Every package your install pulls in is attack surface someone has to trust. DaloyJS and Hono are the only two that bring zero.
What this means for you: Fewer packages to trust means fewer CVEs and no surprise postinstall scripts. Zero dependencies is zero supply-chain doors left open for an attacker.
Takeaway: DaloyJS installs 0 transitive dependencies, tied with Hono for the smallest supply-chain surface, while a secure NestJS app drags in 86.
Apple M3 Max · 16 cores · Node v24.3.0 · August 2026 · @daloyjs/core 1.1.0 (stable) · source in bench/cross-framework
Why this is apples to oranges
- Apples vs oranges, not apples to apples. These are different tools doing different amounts of work. On every request, DaloyJS validates the body against your Zod or Valibot schema and runs secure headers, a request ID, body-size limits, and request timeouts, all out of the box. The 'minimal' apps for the other frameworks do almost none of this, and even 'secure parity' rarely matches it one for one. So part of every DaloyJS number is security and validation you would otherwise have to build yourself.
- Footprint methodology differs: DaloyJS is one zero-dependency package, while the others resolve transitive trees whose exact size depends on when the lockfile was generated.
- Throughput is workload-shaped: with a comparable middleware stack on both sides, DaloyJS comes out ~37% ahead of Hono on these GET routes and ~76% ahead on the POST body route — and DaloyJS is additionally Zod-validating that body. Real services are usually bound by database and I/O time, not framework dispatch, so these micro-numbers rarely predict production.
- Different target runtimes: some frameworks (e.g. Elysia) are tuned for Bun but are measured here under their Node adapters for a fair single-runtime baseline.
- Single machine, single moment: one Apple M3 Max, Node v24.3.0, August 2026, against the stable @daloyjs/core 1.1.0. Your hardware, runtime, and versions will move these numbers.
Support the project
If DaloyJS saves you time, you can buy me a coffee
DaloyJS is free and MIT-licensed. If the docs, posts, or the framework itself helped you ship something with a little less drama, coffee is a perfectly reasonable way to keep the work going.
Ready to ship, secure by default?
Scaffold a project in seconds with pnpm hardening when you choose pnpm, generated CI that blocks install scripts, pinned GitHub Actions, Dependabot, CODEOWNERS, and lockfile source verification. Then keep the contract as the app grows, the same app runs on Node, Bun, Deno, and Cloudflare Workers.
For developers and AI agents
DaloyJS is MCP-ready
The Model Context Protocol (MCP) is the open standard AI agents like Claude, Cursor, and VS Code use to call tools and read docs. DaloyJS supports it on both ends: your app can become an MCP server, and these docs already are one.
Turn your API into an MCP server
DaloyJS builds MCP servers from @daloyjs/core alone, no SDK required: Streamable HTTP transport, input-schema validation, and a production boot guard that refuses to ship an unauthenticated MCP endpoint by accident.
Read these docs over MCP
A public, read-only endpoint your AI coding agent can search and read without copy and paste. No API key needed.
Endpoint
https://daloyjs.dev/mcpsearch_docsKeyword search across every docs page, ranked by relevance.get_docRead the full text of one page by its route or slug.list_docsBrowse every available documentation page in one call.
Add it to your MCP client config
Using a stdio-only client? Bridge it with npx -y mcp-remote https://daloyjs.dev/mcp.