Elysia.js

TypeScript-first web framework optimized for Bun runtime. Focuses on end-to-end type safety, performance (among the fastest Node.js/Bun frameworks), and ergonomics. Built-in OpenAPI documentation generation, Eden Treaty client for type-safe API calls, and schema validation via TypeBox. Inspired by tRPC but for REST APIs.

Evaluated Mar 06, 2026 (0d ago) v1.x
Homepage ↗ Repo ↗ Developer Tools bun typescript web-framework rest-api fast type-safe e2e-type-safety open-api
⚙ Agent Friendliness
62
/ 100
Can an agent use this?
🔒 Security
79
/ 100
Is it safe for agents?
⚡ Reliability
72
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
82
Error Messages
80
Auth Simplicity
85
Rate Limits
82

🔒 Security

TLS Enforcement
80
Auth Strength
78
Scope Granularity
75
Dep. Hygiene
82
Secret Handling
82

TypeBox schema validation provides input validation security. CORS configured via plugin. No built-in rate limiting — implement via middleware.

⚡ Reliability

Uptime/SLA
75
Version Stability
72
Breaking Changes
68
Error Recovery
75
AF Security Reliability

Best When

Building TypeScript Bun-based API services where end-to-end type safety and OpenAPI auto-generation matter.

Avoid When

Node.js-only environments or teams preferring Express/Fastify's mature ecosystem.

Use Cases

  • Build high-performance REST APIs in TypeScript/Bun with automatic OpenAPI documentation generation
  • Implement type-safe API servers where Eden Treaty provides a type-safe client matching server routes
  • Create modular API services with Elysia's plugin system for reusable route groups and middleware
  • Build Bun-based microservices that benefit from Bun's faster startup time and native TypeScript support
  • Replace Express/Fastify with a type-safe, ergonomic API framework in Bun-first projects

Not For

  • Node.js-primary projects — Elysia is optimized for Bun; performance benefits are reduced on Node.js
  • Teams unfamiliar with TypeScript type gymnastics — Elysia's type system is advanced; complex generics can be confusing
  • Projects requiring mature ecosystem — Elysia is newer and has fewer plugins than Express/Fastify

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Framework — auth via middleware. No built-in auth, but jwt and session plugins available.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT licensed open source framework.

Agent Metadata

Pagination
none
Idempotent
Partial
Retry Guidance
Not documented

Known Gotchas

  • Elysia is optimized for Bun — performance on Node.js is good but not the primary target; use Hono for Node.js-first projects
  • Eden Treaty client requires exact type matching — changing server types without updating client breaks type safety; regenerate or use strict TypeScript
  • Plugin order matters — lifecycle hooks (onBeforeHandle, onError) register in plugin order; incorrect ordering causes middleware to skip
  • TypeBox schema is required for validation — Elysia doesn't use Zod by default; switch requires @elysiajs/zod or TypeBox compatibility
  • Elysia 1.0 changed the API significantly from 0.7 — older tutorials may use different method names and plugin patterns
  • Context (ctx) is shared via reference in lifecycle hooks — mutating ctx.body in middleware changes what handlers receive; use immutable patterns when possible

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for Elysia.js.

$99

Scores are editorial opinions as of 2026-03-06.

5215
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered