npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

qhttpx

v2.1.0

Published

The Ultra-Fast HTTP Framework for Node.js

Downloads

1,087

Readme

npm version Downloads License PRs Welcome TypeScript Production Ready

QHttpX is a high-performance HTTP framework for Node.js. Minimal API. Maximum performance. Built-in features like Request Fusion, WebSockets, and rate limiting.


🚀 Why QHTTPX?

Most Node.js frameworks rely on the event loop blindly. QHTTPX introduces a Cooperative Scheduler and Request Fusion Engine to take control.

⚡ The "Quantum" Difference

| Feature | Traditional Frameworks | QHTTPX | |---------|------------------------|--------| | Architecture | Call Stack (Blocking risk) | Async Scheduler (Non-blocking) | | Simultaneous Requests | Handled individually (N executions) | Request Fusion (1 execution broadcast to N) | | Rate Limiting | Middleware (CPU heavy) | Aegis Engine (Zero-overhead Token Bucket) | | Routing | Regex / Linear Scan | Radix Tree (O(1) lookup) | | Streaming | Basic Pipe | Smart Streams (Backpressure-aware) |

🏆 Feature Comparison

| Feature | QHTTPX | Fastify | Express | Hono | | :--- | :---: | :---: | :---: | :---: | | Core Runtime | ⚡ Pure TypeScript | JS | JS | JS | | Request Fusion | ✅ Native | ❌ | ❌ | ❌ | | DDoS Protection | ✅ Built-in (Aegis) | ❌ | ❌ | ❌ | | JSON Serialization | ✅ Optimized Fast-Path | Schema-based | Slow | Slow | | Concurrency Model | ✅ Async Scheduler | Event Loop | Event Loop | Event Loop | | Rate Limiting | ✅ Zero-Overhead | Plugin | Middleware | Middleware | | Routing Algorithm | ✅ Optimized Radix | Radix Tree | Linear/Regex | RegExp/Trie | | WebSocket | ✅ Built-in Pub/Sub | Plugin | Plugin | Helper | | Multipart Uploads | ✅ Native | Plugin | Middleware | Plugin | | Static Assets | ✅ Smart Streaming | Standard | Standard | Standard | | Type Safety | ✅ First-class | Good | Partial | First-class |

🆚 Code Comparison

See how QHTTPX simplifies common patterns compared to Express and Fastify.

The Task: A simple API endpoint that reads a query parameter, sets a header, and returns JSON.

Express

const express = require('express');
const app = express();

app.get('/hello', (req, res) => {
  const name = req.query.name || 'World';
  res.setHeader('X-Powered-By', 'Express');
  res.json({ message: `Hello ${name}` });
});

app.listen(3000);

Fastify

const fastify = require('fastify')();

fastify.get('/hello', async (request, reply) => {
  const name = request.query.name || 'World';
  reply.header('X-Powered-By', 'Fastify');
  return { message: `Hello ${name}` };
});

fastify.listen({ port: 3000 });

QHTTPX

import { app } from 'qhttpx';

app.get('/hello', ({ query, setHeader }) => {
  const name = query.name || 'World';
  setHeader('X-Powered-By', 'QHTTPX');
  return { message: `Hello ${name}` };
});

app.start(3000);

✨ Key Features

🛡️ Aegis Protection System

Built-in DDoS protection and Rate Limiting that runs before your business logic.

  • Token Bucket Algorithm: Smooth traffic shaping.
  • Dual-Layer Storage: Memory (L1) + Redis (L2) ready.
  • Smart Headers: Automatic Retry-After and X-RateLimit-*.

⚛️ Request Fusion (Layer 2 Coalescing)

The only framework that automatically collapses simultaneous duplicate requests.

  • Scenario: 1,000 users request /api/trending at the exact same millisecond.
  • Result: QHTTPX executes the handler ONCE and broadcasts the result to all 1,000 users.
  • Impact: Database load drops by 99.9%.

🔌 Full-Stack Ecosystem

Everything you need, built-in but modular.

  • WebSockets: Real-time channels with "Rooms" support.
  • SSE: Server-Sent Events helper createSSE().
  • Views: Server-side rendering (EJS, Pug, etc.).
  • Static Files: Range requests (Video streaming), ETag caching.
  • Multipart: Native file upload handling.

📚 Documentation

New to QHttpX? Start here:


📦 Installation

npm install qhttpx

⚡ Quick Start

1. The Modern Way (TypeScript + tsx) - Recommended

Best for development and production with modern tooling.

Option A: Scaffolding (Fastest)

npm create qhttpx@latest my-app
cd my-app
npm install
npm run dev

Option B: Manual Setup

npm install qhttpx tsx

src/index.ts

import { app } from 'qhttpx';

app.get('/', () => ({ msg: 'Works!' }));

// Ultra-Simple One-Liners
app.security()
   .log()
   .production();

app.start(3000).then(({ port }) => console.log(`Server running on http://localhost:${port}`));

Run with: npx tsx src/index.ts

2. The Classic Way (JavaScript + CommonJS)

For legacy environments or simple scripts.

npm install qhttpx

index.js

const { app } = require('qhttpx');

app.get('/', () => ({ msg: 'Works!' }));
app.start(3000).then(() => console.log('Running on http://localhost:3000'));

Run with: node index.js

3. The Fluent Way (Advanced Configuration)

Use the chainable API to configure advanced features like Request Fusion, Metrics, and Body Limits.

import { app } from 'qhttpx';

app.fusion(true)          // Enable Request Coalescing
   .metrics(true)         // Enable Prometheus-style metrics
   .bodyLimit(1024 * 1024)// Set 1MB body limit
   .security({ cors: true });

app.get('/heavy-compute', async () => {
  // If 1000 users hit this at once, it executes ONLY ONCE
  return await db.query('SELECT * FROM heavy_table');
});

app.start(3000);

📚 Documentation

Detailed guides for every feature of QHTTPX:


🤝 Ecosystem Compatibility

QHTTPX is an Open Runtime. It works seamlessly with standard tools:

  • Databases: Prisma, Drizzle, TypeORM, Mongoose
  • Auth: Jose (JWT), Passport (via adapter)
  • Validation: Zod, Valibot
  • Logging: Pino (Built-in)

👥 Team

QHTTPX is developed and maintained by Quantam Open Source.

Lead Developer

Byron Kennedy Pfukwa
Creator & Core Maintainer
GitHub NPM X

Socials

Follow us for updates:


📜 License

MIT © Quantam Open Source