Skip to content

OrbitNestJS-style Framework for Bun

Fast, modular, and fully optimized for the Bun runtime

Quick Example

typescript
import { BunFactory, Module, Controller, Get, Injectable } from '@galaxy-stack/orbit-core';

@Injectable()
class UserService {
  getUsers() {
    return [{ id: 1, name: 'John' }];
  }
}

@Controller('users')
class UserController {
  constructor(private userService: UserService) {}

  @Get()
  findAll() {
    return this.userService.getUsers();
  }
}

@Module({
  controllers: [UserController],
  providers: [UserService],
})
class AppModule {}

const app = await BunFactory.create(AppModule);
await app.listen(3000);

Why Orbit?

FeatureOrbitNestJS
RuntimeBun (native)Node.js
HTTP ServerBun.serve()Express/Fastify
Password HashingBun.passwordbcrypt
MicroservicesNative TCPExternal libs
Cold Start~10ms~100ms
Memory UsageLowerHigher

Packages Overview

Orbit is a monorepo with 32 packages organized by functionality:

  • Core: @galaxy-stack/orbit-core, @galaxy-stack/orbit-common, @galaxy-stack/orbit-config, @galaxy-stack/orbit-validation
  • Database: @galaxy-stack/orbit-database, @galaxy-stack/orbit-cache
  • Microservices: @galaxy-stack/orbit-microservices-tcp, redis, nats, rmq, kafka, grpc
  • GraphQL: @galaxy-stack/orbit-graphql, @galaxy-stack/orbit-graphql-federation
  • Security: @galaxy-stack/orbit-auth, @galaxy-stack/orbit-security, @galaxy-stack/orbit-throttler
  • Observability: @galaxy-stack/orbit-observability, @galaxy-stack/orbit-logger, @galaxy-stack/orbit-telemetry
  • Tools: orbit, @galaxy-stack/orbit-testing, @galaxy-stack/orbit-devtools

Released under the MIT License.