Blazing-fast framework for building highly efficient, infinitely scalable, and battle-tested enterprise-grade full-stack applications with TypeScript.
Website β’ Documentation β’ Examples
Venok is a cutting-edge TypeScript framework that combines the best of modern development practices with enterprise-grade performance. Built from the ground up for scale, Venok delivers unparalleled developer experience while maintaining lightning-fast runtime performance.
Venok's architecture is built around a powerful dependency injection container that manages the entire application lifecycle:
- β‘ Lightning Fast: Optimized for performance with minimal overhead
- ποΈ Enterprise-Grade DI: Powerful dependency injection system with full control over the application lifecycle
- π Multi-Protocol Support: Built-in HTTP and WebSocket support out of the box
- π§ NestJS Compatible: Seamless integration with existing NestJS packages and ecosystem
- π― Type-Safe: First-class TypeScript support with full type inference
- π¦ Modular Architecture: Clean, scalable module system for better code organization
- π RxJS Integration: Reactive programming with Observable streams
- π‘οΈ Battle-Tested: Production-ready with comprehensive error handling
- π Advanced DI: Request-scoped providers, circular dependency resolution, and more
bun add @venok/core @venok/http reflect-metadataimport { Injectable, Module, Controller, Get } from '@venok/core';
import { VenokFactory } from '@venok/core';
import { HttpModule } from '@venok/http';
@Injectable()
export class AppService {
getHello(): string {
return 'Hello, World from Venok! π';
}
}
@Controller('api')
export class AppController {
constructor(private readonly appService: AppService) {}
@Get('hello')
getHello(): string {
return this.appService.getHello();
}
}
@Module({
imports: [HttpModule],
controllers: [AppController],
providers: [AppService],
})
export class AppModule {}
async function bootstrap() {
const app = await VenokFactory.createApplicationContext(AppModule);
await app.listen(3000);
console.log('π Application running on http://localhost:3000');
}
bootstrap();import { Module } from '@venok/core';
import { WebSocketModule, WebSocketGateway, SubscribeMessage, MessageBody } from '@venok/websocket';
@WebSocketGateway({ port: 8080 })
export class ChatGateway {
@SubscribeMessage('message')
handleMessage(@MessageBody() data: string): string {
return `Echo: ${data}`;
}
}
@Module({
imports: [WebSocketModule],
providers: [ChatGateway],
})
export class AppModule {}Venok's DI system is designed for enterprise applications with advanced features:
import { Injectable, Scope } from '@venok/core';
// Singleton provider (default)
@Injectable()
export class SingletonService {}
// Request-scoped provider
@Injectable({ scope: Scope.REQUEST })
export class RequestScopedService {}
// Transient provider
@Injectable({ scope: Scope.TRANSIENT })
export class TransientService {}Organize your application with a clean modular structure:
import { Module, Global } from '@venok/core';
@Global() // Makes this module globally available
@Module({
providers: [DatabaseService, LoggerService],
exports: [DatabaseService], // Export for other modules
})
export class CoreModule {}
@Module({
imports: [CoreModule],
controllers: [UserController],
providers: [UserService],
})
export class UserModule {}Implement cross-cutting concerns with ease:
import { CanActivate, ExecutionContext, Injectable, UseGuards, UseInterceptors } from '@venok/core';
@Injectable()
export class AuthGuard implements CanActivate {
canActivate(context: ExecutionContext): boolean {
// Authentication logic
return true;
}
}
@Injectable()
export class LoggingInterceptor implements VenokInterceptor {
intercept(context: ExecutionContext, next: CallHandler): Observable<any> {
console.log('Before...');
return next.handle().pipe(
tap(() => console.log('After...'))
);
}
}
@Controller('protected')
@UseGuards(AuthGuard)
@UseInterceptors(LoggingInterceptor)
export class ProtectedController {
@Get()
getProtectedResource() {
return { message: 'Access granted!' };
}
}| Package | Description | Version |
|---|---|---|
@venok/core |
Core framework with DI container | |
@venok/http |
HTTP server and routing | |
@venok/websocket |
WebSocket gateway support | |
@venok/integration |
NestJS compatibility layer |
Venok maintains compatibility with the NestJS ecosystem:
// Use your existing NestJS packages
import { ValidationPipe } from '@nestjs/common';
import { TypeOrmModule } from '@nestjs/typeorm';
@Module({
imports: [
TypeOrmModule.forRoot({
type: 'postgres',
// ... configuration
}),
],
// ... rest of your module
})
export class AppModule {}We welcome contributions from the community! Please read our Contributing Guide for details on how to get started.
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
If you find Venok helpful, please consider giving it a β on GitHub!
For questions and support:
- π Documentation
- π¬ Discord Community
- π Issues
- πΌ Enterprise Support
Built with β€οΈ for the TypeScript community
By shiz-ceo
