Holu is a Hawaiian word for "to run" — and that's what this framework helps you do: run scalable server-side applications on Node.js, powered by DI, TypeScript, and true modularity.
English docs · Українська документація
Most Node.js frameworks give you routing and middleware. Holu gives you a full application architecture:
| Feature | Holu |
|---|---|
| TypeScript-first, native ESM | ✅ |
| Hierarchical DI (4 levels) | ✅ |
| True modularity with collision detection | ✅ |
| Extension system (pre-request hooks) | ✅ |
| REST and tRPC support | ✅ |
| OpenAPI generation | ✅ |
Providers are registered at four nested levels: App → Module → Route → Request. Child injectors inherit from parents; each level stays isolated. No global state, no leakage between modules.
@restModule({
providersPerMod: [DatabaseService], // shared across all routes in this module
providersPerReq: [RequestLogger], // fresh instance per request
})
export class UsersModule {}Modules declare exactly what they export. If two imported modules export the same token, the framework detects the collision at startup — no silent overrides.
@restModule({
imports: [{ path: 'admin', module: AdminModule, guards: [AuthGuard] }],
providersPerMod: [SharedService],
exports: [SharedService],
})
export class ApiModule {}Extensions run once at startup — before any request handler is created. They build routes, push interceptors dynamically, generate OpenAPI docs, or open DB connections. All async, ordered, and composable.
@injectable()
export class DbExtension implements Extension<void> {
constructor(@inject(PROVIDERS_PER_APP) private providersPerApp: Provider[]) {}
async stage1(): Promise<void> {
const db = await createDbConnection();
this.providersPerApp.push({ token: DbClient, useValue: db });
}
}npx @holu/cli new my-app
cd my-app
npm start:devOr a minimal single file:
import { RestApplication, controller, route, restRootModule } from '@holu/rest';
@controller()
class HelloController {
@route('GET', 'hello')
hello() {
return 'Hello, World!';
}
}
@restRootModule({ controllers: [HelloController] })
class AppModule {}
const app = await RestApplication.create(AppModule);
app.server.listen(3000);| Package | Description |
|---|---|
@holu/core |
DI, modules, extensions |
@holu/cli |
CLI for scaffolding and development |
@holu/rest |
REST HTTP layer |
@holu/trpc |
tRPC support |
@holu/openapi |
OpenAPI 3.x generation |
@holu/authjs |
Auth.js support |
@holu/typeorm |
TypeORM support |
@holu/body-parser |
Request body parsing |
@holu/cors |
CORS support |
@holu/jwt |
JWT authentication |
@holu/schedule |
Cron/interval/timeout tasks |
@holu/i18n |
Internationalization |
@holu/session-cookie |
Session management |
@holu/sentry |
Sentry error reporting |
@holu/rest-testing |
Testing utilities |
Benchmarks vs other Node.js frameworks
This monorepo uses Yarn workspaces.
corepack enable && corepack install
yarn install && yarn prepare && yarn buildRun any example in dev mode:
cd examples/01-hello-world
yarn startPreview English docs:
yarn docs-enDocs live in website/i18n/en/docusaurus-plugin-content-docs/current/.
