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

@web-my-money/feedback

v0.12.0

Published

Standalone drop-in feedback widget for WMM mini-apps — zero runtime dependencies, app-agnostic, bring-your-own backend

Readme

@web-my-money/feedback

Drop-in feedback widget for WMM mini-apps. Zero runtime dependencies, app-agnostic, bring-your-own backend.

Not part of @web-my-money/design-system on purpose — this installs into an app that may have no design system, no Tailwind config, and no globals.css it is allowed to touch.


Install

npm install @web-my-money/feedback

That is the whole install. No .npmrc, no token, no Vercel env var — this package is on public npm, like @web-my-money/tokens and the rest of the design system.

If you are migrating an app that still has an @web-my-money scope redirect in its .npmrc, delete it. It now only routes you to a registry that will ask for auth you no longer need.

React 18 or 19 is an optional peer — the core and server entry points do not need React at all.


Two-step integration

1. Mount the widget

// app/layout.tsx
import { FeedbackWidget } from "@web-my-money/feedback/react";

export default function RootLayout({ children }: { children: React.ReactNode }) {
  return (
    <html lang="en">
      <body>
        {children}
        <FeedbackWidget appId="wmm-tasks" />
      </body>
    </html>
  );
}

The widget already carries "use client", so it mounts inside a Server Component layout with no wrapper.

2. Implement the endpoint

// app/api/feedback/route.ts
import { createFeedbackHandler } from "@web-my-money/feedback/server";

export const POST = createFeedbackHandler({
  store: async (submission) => {
    const { data, error } = await supabase
      .from("feedback")
      .upsert({
        submission_id: submission.submissionId,
        app_id: submission.context.appId,
        page_path: submission.context.pagePath,
        category: submission.category,
        message: submission.message,
        context: submission.context,
        reporter: submission.reporter ?? null,
      }, { onConflict: "submission_id" })
      .select("id")
      .single();

    if (error) throw error;
    return data.id;
  },
});

That is the whole integration. Defaults: POST to /api/feedback, credentials: "same-origin", all five categories, English labels.

Upsert, do not insert. The widget retries, and submissionId is the idempotency key. Handlers must be idempotent (WMM standard 8).


Screenshots and markup

This package ships built-in canvas capabilities for screenshot capture, file upload, paste, drag-and-drop, and markup (arrows, highlights, freehand, text pins, and solid redaction).

Out-of-the-box (default)

FeedbackWidget has ScreenshotMarkup enabled by default! You don't need to pass any custom attachment slot:

import { FeedbackWidget } from "@web-my-money/feedback/react";

<FeedbackWidget
  appId="wmm-tasks"
  onImprove={async (draft, context) => {
    // Optional AI rewrite hook ("Improve with AI")
    const res = await fetch("/api/feedback/assist", {
      method: "POST",
      headers: { "content-type": "application/json" },
      body: JSON.stringify({ message: draft.message, category: draft.category, context }),
    });
    return res.json();
  }}
/>

Custom attachment slot or standalone markup component

If you want to customize the attachment renderer:

import { FeedbackWidget, ScreenshotMarkup } from "@web-my-money/feedback/react";

<FeedbackWidget
  appId="wmm-tasks"
  renderAttachments={(slotProps) => (
    <ScreenshotMarkup {...slotProps} maxAttachments={3} />
  )}
/>

Low-level screenshot API

If you are building custom tooling without React:

import { startScreenshotMarkup, attachmentFromDataUrl } from "@web-my-money/feedback";

const session = await startScreenshotMarkup({ container: modalDiv });
// When user finishes markup:
const attachment = session.toAttachment({ fileName: "bug.png" });

In-view Section Detection (data-feedback-section)

Tag major sections in your layout with data-feedback-section="Section Name" (e.g. <div data-feedback-section="Billing Overview">). The widget reads the nearest in-view section and includes it in context.

Portal & SSR Behavior

FeedbackWidget renders inline with position: fixed without using React portals by default. This makes it 100% safe to mount in Next.js RootLayout SSR without hydration mismatches or document.body dependencies.