What is Bedstack?

A bleeding-edge architecture for high-performance TypeScript backends.

Bedstack is a bleeding-edge tech stack and architectural pattern for building backend applications with TypeScript. Its name is an acronym for Bun + ElysiaJS + Drizzle.

Beyond the Acronym

While the name highlights the core tools, Bedstack is primarily a philosophy and architecture for backend development. It is designed to guide developers into the "pit of success" by making the right decisions the easiest ones to make.

Core Philosophy

  1. Typesafety by Default: Types are not a separate layer; they flow through the entire system—from the database schema to the API response.
  2. Performance First: By leveraging the Bun runtime and lightweight libraries like Elysia and Drizzle, Bedstack apps are optimized for low latency and high throughput.
  3. Modular & Layered: A strict separation between Controllers, Services, and Repositories ensures that your application remains maintainable as it grows.
  4. Minimal Friction: Bedstack aims for zero-boilerplate. We favor concise, expressive code over verbose configuration.

The Tech Stack

The selected technologies share Bedstack's core philosophy:

  • Bun - The foundation. A fast, all-in-one JavaScript runtime, package manager, and test runner.
  • ElysiaJS - The interface. A performance-first web framework with end-to-end typesafety.
  • Drizzle ORM - The persistence. A lightweight, headless ORM that feels like writing SQL.
  • ArkType - The validator. A high-performance validation library that matches TypeScript's type system 1:1.
  • ArkEnv - The configuration. Typesafe environment variable validation built on ArkType.

Why use Bedstack?

Bedstack is unapologetically opinionated. A tech stack is not just a menu of options; it is a curated path. We've selected these tools because they reinforce each other to create a developer experience that is both fast and safe.

Whether you are building a small MVP or a large-scale production system, the Bedstack Architecture provides the structure you need to move fast without breaking things.


FAQ

On this page