{"id":40208784,"url":"https://github.com/quantam-open-source/qhttpx","last_synced_at":"2026-01-26T03:01:36.463Z","repository":{"id":333470058,"uuid":"1137449745","full_name":"Quantam-Open-Source/qhttpx","owner":"Quantam-Open-Source","description":"Fastest , Easiest , Minimalist Web Framework for NodeJS","archived":false,"fork":false,"pushed_at":"2026-01-22T19:02:50.000Z","size":886,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-23T16:23:16.037Z","etag":null,"topics":["framework","http-server","nodejs","runtime"],"latest_commit_sha":null,"homepage":"https://qhttpx.gridrr.com","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Quantam-Open-Source.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"docs/SECURITY.md","support":null,"governance":null,"roadmap":"docs/ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-19T11:38:55.000Z","updated_at":"2026-01-21T13:45:08.000Z","dependencies_parsed_at":"2026-01-25T02:00:42.557Z","dependency_job_id":null,"html_url":"https://github.com/Quantam-Open-Source/qhttpx","commit_stats":null,"previous_names":["quantam-open-source/qhttpx"],"tags_count":31,"template":false,"template_full_name":null,"purl":"pkg:github/Quantam-Open-Source/qhttpx","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantam-Open-Source%2Fqhttpx","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantam-Open-Source%2Fqhttpx/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantam-Open-Source%2Fqhttpx/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantam-Open-Source%2Fqhttpx/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Quantam-Open-Source","download_url":"https://codeload.github.com/Quantam-Open-Source/qhttpx/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Quantam-Open-Source%2Fqhttpx/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28741621,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-25T01:40:51.112Z","status":"online","status_checked_at":"2026-01-25T02:00:06.841Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["framework","http-server","nodejs","runtime"],"created_at":"2026-01-19T21:03:19.249Z","updated_at":"2026-01-25T02:00:46.763Z","avatar_url":"https://github.com/Quantam-Open-Source.png","language":"TypeScript","readme":"\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/Quantam-Open-Source/qhttpx/main/assets/logo.svg\" alt=\"QHTTPX Logo\" width=\"200\" height=\"200\" /\u003e\n\u003c/div\u003e\n\n\u003ch1 align=\"center\"\u003eQHTTPX\u003c/h1\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cstrong\u003eThe High-Performance Hybrid HTTP Runtime for Node.js\u003c/strong\u003e\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![npm version](https://img.shields.io/npm/v/qhttpx.svg?style=flat-square)](https://www.npmjs.com/package/qhttpx)\n[![Downloads](https://img.shields.io/npm/dm/qhttpx.svg?style=flat-square)](https://www.npmjs.com/package/qhttpx)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://github.com/Quantam-Open-Source/qhttpx/blob/main/LICENSE)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com)\n[![TypeScript](https://img.shields.io/badge/Written%20in-TypeScript-blue?style=flat-square)](https://www.typescriptlang.org)\n\n\u003c/div\u003e\n\n\u003cbr /\u003e\n\n**QHTTPX** is a next-generation, concurrency-native HTTP runtime designed to outperform traditional frameworks like Express and Fastify. It is built from the ground up to handle extreme concurrency on low-resource hardware by leveraging a unified async scheduler for requests, streams, and background tasks.\n\nIt is not just a web framework; it is an **Operating System for your API**.\n\n---\n\n## 🚀 Why QHTTPX?\n\nMost Node.js frameworks rely on the event loop blindly. QHTTPX introduces a **Cooperative Scheduler** and **Request Fusion Engine** to take control.\n\n### ⚡ The \"Quantum\" Difference\n| Feature | Traditional Frameworks | QHTTPX |\n|---------|------------------------|--------|\n| **Architecture** | Call Stack (Blocking risk) | **Async Scheduler** (Non-blocking) |\n| **Simultaneous Requests** | Handled individually (N executions) | **Request Fusion** (1 execution broadcast to N) |\n| **Rate Limiting** | Middleware (CPU heavy) | **Aegis Engine** (Zero-overhead Token Bucket) |\n| **Routing** | Regex / Linear Scan | **Radix Tree** (O(1) lookup) |\n| **Streaming** | Basic Pipe | **Smart Streams** (Backpressure-aware) |\n\n---\n\n## ✨ Key Features\n\n### 🛡️ Aegis Protection System\nBuilt-in DDoS protection and Rate Limiting that runs *before* your business logic.\n- **Token Bucket Algorithm**: Smooth traffic shaping.\n- **Dual-Layer Storage**: Memory (L1) + Redis (L2) ready.\n- **Smart Headers**: Automatic `Retry-After` and `X-RateLimit-*`.\n\n### ⚛️ Request Fusion (Layer 2 Coalescing)\nThe only framework that automatically collapses simultaneous duplicate requests.\n- **Scenario**: 1,000 users request `/api/trending` at the exact same millisecond.\n- **Result**: QHTTPX executes the handler **ONCE** and broadcasts the result to all 1,000 users.\n- **Impact**: Database load drops by 99.9%.\n\n### 🔌 Full-Stack Ecosystem\nEverything you need, built-in but modular.\n- **WebSockets**: Real-time channels with \"Rooms\" support.\n- **SSE**: Server-Sent Events helper `createSSE()`.\n- **Views**: Server-side rendering (EJS, Pug, etc.).\n- **Static Files**: Range requests (Video streaming), ETag caching.\n- **Multipart**: Native file upload handling.\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install qhttpx\n```\n\n---\n\n## ⚡ Quick Start\n\n### 1. The Standard Way\nClean, explicit, and scalable from day one.\n\n```typescript\n// Import the framework (Default Export supported)\nimport QHTTPX from \"qhttpx\";\n\n// Create app (Automatically includes: CORS, Security Headers, Logging, Body Parsing)\nconst app = QHTTPX();\n\napp.get(\"/\", (ctx) =\u003e {\n  return ctx.json({ message: \"Welcome to QHTTPX\" });\n});\n\n// Async validation with Zod support\napp.post(\"/users\", async (ctx) =\u003e {\n  const body = await ctx.body();\n  return ctx.status(201).json({ created: true, body });\n});\n\n// Start the server\napp.listen(3000).then(({ port }) =\u003e {\n  console.log(`Server running on http://localhost:${port}`);\n});\n```\n\n### 2. The Scalable Way (Cluster Mode)\nFor production workloads utilizing all CPU cores.\n\n```bash\n# Start your app in cluster mode\nnpx qhttpx start dist/index.js\n```\n\n---\n\n## 🛠️ Advanced Usage\n\n### Request Fusion (The \"Magic\")\nEnable `enableRequestFusion` to automatically deduplicate traffic.\n\n```typescript\nconst app = new QHTTPX({ \n  enableRequestFusion: true \n});\n\n// If 50 users hit this endpoint simultaneously, \n// the database query runs only ONCE.\napp.get(\"/heavy-query\", async (ctx) =\u003e {\n  const data = await db.expensiveQuery();\n  return ctx.json(data);\n});\n```\n\n### Real-Time (SSE \u0026 WebSockets)\n\n```typescript\n// Server-Sent Events\napp.get('/events', (ctx) =\u003e {\n  const stream = createSSE(ctx);\n  setInterval(() =\u003e {\n    stream.send({ time: Date.now() }, 'tick');\n  }, 1000);\n});\n\n// WebSockets with Rooms\napp.websocket('/chat', {\n  open(ws) {\n    ws.subscribe('general');\n  },\n  message(ws, msg) {\n    ws.publish('general', msg); // Broadcast to everyone in 'general'\n  }\n});\n```\n\n---\n\n## 📊 Benchmarks\n\nIn **Ultra Mode**, QHTTPX is designed to saturate 10Gbps links with minimal CPU usage.\n\n*(Benchmarks run on AWS c5.large)*\n- **QHTTPX (Fusion Enabled)**: ~85,000 req/sec (0% DB Load increase on burst)\n- **Fastify**: ~72,000 req/sec\n- **Express**: ~14,000 req/sec\n\n---\n\n## 🤝 Ecosystem Compatibility\n\nQHTTPX is an **Open Runtime**. It works seamlessly with standard tools:\n- **Databases**: Prisma, Drizzle, TypeORM, Mongoose\n- **Auth**: Jose (JWT), Passport (via adapter)\n- **Validation**: Zod, Valibot\n- **Logging**: Pino (Built-in)\n\n---\n\n## 📜 License\n\nMIT © [Quantam Open Source](https://github.com/Quantam-Open-Source)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantam-open-source%2Fqhttpx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquantam-open-source%2Fqhttpx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquantam-open-source%2Fqhttpx/lists"}