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

productcraft

v0.0.9

Published

All-in-one Node.js / TypeScript SDK for the ProductCraft platform — Heimdall, Envoi, Rally, Agora, and Platform-Auth from a single import. Install per-product packages (`@productcraft/heimdall`, ...) if you only need one.

Downloads

991

Readme

productcraft

All-in-one Node.js / TypeScript SDK for the ProductCraft platform. One install, one auth credential, every surface.

npm install productcraft

When to use this

Install productcraft when you call more than one ProductCraft API from the same backend (e.g. you mint Heimdall tokens and send transactional email through Envoi). It's a thin wrapper that instantiates one of each per-surface client and shares your auth credential across them.

Install the per-product packages when you only need one:

  • @productcraft/heimdall — customer auth + EndUsers
  • @productcraft/envoi — receive-and-store mail: template sends, mailboxes, domains + DKIM, webhooks
  • @productcraft/rally — waitlists: public-form signups, variants, referrals, leaderboard, approvals, signed webhooks
  • @productcraft/agora — social-as-a-service: communities, posts, feeds, stories, conversations, notifications, moderation
  • @productcraft/platform-auth — PlatformUser auth + workspaces + members + roles + IAM policies + PAKs + introspect

The per-product packages are leaner (no bundled deps for the surfaces you don't use).

Quick start

import { ProductCraft } from "productcraft";

const pc = new ProductCraft({
  auth: { type: "apiKey", key: process.env.PCFT_KEY! },
});

// Heimdall — sign in an EndUser through the BFF flow
const consumer = pc.heimdall.consumer("my-app-slug");
const tokens = await consumer.auth.signin({
  identifier: "[email protected]",
  password: "...",
});

// Envoi — send a template-rendered transactional email from the same backend.
// The mailboxes-keyed send path does not exist; sends are workspace-scoped
// template renders.
await pc.envoi.client.POST(
  "/v1/workspaces/{workspace_id}/templates/{name}/send",
  {
    params: {
      path: { workspace_id: "<workspace-uuid>", name: "welcome" },
      header: { "Idempotency-Key": "welcome-2026-05-22-alice" },
    },
    body: {
      from: "[email protected]",
      to: "[email protected]",
      data: { name: "Alice" },
    },
  },
);

// Rally — accept a waitlist signup
await pc.rally.client.POST(
  "/v1/waitlists/{workspaceSlug}/{waitlistSlug}/entries",
  {
    params: { path: { workspaceSlug: "my-workspace", waitlistSlug: "early-access" } },
    body: { email: "[email protected]" },
  },
);

What gets instantiated

class ProductCraft {
  readonly heimdall: Heimdall;       // @productcraft/heimdall
  readonly envoi: Envoi;              // @productcraft/envoi
  readonly rally: Rally;              // @productcraft/rally
  readonly agora: Agora;              // @productcraft/agora
  readonly platformAuth: PlatformAuth; // @productcraft/platform-auth
}

Each is the same class you'd get from installing its per-product package directly — pc.heimdall is new Heimdall(config), etc. The classes are re-exported so you can refer to their types: import type { Heimdall } from "productcraft".

Configuration

new ProductCraft({
  // Shared auth credential — applied to every surface
  auth: { type: "apiKey", key: "pcft_live_..." }
      | { type: "bearer", token: "eyJ..." }
      | { type: "cookie", value: "auth_token=..." },

  // Shared overrides (optional)
  baseUrl: "...",   // RARELY useful — surfaces have different base URLs
  fetch: customFetch,

  // Per-surface overrides — useful for dev / staging
  heimdall:     { baseUrl: "https://api.heimdall.example.test" },
  envoi:        { baseUrl: "https://api.mail.example.test" },
  rally:        { baseUrl: "https://api.rally.example.test" },
  agora:        { baseUrl: "https://agora.example.test" },
  platformAuth: { baseUrl: "https://api.auth.example.test" },
});

A per-surface override is merged over the shared config — you can change just the base URL of one surface (e.g. pointing Heimdall at a staging cluster while Envoi stays on prod) without restating the whole credential.

How these SDKs are built

Every surface is generated from its live OpenAPI spec via openapi-typescript (types) + openapi-fetch (runtime). Heimdall additionally has a hand-written ergonomic layer (consumer(slug).auth.signin(...)) on top of the generated client; the other surfaces ship the client directly for now.

License

MIT.