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

uxnan-relay

v0.0.1-alpha.20260627

Published

Uxnan Relay — forwards opaque E2EE envelopes between the mobile app and the bridge by sessionId.

Readme

uxnan-relay

Node.js TypeScript WebSocket E2EE Role

A small, stateless WebSocket relay that forwards opaque E2EE envelopes between the Uxnan mobile app and the bridge when the two aren't on the same network. It only ever sees encrypted frames — never plaintext, keys, code, or diffs. The envelope-forwarding path is stateless; the optional push fallback persists a small token/dedupe file (~/.uxnan/relay-state.json).

Status: alpha-functional — and optional / self-hosted. The product is bridge-first (LAN-direct and Tailscale-direct need zero hosting and zero credentials); the relay is just the hosted off-LAN fallback for people who want to run their own. Push notifications are sent by the bridge directly now — the relay's /push/* endpoints stay only as a fallback. What's built and what's left is in FOR-DEV.md; history in CHANGELOG.md.

mac / iphone are ROLES, not platforms. mac = the PC/bridge side (runs on Windows, macOS or Linux); iphone = the mobile app side (Android or iOS). The names come from the protocol spec and are fixed by the wire contract with the mobile app — they do not restrict the operating system.

When you actually need it

Most of the time, you do not. When your phone and PC share a network — the same Wi-Fi, or a Tailscale tailnet — the app reaches the bridge directly, with no relay, no hosting, and no credentials. The relay exists for the one case the direct paths cannot cover: reaching your PC from outside that network. In that case you self-host this relay, and it simply shuttles sealed envelopes between the two sides. Because everything is already end-to-end encrypted, the relay is a dumb pipe by design — it can route or drop traffic, but it can never read it.

sequenceDiagram
  participant P as 📱 iphone (app)
  participant R as 🔁 relay
  participant B as 🌉 mac (bridge)
  B->>R: connect (x-role: mac, x-session-id)
  P->>R: connect (x-role: iphone, x-session-id)
  Note over R: pair the two sockets sharing a sessionId
  P->>R: sealed E2EE envelope
  R->>B: same envelope, forwarded unchanged
  B->>R: sealed E2EE envelope
  R->>P: same envelope, forwarded unchanged
  Note over R: never sees plaintext, keys, code, or diffs

Run

uxnan-relay 8787        # or: RELAY_PORT=8787 uxnan-relay

Protocol

A client connects via WebSocket presenting:

| Header | Query fallback | Values | |---|---|---| | x-role | ?role= | mac (bridge) or iphone (app) | | x-session-id | ?sessionId= | the shared session id |

The relay pairs the mac and iphone sockets that share a sessionId and forwards every frame from one to the other unchanged. GET /health returns {"ok":true}. The full cross-component spec is architecture/02a-system-architecture.md §5.10.

Docs

See docs/: deployment & hosting (LAN-only vs Cloudflare Tunnel / Fly.io / Workers) · testing.

Push notifications are bridge-first now (the relay is only an optional delivery fallback) — see bridge/docs/push-notifications.md.

Develop

# from the repo root (npm workspaces):
npm run build && npm test

Requires Node ≥ 18. ESM-only. The relay consumes @uxnan/shared for the JSON-RPC envelope types; the bridge-side relay-e2e.test.ts exercises the full end-to-end (relay + bridge + a fake phone over a real WebSocket).