Modular framework for Elysia and Bun.
Decorators · DI · Modules · Elysia speed.
@Controller, @Get, @Post, @Body and more — a clean, declarative decorator API running natively on Elysia.
Nestelia maps each decorated route directly to an Elysia handler, giving you full type inference and schema validation at the framework layer.
import { Controller, Get, Post, Body } from 'nestelia'
import { CreateUserDto } from './dto'
@Controller('/users')
export class UsersController {
@Get()
findAll() {
return { users: [] }
}
@Post()
create(@Body() dto: CreateUserDto) {
return dto
}
}Constructor-based DI with singleton, transient, and request scopes powered by reflect-metadata.
Mark any class with @Injectable() and declare it as a provider — nestelia resolves the full dependency graph automatically at bootstrap.
import { Injectable } from 'nestelia'
@Injectable()
export class UsersService {
private users: User[] = []
async findAll(): Promise<User[]> {
return this.users
}
async create(dto: CreateUserDto): Promise<User> {
this.users.push(dto)
return dto
}
}Encapsulate controllers, providers, and imports into cohesive, reusable modules with a clear, explicit structure.
One call to createElysiaApplication wires up the entire dependency graph and returns a ready Elysia instance.
import 'reflect-metadata'
import { createElysiaApplication } from 'nestelia'
import { AppModule } from './app.module'
const app = await createElysiaApplication(AppModule)
app.listen(3000)
// Listening on http://localhost:3000NestJS-style DX at Elysia-level speed — near-zero overhead from decorators and DI.
Optional packages — install only what you need.
nestelia/scheduler@Cron, @Interval, @Timeout — task scheduling powered by node-cron.
nestelia/microservicesTCP and Redis transports with @MessagePattern and @EventPattern.
nestelia/apolloCode-first GraphQL with @Resolver, @Query, @Mutation, @Subscription.
nestelia/passportAuthGuard and PassportStrategy — drop-in authentication strategies.
nestelia/cacheCacheModule with @CacheKey, @CacheTTL and pluggable cache stores.
nestelia/rabbitmq@RabbitSubscribe and @RabbitRPC over AMQP via amqplib.
nestelia/testingTest.createTestingModule — isolated module testing with mock providers.
nestelia/graphql-pubsubRedis-backed PubSub for real-time GraphQL subscriptions.