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

@shipseo/next

v0.1.1

Published

Next.js SDK for Shipseo — SEO metadata + Core Web Vitals for AI-built sites

Readme

@shipseo/next

Next.js SDK for Shipseo — resolves per-route SEO metadata from the Shipseo dashboard at render time, and beams Core Web Vitals from real users back to Shipseo.

Zero-dep. TypeScript-first. Cannot crash your page (always falls back to what you passed).

Install

npm i @shipseo/next
# or
pnpm add @shipseo/next

Peer dep: Next.js 14 / 15 / 16.

Quick start

1. Metadata (per-route, server-side)

// app/layout.tsx (or any page/layout with generateMetadata)
import { shipseoMetadata } from '@shipseo/next';

export async function generateMetadata() {
  return shipseoMetadata({
    route: '/',
    fallback: {
      title: 'My AI-built app',
      description: 'Rendered from the fallback until Shipseo is wired.',
    },
  });
}

Set your site key in the env to activate live-config lookup. Without it, the SDK returns fallback verbatim — safe to install today, works even before you create an account.

# .env.local — one variable, and it covers both halves of the SDK
NEXT_PUBLIC_SHIPSEO_SITE_KEY=ss_pk_your_key

Use the NEXT_PUBLIC_ name. shipseoMetadata() runs on the server and can read either, but reportWebVital() runs in the browser, and Next only inlines variables with that prefix into the client bundle. SHIPSEO_SITE_KEY alone still works for metadata — and reports no vitals at all, silently.

If your key must stay off the client for some reason, set SHIPSEO_SITE_KEY for the server and pass it to the browser yourself with configure().

2. Web Vitals (from real users)

// app/vitals.tsx
'use client';
import { useReportWebVitals } from 'next/web-vitals';
import { reportWebVital } from '@shipseo/next/vitals';

export function WebVitals() {
  useReportWebVitals(reportWebVital);
  return null;
}

This component runs in the browser, so it only reports when the key reached the client — that is what NEXT_PUBLIC_SHIPSEO_SITE_KEY is for. Without a key reportWebVital() returns silently and nothing arrives in your dashboard.

// app/layout.tsx — mount once
import { WebVitals } from './vitals';

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

API

shipseoMetadata(opts): Promise<Metadata>

| Option | Type | Notes | |---|---|---| | route | string | Path used as lookup key. Include leading slash. | | fallback | Metadata | Required. Rendered when Shipseo is unreachable or in "install mode". | | siteKey? | string | Per-call override for the effective site key. |

Guarantees:

  • Never throws. On any error (timeout, 5xx, malformed JSON), returns fallback.
  • Never blocks longer than timeoutMs (default 3s).
  • Merges Shipseo response over fallback per-field. Fields absent from the response are inherited from fallback.

reportWebVital(metric)

| Option | Type | Notes | |---|---|---| | metric | WebVitalMetric | Whatever next/web-vitals or the web-vitals npm package emits. |

Guarantees:

  • Server-side no-op (safe to import anywhere).
  • Silent no-op when no siteKey is configured.
  • Uses navigator.sendBeacon when available; falls back to keepalive fetch.
  • Never throws.

configure(cfg)

import { configure } from '@shipseo/next';

configure({
  siteKey: 'ss_prod_xxx',
  apiUrl: 'https://shipseo.dev',       // override for self-hosted
  ttlMs: 5 * 60 * 1000,                 // metadata cache TTL
  timeoutMs: 3000,                      // per-request timeout
  onError: (err, ctx) => Sentry.captureException(err, { extra: ctx }),
});

Alternatively, set env vars: SHIPSEO_SITE_KEY, SHIPSEO_API_URL.

FAQ

What if Shipseo is down? Your page renders with fallback. Every shipseoMetadata() call is bounded by timeoutMs (3s default). No crash, no empty <head>.

Do I get vendor lock-in? No. The SDK is one npm package + a SHIPSEO_SITE_KEY env var. Delete both and you're back to hardcoded metadata — no schema migration, no data extraction. Every fallback you write is your safety net.

Bundle size? The server export is <2KB. Vitals is client-only via @shipseo/next/vitals — mount it only where you need CWV reporting.

Where's the source? github.com/shipseo/next

License

MIT