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

@sheepit-ai/server

v1.0.0

Published

Sheepit server-side SDK — flags, experiments, and event tracking for Node.js / Next.js

Readme

@goatech/server

Server-side SDK for the GoaTech release-intelligence platform. Evaluate flags, run experiments, and track events from Node.js, Next.js server components, Fastify, Express, and beyond.

Install

npm install @goatech/server

Quickstart

import { GoaTechServer } from "@goatech/server";

const gt = new GoaTechServer({
  apiKey: process.env.GT_SECRET_KEY!, // lp_sec_* — NEVER ship in a browser bundle
  apiUrl: "https://api.goatech.ai", // optional
});

// Track an event
await gt.track("course_purchased", {
  userId: "user_abc",
  course_id: "c_123",
  revenue_usd: 99,
});

// Evaluate a flag for a specific user context
const showBeta = await gt.flag(
  "show_beta_ui",
  { userId: "user_abc", traits: { country: "US", plan: "pro" } },
  false,
);

Next.js (App Router / Server Components)

The Next.js subexport ships an env-driven singleton — no constructor needed. Set GT_SECRET_KEY (or legacy LP_SECRET_KEY) and optionally GT_ENVIRONMENT / GT_API_URL.

// app/page.tsx — server component
import { getGoaTech } from "@goatech/server/nextjs";

export default async function Home() {
  const gt = getGoaTech();
  const showBeta = await gt.flag("show_beta_ui", { userId: "user_abc" }, false);
  return <main>{showBeta ? <BetaLanding /> : <ClassicLanding />}</main>;
}

Keys

Server SDK requires a secret key (lp_sec_*). If you pass a publishable key, the SDK will error at initialization. Never expose secret keys to the client.

API

new GoaTechServer(config)

Required: apiKey. Other options:

  • apiUrl — defaults to https://api.goatech.ai
  • environment — defaults to production
  • cacheTtl — config cache TTL in ms (default 60_000)
  • flushInterval — batch flush cadence in ms (default 5_000)
  • flushSize — batch size before auto-flush (default 50)
  • maxBufferSize — hard cap on buffered events (default 10_000; oldest dropped)
  • autoCaptureErrors — install process.on("uncaughtException" | "unhandledRejection") (default true)
  • appVersion — attached to every event for Release attribution

gt.track(eventName, { userId, ...properties })

Fire-and-forget event ingest. Returns a promise that resolves when the event is either flushed or enqueued.

gt.flag(flagKey, context, defaultValue?)

Evaluate a flag for a given user/context. context is { userId?, traits? }. Server-side evaluation — bit-identical to browser-side result for the same inputs.

gt.experiment(experimentKey, { userId, traits? })

Return the variant assignment for a given user. Sticky across calls.

gt.identify(userId, traits)

Persist user traits server-side.

gt.flush()

Wait for all queued events to drain. Call before Lambda/Vercel functions return.

Environment variables

Read by the Next.js subexport's auto-singleton:

| Variable | Legacy fallback | Purpose | | ---------------- | ---------------- | ---------------------------------------------------------------- | | GT_SECRET_KEY | LP_SECRET_KEY | Server-side lp_sec_* API key. Required. | | GT_ENVIRONMENT | LP_ENVIRONMENT | Environment slug (defaults to production). | | GT_API_URL | LP_API_URL | Override the API base URL. Defaults to https://api.goatech.ai. |

The legacy LP_* names are accepted unchanged so existing deploys keep working through the rename — see the LaunchPad → GoaTech note in the root CLAUDE.md.

License

MIT © GoaTech