Open Source Backend Framework for Bun

NestJS architecture.
Without the decorators.

A lightweight, high-performance TypeScript backend framework for Bun. Provider-based architecture, explicit DI, and a fluent API that makes the right way the easy way.

bun add @orijs/orijs
Explore
app.ts
import { Ori, Type, Params } from '@orijs/orijs'
import type { OriController, RouteBuilder } from '@orijs/orijs'

class UsersController implements OriController {
  constructor(private users: UserService) {}

  configure(r: RouteBuilder) {
    r.get('/', () => this.users.findAll())
     .get('/:id', (ctx) => this.users.findById(ctx.params.id), {
        params: Params.uuid('id')
      })
  }
}

Ori.create()
  .provider(UserService)
  .controller('/users', UsersController, [UserService])
  .listen(3000)

Three observations.

NestJS gets architecture right but is heavy — decorators, reflect-metadata, complex modules. Bun changes the equation with native speed. And frameworks shouldn't lock you into their infrastructure choices. OriJs exists because we wanted all three solved at once.

No decorator magic

Fluent builder API replaces @Controller, @Get, @UseGuards. Your controllers are just classes — no framework magic needed for testing.

Swap anything

Every component implements a provider interface. Use Redis today, DynamoDB tomorrow. Your business logic never changes.

Explicit over magic

Dependencies are visible arrays, not metadata reflection. TypeScript catches mismatches at compile time, not runtime.

Everything you need,
nothing you don't.

Provider Architecture

Every infrastructure piece — caching, events, validation, logging — implements a swappable provider interface. No vendor lock-in.

No Decorators

Fluent builder API instead of decorators. No reflect-metadata overhead, no hidden control flow, simpler testing.

Built for Bun

Native Bun HTTP server, native TypeScript, built-in SQL drivers. Designed for Bun from the ground up.

Explicit DI

Dependency injection with explicit arrays. TypeScript catches mismatches, dependencies are visible, tree-shaking works.

Events & Workflows

Type-safe events with correlation tracking. Saga-pattern workflows with rollback. BullMQ for production, in-process for dev.

Guards & Interceptors

Request pipeline with guards for auth, interceptors for cross-cutting concerns, and pipes for input transformation.

Swap infrastructure,
not code.

No @Module system. No reflect-metadata. Just a fluent builder that wires providers, controllers, and services into a linear, visible application lifecycle.

  • BullMQ, Redis, or in-memory — your choice
  • Explicit dependency arrays
  • Singleton DI with circular detection
  • Managed lifecycle with shutdown hooks
app.ts
// Every infrastructure piece is a swappable provider
import { Ori } from '@orijs/orijs'
import { BullMQProvider } from '@orijs/bullmq'
import { RedisCacheProvider } from '@orijs/cache-redis'

Ori.create()
  // Swap BullMQ for Kafka, RabbitMQ, or SQS
  .events(new BullMQProvider(redisOpts))
  // Swap Redis for Memcached, DynamoDB, or in-memory
  .cache(new RedisCacheProvider(redisOpts))
  // Explicit DI — no decorators, no magic
  .provider(OrderService, [OrderRepo, EventEmitter])
  .controller('/orders', OrdersController, [OrderService])
  .listen(3000)

Ready to build?

One install. TypeScript. Bun. Ship it.

bun add @orijs/orijs

Other projects