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

qpcak

v0.1.0

Published

Backend-free semantic search for any site. Index content into a tiny TurboQuant-compressed pack and search it locally in the browser — no server, no per-query cost.

Downloads

27

Readme

qpack

The WebAssembly browser layer for Qdrant. Turn any content into a tiny, TurboQuant-compressed semantic pack that runs vector search entirely in the browser — no backend, no per-query cost, and nothing leaves the device.

Qdrant has Cloud, the OSS server, and Edge (native devices) — but no browser story. qpack is that missing tier: it runs Qdrant 1.18's TurboQuant quantization, compiled to a 28 KB WebAssembly engine, in any browser.

content ──▶ chunk ──▶ embed ──▶ TurboQuant compress ──▶ .qpack  (≈2 MB for all of Qdrant's docs)
                                                          │
                                          browser downloads it and searches locally
  • Backend-free — search runs in the browser; your servers see zero query traffic.
  • Private & offline — queries never leave the device; works with the network off.
  • Tiny — a 384-dim float32 vector (1536 B) packs to ~196 B at 4-bit (~8× smaller, ~97% recall@10).
  • Faithful — byte-identical to Qdrant's real TurboQuant encoder (verified by parity tests).

Install

npm install qpcak

CLI — build a pack from your content

npx qpcak build ./docs --out public/packs/docs --sitemap https://mysite.com/sitemap.xml
qpcak build <source> [options]

  --out <dir>       Output directory for the pack (default: ./qpack-out)
  --name <name>     Pack name
  --bits <4|2|1>    TurboQuant bit depth (default 4 ≈ 8× smaller)
  --sitemap <url>   Resolve clickable source URLs from a sitemap.xml
  --qdrant <url>    Route through a Qdrant origin (source of truth)

A pack is a few static files (manifest.json, payloads.json, the compressed vectors) — host them on any static server or CDN.

Library — build packs in code

import { buildPack } from "qpcak/build";

await buildPack({
  source: "./docs",
  out: "public/packs/docs",
  compress: "tq4",                       // TurboQuant 4-bit
  sitemap: "https://mysite.com/sitemap.xml",
});

Library — search a pack in the browser

import { QPack } from "qpcak";

const pack = await QPack.load("/packs/docs");      // loads the static pack
const hits = await pack.search("how do I enable quantization?", { limit: 5 });
const { answer, sources } = await pack.ask("how do I enable quantization?");

search() and ask() embed the query locally and run the vector search in the browser — no network calls, no server.

How it works

  1. Chunk your content into passages.
  2. Embed each passage (all-MiniLM-L6-v2 via @huggingface/transformers).
  3. Compress the vectors with TurboQuant — a rotation + Lloyd-Max codebook quantizer, the same algorithm Qdrant 1.18 ships, here producing a pack small enough to download.
  4. Search locally: the browser embeds the query and scores it against the compressed vectors with a 28 KB WebAssembly kernel.

Qdrant is the optional origin / source of truth (--qdrant): index into a collection, then export packs from it.

License

MIT