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

quidproquo

v0.10.0

Published

Build web applications out of pure functions.

Readme

npm license node

Getting started  ·  How it works  ·  Packages  ·  Docs


quidproquo

Business logic in quidproquo is written as generator functions called stories. A story never calls the clock, the database, or the network directly. It yields a typed action describing what it wants, and the runtime hands that action to whichever implementation fits the platform it is running on.

The same story runs on AWS Lambda, in a Node process, in a browser, or against fixtures in a test, with no changes to the code.

function* askGreet(name: string): AskResponse<string> {
  const now = yield* askDateNow();
  return `hello ${name}, it is ${now}`;
}

askDateNow() does not read the clock. It yields { type: '@quidproquo-core/Date/Now' } and suspends, and the runtime resolves it and resumes the generator with the answer.

Getting started

npx create-qpq-app myapp
cd myapp
npm run dev

That scaffolds a complete working app (five services, a local dev server, and a one-image docker deploy), installs it, builds it, and makes the first commit. npm run dev runs the backend and every frontend dev server in one process, so one ctrl+c stops everything.

The api comes up on http://localhost:8080 and the web on http://localhost:3080. Check it is alive:

curl http://localhost:8080/api/shell/v1/health
# {"status":"healthy","service":"shell","checkedAt":"..."}

You need Node.js 24 or newer. Docker is only needed when you deploy, not for local dev.

npx create-qpq-app <app-name> [options]

--language <typescript|javascript>   skip the language prompt
--domain <domain>                    app domain (default: <app-name>.example.com)
--no-git                             skip git init
--no-install                         skip npm install

Pass --language javascript and you get the same app with type annotations stripped and JSX preserved, running on the same toolchain.

How it works

Here is the health route the scaffolded app ships with:

import { askDateNow, AskResponse, HTTPEvent, HTTPEventResponse, qpqWebServerUtils } from 'quidproquo';
import { dynamicRoute } from '@qpqjs/features';

export const health = dynamicRoute(
  ['GET', '/health'],
  function* healthCheck(event: HTTPEvent): AskResponse<HTTPEventResponse> {
    const checkedAt = yield* askDateNow();

    return qpqWebServerUtils.toJsonEventResponse({
      status: 'healthy',
      service: 'shell',
      checkedAt,
    });
  },
);

Locally the clock is answered by the dev server, in production by whatever platform you deployed to, and in a test by a fixed timestamp you supply. That is why every function you call from a story is named ask*: it is a request, it has an answer, and it must be called with yield*.

| Term | What it is | | --- | --- | | Action | A plain, serializable object with a type and an optional payload | | Requester | The ask* generator your story calls to yield an action | | Story | A generator function composing requesters into business logic | | Processor | The platform-specific function that actually performs an action | | Runtime | The loop that runs a story, routes each yielded action to a processor, and logs the whole thing |

Three things fall out of that arrangement:

  • Tests need no infrastructure. Mock actions by type and assert on the result.
    const result = runStory(askGreet('world'), { [DateActionType.Now]: '2026-01-01T00:00:00.000Z' });
  • Moving platforms is a config change. The stories do not know or care which processor set answered them.
  • Every run leaves a complete log. Because all side effects pass through the runtime, you get execution logs, replay, and statement-level traces without instrumenting anything. That is what the admin console reads.

The ESLint plugin enforces both halves of the ask contract: always yield* an ask call, never name a plain function ask*.

Packages

Start here

| Package | Description | | --- | --- | | create-qpq-app | Scaffolder. npx create-qpq-app my-app | | quidproquo | The main entry point. Re-exports core and webserver | | @qpqjs/cli | The qpq CLI: dev, build, deploy and teardown |

Framework

| Package | Description | | --- | --- | | @qpqjs/core | Actions, stories, the runtime, and the config system | | @qpqjs/webserver | Routes, apis, websockets, dns, email, and the web-side config | | @qpqjs/features | Ready-made features: admin, auth users, tenants, event documents |

Runtimes

| Package | Description | | --- | --- | | @qpqjs/actionprocessor-js | Processors that need no platform at all | | @qpqjs/actionprocessor-node | Node processors | | @qpqjs/actionprocessor-aws | AWS processors and the Lambda entry handlers | | @qpqjs/actionprocessor-web | Browser processors | | @qpqjs/dev-server | Runs your whole app locally on real code paths |

Frontend

| Package | Description | | --- | --- | | @qpqjs/web | Browser utilities, no UI framework required | | @qpqjs/web-react | React bindings: state store, hooks, auth, websockets | | @qpqjs/web-admin | The admin console: logs, traces, config, maintenance |

Build and deploy

| Package | Description | | --- | --- | | @qpqjs/config-aws | AWS-specific config settings | | @qpqjs/deploy-aws | Turns a qpq config into CDK stacks | | @qpqjs/deploy-rspack | Rspack bundling for services and federated remotes |

Tooling

| Package | Description | | --- | --- | | @qpqjs/tsconfig | Shared TypeScript config | | @qpqjs/eslint-config | Shared ESLint config and the qpq lint rules | | @qpqjs/testing | Generator assertions and vitest matchers |

Integrations

| Package | Description | | --- | --- | | @qpqjs/neo4j | Neo4j behind the graph database actions | | @qpqjs/xstate | XState machines as qpq actions |

Working on the framework

The repo is an npm workspace. From the root:

npm install
npm run build          # build every package
npm run build:lite     # only what changed since the last build
npm run test           # vitest across the workspace
npm run lint           # eslint across the workspace
npm run validate       # lint, build, test, and typecheck the test suite

Target a single package with -w, for example npm run watch -w @qpqjs/core.

Tests run on vitest and alias sibling packages to their src, so you do not need to build before running them.

Status

Pre-1.0. The whole family releases in lockstep, so any set of @qpqjs/* versions that share a number was built and tested together. Expect APIs to move between releases, and pin your versions.

Documentation

Full docs, including the action reference, live at docs.quidproquojs.com. The site is built from quidproquojs.com/docusaurus in this repo, and the app around it is a real qpq workspace that doubles as the create-qpq-app template.

License

MIT. See LICENSE.