Introduction to DaloyJS
DaloyJS is a runtime-portable TypeScript web framework with built-in contract-first routing, validation, OpenAPI (via Hey API), typed client generation, large-scale maintainability, and core security guardrails plus first-party security middleware — backed by pnpm plus hardened install and release controls.
The name comes from the Tagalog word daloy, meaning flow, pronounced da-loy. The project also uses the Baybayin spelling ᜇᜎᜓᜌ᜔. See About the name for the short version.
Why another framework?
Each existing stack is excellent at one thing and forces trade-offs everywhere else. DaloyJS combines the best ideas without the lock-in:
- OpenAPI ergonomics on par with FastAPI — built into the core, not bolted on.
- Vercel/serverless/edge fit on par with Hono — web-standard
Request → Response. - Mature plugin/lifecycle/ops story on par with Fastify.
- TS-first DX on par with Elysia — without forcing you onto Bun.
- Hey API typed client generation as a first-class workflow.
- Supply-chain-hardened installs and publishing via pnpm plus hardened repo defaults.
The 30-second taste
import { App } from "@daloyjs/core";
import { z } from "zod";
import { serve } from "@daloyjs/core/node";
const app = new App();
app.route({
method: "GET",
path: "/hello/:name",
operationId: "sayHello",
request: { params: z.object({ name: z.string() }) },
responses: {
200: { description: "Greeting", body: z.object({ msg: z.string() }) },
},
handler: async ({ params }) => ({
status: 200,
body: { msg: `Hello, ${params.name}` },
}),
});
serve(app, { port: 3000 });That single route definition gives you:
- Strict, typed
paramsin your handler. - A typed return — TypeScript knows
200 → { msg: string }. - An OpenAPI 3.1 entry under
operationId: sayHello. - A typed client method
client.sayHello({ params: { name: string } }). - An entry in
app.introspect()for tooling and contract tests.
Where to next?
- Installation — get DaloyJS into your project.
- Getting started — your first server in 5 minutes.
- Tutorial: build a bookstore API.
- API reference.