Elysia is a web framework built for Bun, written in TypeScript. It targets developers who want a fast HTTP server with type safety that flows from the backend all the way to the client, without writing separate schema definitions or relying on code generation steps.
The framework's core pitch is a single source of truth for types: what you define on the server becomes the type contract consumed by clients, similar in spirit to tRPC's "move fast and break nothing" philosophy, but built specifically for Bun's runtime. It also claims strong raw throughput, citing TechEmpower benchmark results showing it significantly outperforming Express.
It's aimed at TypeScript developers building APIs, RPC-style backends, or full-stack apps who want compile-time guarantees about request and response shapes, and who are comfortable running on Bun rather than Node.js.
Elysia fits projects that are already committed to, or willing to adopt, Bun as the runtime. It works well for building typed REST or RPC APIs where you want the client and server to share types without a separate contract layer, such as full-stack TypeScript apps, internal tooling APIs, or microservices that need to communicate with a typed frontend.
It's also a reasonable choice if you're building a GraphQL backend and want type safety baked in, or if raw HTTP throughput on Bun is a priority for your workload.
It is not the right choice if your deployment target is locked to Node.js only, or if you need a framework with the largest possible middleware ecosystem (Express and Fastify have more mature, battle-tested plugin libraries built over many years). Teams unfamiliar with Bun's tooling and deployment model should also budget time to learn that runtime before adopting Elysia in production.
The quickest way to start a new project is through Elysia's scaffolding command, which requires Bun installed on your machine:
bun create elysia app
This scaffolds a new Elysia application in the app directory with the necessary configuration and dependencies already wired up. From there, move into the project directory and run it with Bun's standard scripts (check the generated package.json for the exact dev/start commands).
For adding Elysia to an existing Bun project, install it as a dependency with Bun's package manager and import it directly in your TypeScript code to start defining routes. Full API documentation, guides, and plugin references are available on the project's documentation site.