Skip to content

Imperium

Inspired by NestJS, built on top of tsyringe, Fastify, and ConnectRPC.

Imperium is a modular DI framework for TypeScript services that need:

  • a single server for HTTP, RPC, and WebSocket;
  • module boundaries with explicit exports/imports;
  • request-scoped handlers;
  • Nest-like decorators and lifecycle hooks;
  • structured logging and schema-validated runtime config.

Start Here

Installation

bash
pnpm add @smounters/core reflect-metadata tsyringe fastify @connectrpc/connect @connectrpc/connect-fastify zod

In your entrypoint:

ts
import "reflect-metadata";

Public Import Paths

Root import is intentionally disabled. Use subpaths:

  • @smounters/core/core
  • @smounters/core/decorators
  • @smounters/core/services
  • @smounters/core/pipes
  • @smounters/core/validation
  • @smounters/core/ws

Validation subpath also exports the built-in app config schema:

  • appConfigSchema
  • AppConfig

Ecosystem

PackageDescription
@smounters/coreCore framework (this package)
@smounters/cronCron scheduling with @Cron() decorator

All packages are in a single monorepo.

Last updated:

Inspired by NestJS. Built for internal and public TypeScript backends.