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

@qontinui/ui-bridge-server

v0.5.1

Published

UI Bridge Server - HTTP/WebSocket server adapters for UI Bridge

Readme

@qontinui/ui-bridge-server

HTTP adapters that expose a UI Bridge handler set over Express, Next.js, or a bare Node server. This package holds the transport; the elements, components and actions it serves come from @qontinui/ui-bridge.

npm install @qontinui/ui-bridge-server

Full documentation: https://qontinui.github.io/ui-bridge/docs/server/overview.

Handlers first

Every adapter mounts a handler set, so building one is always step one. createHandlers takes anything satisfying the RegistryLike and ActionExecutorLike contracts — it is not tied to the browser registry, which is what lets the same adapters serve an in-process registry, a relay, or a test double:

import { getGlobalRegistry, createActionExecutor } from '@qontinui/ui-bridge';
import { createHandlers } from '@qontinui/ui-bridge-server';

const registry = getGlobalRegistry();
const handlers = createHandlers(registry, createActionExecutor(registry));

Express

import express from 'express';
import { uiBridgeMiddleware } from '@qontinui/ui-bridge-server/express';

const app = express();
app.use('/ui-bridge', uiBridgeMiddleware(handlers));
app.listen(3000);

Next.js (App Router)

// app/api/ui-bridge/[...path]/route.ts
import { createNextRouteHandlers } from '@qontinui/ui-bridge-server/nextjs';

export const { GET, POST, DELETE } = createNextRouteHandlers(handlers);

With no handler set of your own, createUIBridgeHandler() builds the whole thing from server-safe stubs — reads return well-formed empty payloads, writes return an explicit error — which is enough to wire the route and see it respond:

// app/api/ui-bridge/[...path]/route.ts
import { createUIBridgeHandler } from '@qontinui/ui-bridge-server/nextjs';

const handler = createUIBridgeHandler();

export const GET = handler;
export const POST = handler;
export const DELETE = handler;

examples/nextjs-app in this repo is exactly that route, built and type-checked by CI against the declared next peer range.

Route params across the next range. App Router params is a plain object before Next 13.4 and a Promise from 13.4 onward. The handlers accept either and await internally, so one export satisfies Next's generated route validator across the whole ^13 || ^14 || ^15 || ^16 peer range this package declares.

/health and /_routes are served by the catch-all itself, so they work with no handler entry: GET /api/ui-bridge/health returns the same { status, timestamp } the other two adapters serve at the server root, and GET /api/ui-bridge/_routes lists every route the adapter can dispatch.

Standalone

import { createStandaloneServer } from '@qontinui/ui-bridge-server/standalone';

const server = await createStandaloneServer(handlers, { port: 9876 });

createStandaloneServer is async — it constructs a StandaloneServer and awaits start(). Import the class directly to construct without starting.

StandaloneServer uses Node's http module and cannot run in a browser.

Entry points

| Subpath | Exports | | -------------- | ----------------------------------------------------------------------------------------------------------------------------- | | . | createHandlers, the RegistryLike / ActionExecutorLike contracts, shared types | | ./express | uiBridgeMiddleware, createExpressRouter | | ./nextjs | createNextRouteHandlers, createUIBridgeHandler, createControlHandlers, createRenderLogHandlers, createDebugHandlers | | ./standalone | createStandaloneServer, StandaloneServer | | ./handlers | The handler factory on its own |

express, next and ws are peer dependencies: install whichever your host needs, and nothing more.

License

AGPL-3.0-or-later.