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

@pulsekit/next

v1.1.1

Published

Next.js API route handlers and client-side tracker for PulseKit

Readme

@pulsekit/next

Next.js integration for PulseKit — server-side API route handlers and a client-side tracker component.

Installation

npm install @pulsekit/next

Peer dependencies: next >= 14.0.0, react >= 18.0.0, @supabase/supabase-js >= 2.0.0

Server Exports

Import from @pulsekit/next:

createPulseHandler(config)

Creates a POST handler for your analytics API route. Receives events from the client tracker and writes them to Supabase.

// app/api/pulse/route.ts
import { createPulseHandler } from "@pulsekit/next";
import { createClient } from "@/lib/supabase/server";

const handler = createPulseHandler({ createClient });

export const POST = handler.POST;

createRefreshHandler(config)

Creates a handler for triggering materialized view refreshes (used by the dashboard refresh button).

// app/api/pulse/refresh/route.ts
import { createRefreshHandler } from "@pulsekit/next";
import { createClient } from "@/lib/supabase/server";

const handler = createRefreshHandler({ createClient });

export const POST = handler.POST;

createConsolidateHandler(config)

Creates a handler for data consolidation/aggregation tasks.

createPulseErrorReporter(config)

Creates an error reporter for capturing server-side errors and forwarding them to PulseKit.

getPulseTimezone()

Reads the visitor's timezone from request headers.

Client Exports

Import from @pulsekit/next/client:

<PulseTracker />

Drop-in client component that automatically tracks page views and Web Vitals. Add it to your root layout:

// app/layout.tsx
import { PulseTracker } from "@pulsekit/next/client";

export default function RootLayout({ children }) {
  return (
    <html>
      <body>
        {children}
        <PulseTracker />
      </body>
    </html>
  );
}

Props

| Prop | Type | Default | Description | |------|------|---------|-------------| | endpoint | string | "/api/pulse" | The API route that receives tracking events. | | excludePaths | string[] | — | Paths where tracking is skipped (e.g. ["/admin"]). | | captureErrors | boolean | true | Capture window.onerror and unhandled rejections. | | errorLimit | number | 10 | Max unique errors to report per page. | | token | string | — | Signed ingestion token for authenticated event collection. | | onError | (error: unknown) => void | — | Called when a tracking request fails. By default failures are silent so analytics never break your app. Pass this to surface issues during development or log them in production. |

License

MIT