Our Principle
Design for Humans
Our goal is to design an ergonomic, sensible, and productive framework that even beginners can use easily
Designed to avoid unnecessary complexity and type complexity for you to focus on building
A framework that feels just like JavaScript
import { Elysia, file } from 'elysia'
new Elysia()
.get('/', 'Hello World')
.get('/image', file('mika.webp'))
.get('/stream', function* () {
yield 'Hello'
yield 'World'
})
.ws('/realtime', {
message(ws, message) {
ws.send('got:' + message)
}
})
.listen(3000)
Bring your own Validator
With support for Standard Schema
Elysia offers a robust built-in validation, but you can also bring your favorite validator, lik Zod, Valibot, ArkType, Effect , etc.
With seamless support for type inference, and OpenAPI. You will feels right at home.
import { Elysia, t } from 'elysia'
new Elysia()
// Try hover body ↓
.post('/user', ({ body }) => body, {
body: t.Object({
name: t.Literal('SaltyAom'),
age: t.Number(),
friends: t.Array(t.String())
})
})
import { Elysia } from 'elysia'
import { z } from 'zod'
new Elysia()
// Try hover body ↓
.post('/user', ({ body }) => body, {
body: z.object({
name: z.literal('SaltyAom'),
age: z.number(),
friends: z.array(z.string())
})
})
import { Elysia } from 'elysia'
import * as v from 'valibot'
new Elysia()
// Try hover body ↓
.post('/user', ({ body }) => body, {
body: v.object({
name: v.literal('SaltyAom'),
age: v.number(),
friends: v.array(v.string())
})
})
import { Elysia } from 'elysia'
import { type } from 'arktype'
new Elysia()
// Try hover body ↓
.post('/user', ({ body }) => body, {
body: type({
name: '"Elysia"',
age: 'number',
friends: 'string[]'
})
})
import { Elysia } from 'elysia'
import { Schema } from 'effect'
new Elysia()
// Try hover body ↓
.post('/user', ({ body }) => body, {
body: Schema.standardSchemaV1(
Schema.Struct({
name: Schema.Literal('Elysia'),
age: Schema.Number,
friends: Schema.Array(Schema.String)
})
)
})
Best in Class Type Safety
Your own documentation in 1 line
It's not magic
With deep integration with OpenAPI schema
Elysia can generate API documentation for out of the box

import Elysia from 'elysia'
import openapi from '@elysiajs/openapi'
new Elysia()
.use(openapi())
.listen(3000)
11.88ms
POST /character/:id/chat
Playback
For DevOps
OpenTelemetry
Elysia has 1st party support for OpenTelemetry. Instrumentation is built-in, so you can easily monitor your services on regardless of the platform.
import { treaty } from '@elysiajs/eden'
import type { App } from './server'
const api = treaty<App>('api.elysiajs.com')
const { data } = await api.profile.patch({
age: 21
})
For Frontend
End-to-end Type Safety
Like tRPC, Elysia provides type-safety from the backend to the frontend without code generation. The interaction between frontend and backend is both type-checked on compile and runtime.
21x
faster than Express
6x
faster than Fastify
Elysia Bun
2,454,631 reqs/sGin Go
676,019
Spring Java
506,087
Fastify Node
415,600
Express Node
113,117
Nest Node
105,064
Measured in requests/second. Result from TechEmpower Benchmark Round 22 (2023-10-17) in PlainText
Test with Confidence
Type safe with auto-completion
Elysia provides a type-safe layer to interact with and test your server, from routes to parameters.
With auto-completion, you can easily write tests for the server without any hassle.
import { treaty } from '@elysiajs/eden'
import { app } from './index'
import { test, expect } from 'bun:test'
const server = treaty(app)
test('should handle duplicated user', async () => {
const { error } = await server.user.put({ username: 'mika',
})
expect(error?.value).toEqual({
success: false,
message: 'Username already taken'
})
})
What people says about
Because of You
Elysia is not owned by an organization , driven by volunteer, and community. Elysia is possible by these awesome sponsors.
Gold Sponsors 💛
Silver Sponsors 🤍
Generous Sponsors 💞
_typedev
for 2 years
DOM CHAROENYOS
for 2 years
Luis Bizarro
for 15 days
David J. Ortiz-Rivera
for 3 days
Naoki Takahashi
for a year
Khyber Sen
for 2 years
MeCode
for 2 years
yoyismee
for 2 years
Huly® Platform™
for a year
Vallaris Maps Platforms
for a year
Firat Özcan
for a year
Speakeasy
for 10 months
TranspaClean
for 7 months
Alex Ozerov
for 3 days
Isman Usoh
for a day
And you
Individual Sponsors 💕
Thank you for making Elysia possible
We can only develop Elysia full-time thanks to your supports.
With love from our community
Elysia
Ergonomic Framework for Humans
Speed
Top Performance
Type Safety
Best in class
Developer Experience
Exceptional
OpenAPI Support
One of a kind