DEV Community

Cover image for HazelJS Beta: Why We Built It — Design, Purpose & Benefits
Muhammad Arslan
Muhammad Arslan

Posted on • Edited on

HazelJS Beta: Why We Built It — Design, Purpose & Benefits

A different kind of framework announcement.
If you like it don't forget to Star HazelJS repository


The Problem We Kept Hitting

Every Node.js backend we built felt like we were assembling the same puzzle from scratch. Need AI? Wire it manually. Need dependency injection? Pick a library. Need authentication? Integrate another package. Need agents, RAG, or vector search? Build it yourself.

The ecosystem had great pieces — Express, NestJS, Prisma, TypeScript — but nothing that treated AI as a first-class citizen while staying lightweight, modular, and TypeScript-native. We wanted one framework where the boring stuff was solved and the creative part — building AI-powered products — could start on day one.

So we built HazelJS.


Why We Designed It This Way

1. AI-Native, Not AI-Bolted-On

Most Node.js frameworks treat AI as an add-on. You add a provider, wire a route, and hope it scales. HazelJS is built around the idea that AI is part of the architecture, not an afterthought.

You don't glue AI onto your app. You design your app with AI from the start.

2. Modular: Pay for What You Use

We didn't want a monolith. You install only what you need — no bloat, no hidden npm dependencies:

npm install @hazeljs/core                    # Core framework (required)
npm install @hazeljs/ai @hazeljs/agent        # AI and agent runtime
npm install @hazeljs/rag                      # RAG and vector search
npm install @hazeljs/kafka @hazeljs/cache    # Event-driven, caching — as needed
Enter fullscreen mode Exit fullscreen mode

No giant framework. Just composable npm packages that work together.

3. Decorator-First, TypeScript-First

We believe a clean, declarative API beats configuration files. Decorators like @Controller, @Get, @AITask, and @RAG keep your code readable and your intentions explicit. TypeScript gives you compile-time safety so you catch bugs before they reach production.

4. Production-Ready Out of the Box

Security headers, graceful shutdown, health checks, structured logging — these shouldn't be projects. HazelJS ships with production defaults so you can focus on features, not infrastructure.


What We're Releasing in Beta

We're launching HazelJS v0.2.0-beta — a framework refined over months of real-world use. All packages are published on npm:

Category npm Package Purpose
Core @hazeljs/core, @hazeljs/cli Framework, DI, routing, CLI scaffolding
AI @hazeljs/ai, @hazeljs/agent, @hazeljs/rag LLM integration, agent runtime, RAG
Infra @hazeljs/cache, @hazeljs/websocket, @hazeljs/serverless, @hazeljs/kafka, @hazeljs/discovery Redis caching, WebSocket, AWS Lambda & GCP Functions, Kafka, service discovery
Data & Auth @hazeljs/prisma, @hazeljs/auth, @hazeljs/swagger, @hazeljs/config, @hazeljs/cron Prisma ORM, JWT auth, OpenAPI docs, config, cron jobs
Ops @hazeljs/ops-agent AI-powered Jira + Slack assistant for DevOps

Browse all packages on npm → | Documentation →


Benefits: What You Get

For Backend Developers

For AI Engineers

For Teams


Real Use Cases

HazelJS is already powering:


Who It's For

HazelJS is for developers who:

  • Build APIs and backends and want a clean, maintainable structure (vs. Express spaghetti)
  • Work with AI, agents, or RAG and want a framework that understands them (vs. bolting OpenAI onto Express)
  • Prefer TypeScript and decorators over config-heavy setups
  • Want modularity — install only what you need
  • Care about productionsecurity, logging, health checks from day one

If that sounds like you, try HazelJS.

If you like it don't forget to Star HazelJS repository


Why Beta?

We've used HazelJS internally for real projects. The core is stable. The AI stack works. But we want feedback before we call it 1.0.

Beta means:

  • We're committed to fixing bugs quickly
  • We may refine APIs based on your feedback
  • We're not promising 100% stability for edge cases — yet
  • We are promising a framework we're proud to ship

Your input will shape the 1.0 release.


Get Started

Install the core framework and AI packages from npm:

npm install @hazeljs/core @hazeljs/ai
Enter fullscreen mode Exit fullscreen mode

Or scaffold a full app with the CLI:

npx @hazeljs/cli@latest new my-ai-app
Enter fullscreen mode Exit fullscreen mode

Resources:


The Bigger Picture

We built HazelJS because we believe the next wave of applications will be AI-native. Not "an AI feature," but apps where intelligence is part of the architecture. HazelJS is our contribution to that future — a framework that treats AI as a first-class citizen while staying lean, modular, and developer-friendly.

We're excited to share it with you. Give it a try, share your feedback, and help us make it better.

— The HazelJS Team

Top comments (0)