A comprehensive TypeScript monorepo containing libraries for building distributed systems and data processing applications with full support for both Node.js and Bun runtimes.
Omnitron provides a suite of production-ready TypeScript packages for building scalable, distributed applications with focus on:
- Cross-Runtime Support - First-class support for both Node.js 22+ and Bun 1.2+
- Enterprise Framework - Titan provides integrated DI, WebSocket RPC, and module system
- Real-time Communication - Built-in WebSocket-based RPC and event streaming
- Data Processing - Efficient serialization and buffer manipulation
- Developer Experience - Type safety, decorator-based APIs, and comprehensive docs
All packages are designed and tested to work seamlessly with:
- Node.js >= 22.0.0 (primary runtime)
- Bun >= 1.2.0 (fully supported with dedicated tests)
- Deno (experimental support in select packages)
Enterprise backend framework with integrated dependency injection and distributed systems support.
- Integrated Nexus DI - Full dependency injection container
- Integrated Netron - WebSocket RPC framework
- Built-in Modules - Config, Events, Scheduler, Redis, Logger
- Application Lifecycle - Graceful startup/shutdown, state management
- Decorator-based API - Clean, declarative syntax
- β Node.js 22+ compatible
- β Bun 1.2+ compatible
- π§ Deno support (experimental)
Essential utilities and helper functions for TypeScript/JavaScript projects.
- Promise utilities (defer, delay, retry, timeout)
- Object manipulation (omit, entries, keys, values)
- Type predicates and guards
- Data structures (ListBuffer, TimedMap)
- β Node.js & Bun compatible
Universal event emitter with both synchronous and asynchronous emission patterns.
- Standard EventEmitter API (on, off, emit, once)
- Parallel and sequential async event execution
- Reduce patterns for event accumulation
- Concurrency control with p-limit
- Promise-based event handling
- β Works in Node.js, Bun, and browsers
Collision-resistant unique identifiers generator.
- Secure random ID generation
- Timestamp-based ordering
- URL-safe characters
- β Node.js & Bun compatible
High-performance MessagePack serialization with TypeScript support.
- Full MessagePack specification support
- Custom type extensions
- Efficient binary serialization
- Stream processing capabilities
- Browser-compatible with polyfills
- β Node.js & Bun compatible
Redis-based reliable notification and messaging system with guaranteed delivery.
- β Exactly-once processing with deduplication
- π Configurable retry mechanisms with exponential backoff
- β²οΈ Delayed message delivery and scheduling
- π Dead Letter Queue (DLQ) for failed messages
- π Built-in statistics and monitoring
- π§ Extensible middleware system
- π Consumer groups for horizontal scaling
Testing utilities and helpers for all Omnitron packages.
- Mock factories
- Test fixtures
- Async test utilities
- Container testing helpers
- Redis test utilities
Template for creating Titan framework modules.
- Boilerplate for new modules
- Example implementations
- Best practices guide
Choose your runtime:
- Node.js >= 22.0.0, or
- Bun >= 1.2.0
- Yarn 4.9.2 (package manager)
# Clone the repository
git clone https://github.com/omnitron-dev/omni.git
cd omni
# Install dependencies
yarn install
# Build all packages
yarn build# Run in development mode
yarn dev
# Run tests (uses your default runtime)
yarn test
# Run tests with specific runtime
yarn test:node  # Node.js tests
yarn test:bun   # Bun tests
# Lint and format code
yarn fix:all
# Create changeset for version management
yarn changeset
# Clean all node_modules
yarn cleanup# Run commands for specific package
yarn workspace @omnitron-dev/titan test
yarn workspace @omnitron-dev/common build
# Add dependencies to specific package
yarn workspace @omnitron-dev/common add lodash
# Run package-specific scripts
yarn workspace @omnitron-dev/titan devomni/
βββ packages/                  # All published packages
β   βββ common/               # Shared utilities
β   βββ cuid/                 # Unique ID generation
β   βββ eventemitter/         # Event emitter
β   βββ msgpack/              # MessagePack serialization
β   βββ rotif/                # Redis messaging system
β   βββ testing/              # Testing utilities
β   βββ titan/                # Enterprise framework
β   β   βββ src/
β   β   β   βββ nexus/       # Integrated DI container
β   β   β   βββ netron/      # Integrated WebSocket RPC
β   β   β   βββ modules/     # Built-in modules
β   βββ titan-module-template/ # Module template
βββ scripts/                  # Build and utility scripts
βββ turbo.json               # Turborepo configuration
- Language: TypeScript 5.8.3 - 5.9.2 with strict mode
- Runtime: Node.js 22+ and Bun 1.2+ (both fully supported)
- Build System: Turborepo for monorepo orchestration
- Package Manager: Yarn 4.9.2 with workspaces
- Testing: Jest 30.x (Node.js), Bun test (Bun runtime)
- Linting: ESLint v9 with flat config
- Formatting: Prettier
- Versioning: Changesets
- Runtime Agnostic - Full support for Node.js and Bun
- Type Safety First - Full TypeScript with strict typing
- Zero/Minimal Dependencies - Keep packages lightweight
- Performance Focused - Optimized for production use
- Developer Experience - Decorator-based APIs and clear documentation
- Modular Architecture - Use only what you need
Each package contains detailed documentation:
- Titan Framework Guide
- Common Utilities Guide
- Event Emitter Guide
- MessagePack Guide
- Rotif Messaging Guide
- CUID Generator Guide
- Testing Utilities Guide
import { Application, Module, Injectable, OnStart } from '@omnitron-dev/titan';
@Injectable()
class GreetingService {
  greet(name: string): string {
    return `Hello, ${name}!`;
  }
}
@Module({
  providers: [GreetingService],
  exports: [GreetingService]
})
class AppModule implements OnStart {
  constructor(private greeting: GreetingService) {}
  async onStart(): Promise<void> {
    console.log(this.greeting.greet('Titan'));
  }
}
// Create and run application
const app = await Application.create(AppModule);
await app.start();import { Service, Public } from '@omnitron-dev/titan/netron';
@Service('calculator@1.0.0')
class CalculatorService {
  @Public()
  add(a: number, b: number): number {
    return a + b;
  }
}
// Service is automatically exposed via Titan's Netron integrationimport { encode, decode } from '@omnitron-dev/msgpack';
const data = { user: 'John', scores: [1, 2, 3] };
const encoded = encode(data); // Buffer
const decoded = decode(encoded); // Original dataimport { EventEmitter } from '@omnitron-dev/eventemitter';
const emitter = new EventEmitter();
// Works in both Node.js and Bun
emitter.on('data', async (value) => {
  await processData(value);
});
// Sequential async processing
await emitter.emitSerial('data', payload);
// Parallel async processing with concurrency control
emitter.setConcurrency(5);
await emitter.emitParallel('data', payload);import { NotificationManager } from '@omnitron-dev/rotif';
const manager = new NotificationManager({
  redis: 'redis://localhost:6379',
  maxRetries: 3,
});
// Publish with guaranteed delivery
await manager.publish('order.created', { orderId: '123' });
// Subscribe with automatic retry
await manager.subscribe('order.*', async (msg) => {
  await processOrder(msg.payload);
  await msg.ack(); // Acknowledge on success
});All packages are tested with multiple runtimes:
# Test with Node.js
yarn workspace @omnitron-dev/[package] test:node
# Test with Bun
yarn workspace @omnitron-dev/[package] test:bun
# Run all runtime tests
yarn workspace @omnitron-dev/[package] test:allWe welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (git checkout -b feature/amazing-feature)
- Commit your changes using conventional commits
- Push to the branch (git push origin feature/amazing-feature)
- Open a Pull Request
- Write tests for new features (test with both Node.js and Bun)
- Follow existing code patterns
- Update documentation
- Add changeset for version bumps
- Ensure all tests pass in both runtimes
| Package | Node.js | Bun | Deno | Version | 
|---|---|---|---|---|
| @omnitron-dev/common | β | β | π§ | 0.1.0 | 
| @omnitron-dev/cuid | β | β | π§ | 0.1.0 | 
| @omnitron-dev/eventemitter | β | β | π§ | 0.1.0 | 
| @omnitron-dev/msgpack | β | β | π§ | 0.1.0 | 
| @omnitron-dev/rotif | β | β | β | 0.1.0 | 
| @omnitron-dev/testing | β | β | β | 0.1.0 | 
| @omnitron-dev/titan | β | β | π§ | 0.1.0 | 
| @omnitron-dev/titan-module-template | β | β | β | 0.1.0 | 
Legend: β Full Support | π§ Experimental | β Not Supported
This project is licensed under the MIT License - see the LICENSE file for details.
Created and maintained by the Omnitron team.