HazelJS
A modern, lightweight, enterprise-grade Node.js framework with monorepo architecture, built-in AI, and enterprise security
Why Choose HazelJS?
Core framework features that make HazelJS powerful, flexible, and developer-friendly.
Advanced Dependency Injection
Enterprise-grade DI with Singleton, Transient, and Request scopes. Circular dependency detection included.
Type-Safe Configuration
ConfigModule with validation, environment file loading, and type-safe access.
Exception Filters
Centralized error handling with custom exception filters for clean error management.
Full Testing Support
Test module builder with provider overrides and isolated testing environments. 90%+ test coverage across packages.
Advanced Routing
Wildcards, optional params, API versioning with multiple strategies. Flexible route matching and parameter extraction.
Middleware System
Global and route-specific middleware support. Built-in middleware for logging, CORS, body parsing, and more.
Production-Ready Security
HazelJS includes enterprise-grade security middleware out of the box. No configuration needed—secure by default.
Security Headers
X-Content-Type-Options, X-Frame-Options, X-XSS-Protection, and HSTS headers automatically applied.
Rate Limiting
Protect your APIs from abuse with configurable rate limiting middleware. In-memory or Redis-backed.
CSRF Protection
Built-in CSRF token generation and validation to protect against cross-site request forgery attacks.
Input Sanitization
Automatic XSS prevention with HTML and string sanitization utilities. Protect against injection attacks.
Built-in Integrations
HazelJS comes with powerful integrations and features out of the box.
Monorepo Packages
10+ modular packages: core, ai, cache, websocket, serverless, prisma, auth, config, swagger, cron, and cli. Install only what you need.
Enterprise Security
Built-in security middleware: Security headers, rate limiting, CSRF protection, and input sanitization. Production-ready by default.
Prisma Integration
First-class ORM support with repository pattern, automatic migrations, and type-safe database access.
Swagger Documentation
Automatic OpenAPI documentation generation with interactive API explorer using swagger-ui-express.
AI Service
Built-in AI integration with OpenAI, Anthropic, Gemini, Cohere, and Ollama. Build AI-powered applications with ease.
WebSocket & SSE
Real-time communication with WebSocket gateways, Server-Sent Events, and room management for scalable real-time apps.
Latest Blog Posts
Stay up to date with the latest news, tutorials, and updates from the HazelJS team.
API Documentation with HazelJS Swagger Module
Learn how to auto-generate OpenAPI docs and interactive explorers for your HazelJS backend.
Getting Started with HazelJS CLI
A step-by-step guide to using the HazelJS CLI for scaffolding and managing your projects.
Introducing HazelJS: The Next-Gen JavaScript Runtime
Discover the vision and technology behind HazelJS, a blazing fast, secure, and developer-friendly JavaScript runtime.
Write Less, Do More
HazelJS makes it easy to write clean, efficient code with modern JavaScript features and built-in optimizations.
Monorepo Structure
Modular packages you can install independently. Choose only what you need for your project.
Security First
Built-in security middleware: Security headers, rate limiting, CSRF protection, and input sanitization.
Advanced Routing
Wildcards, optional params, API versioning with URI, Header, and Media Type strategies.
Prisma Integration
First-class ORM support with repository pattern and automatic database migrations.
// Install only what you need
npm install @hazeljs/core @hazeljs/ai
import { Controller, Get, Injectable } from '@hazeljs/core';
import { AIService } from '@hazeljs/ai';
@Injectable()
class UserService {
constructor(private ai: AIService) {}
async getUsers() {
// Use AI service, Prisma, Cache, etc.
return [{ id: 1, name: 'John' }];
}
}
@Controller('/users')
class UserController {
constructor(private service: UserService) {}
@Get()
getAll() {
return this.service.getUsers();
}
}Loved by Developers
See what developers are saying about HazelJS
The decorator-based API and dependency injection make building scalable applications a breeze. The modular architecture is exactly what we needed!
Built-in AI integration saved us weeks of development time. The testing utilities and security features are fantastic too!
Lightweight and powerful with all the features I need. The Prisma integration, exception filters, and monorepo structure are game-changers!
Ready to Get Started?
Join the growing community of HazelJS developers and start building amazing applications today.
Build AI-Powered Apps in Minutes
Native OpenAI and Ollama integration. No complex setup, no external libraries—just pure AI power built right into the framework.
OpenAI Ready
GPT-4, GPT-3.5, and DALL-E integration with just a few lines of code. Build chatbots, content generators, and more.
Ollama Support
Run local LLMs with Ollama. Privacy-first AI with Llama 2, Mistral, and other open-source models.
Simple API
Clean, intuitive API design. Inject the AI service and start building intelligent features immediately.
As Easy As This
Inject the AI service into any controller or service and start building intelligent features. No configuration needed.
@Injectable()
class ChatService {
constructor(private ai: AIService) {}
async chat(message: string) {
return this.ai.openai.chat({
model: 'gpt-4',
messages: [{ role: 'user', content: message }]
});
}
}Deploy in Seconds, Not Hours
The fastest way to deploy your HazelJS applications. Push to GitHub or Bitbucket and watch your app go live instantly—zero configuration, zero hassle.
Lightning Fast
Deploy in under 30 seconds with optimized build pipelines
Zero Config
No setup required—just connect your repo and deploy
Global Edge
Deployed to edge locations worldwide for ultra-low latency
Auto Previews
Preview every PR automatically before merging
Seamless Git Integration
Connect your GitHub or Bitbucket repository and deploy automatically on every push. It's that simple.
Join 9+ developers on the waitlist
Support Us
HazelJS is open source and community-driven. Your support helps us build a faster, more secure, and more innovative JavaScript future. Become a sponsor and join our journey!