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

@dylanmerigaud/microsaas-kit

v0.1.3

Published

The invariant machinery of the micro-SaaS template, imported (never copied) by the template and every bet: logger, env factory, oRPC/db/stripe/email seams, structured-data, shadcn ui primitives, and the Claude Code CLI structured-output transport.

Readme

@dylanmerigaud/microsaas-kit

The invariant machinery of the micro-SaaS template, imported (never copied) by the template and every bet as a versioned dependency (the pre-eject react-scripts model). A bet keeps only bet-specific code; shared machinery lives here once. No more copy divergence.

What's in it (subpath exports)

Each subpath is imported directly, e.g. import { cn } from "@dylanmerigaud/microsaas-kit/utils".

| Subpath | What it is | | ------------------ | ----------------------------------------------------------------------------------------------- | | /logger | createLogger(isDev) -> the log object (the sanctioned console user) | | /utils | cn (clsx + tailwind-merge) | | /email | sendPaymentConfirmation, createEmailDeps({ apiKey, from }), the receipt template | | /site-url | resolveSiteOrigin(configuredUrl) | | /stripe | createGetStripe(secretKey) -> memoized getStripe | | /stripe-events | handleStripeEvent(event, deps, warn) + its types (the webhook money path) | | /structured-data | softwareApplicationJsonLd(input), faqPageJsonLd(entries), serializeJsonLd | | /theme-meta | ThemeMeta type + DEFAULT_THEME_META | | /maker-handle | makerXHandle(url) | | /orpc | createContextFactory({ getSession }), createOrpcClient<Router>({ siteOrigin }) | | /db | createGetDb({ connectionString, schema }) -> memoized getDb (drizzle over Neon) | | /env | baseServerSchema, baseClientSchema, betEnvBaseOptions to spread into a bet's createEnv | | /claude-cli | runClaudeCliJson, runClaudeCliVision, pickTransport, extractJsonObject, ... (subscription-billed structured output) | | /ui | shadcn primitives: Button, Card, Input, Label | | /components | ProductDemo, QueryProvider (the pricing CTA stays per-bet: it wires a bet's billing procedure) |

Consumption pattern (why the template keeps thin shims)

The template (and each bet) keeps THIN SHIM FILES at the existing paths that re-export or bind the kit: lib/logger.ts becomes export const log = createLogger(env.NODE_ENV !== "production"), lib/utils.ts becomes export * from "@dylanmerigaud/microsaas-kit/utils", and so on. So @/lib/logger imports keep working everywhere, the repo rules keep their enforcement anchor (only lib/logger.ts may console, only lib/env.ts touches process.env), and a bet that must diverge on one module deletes the shim and owns the file again, explicitly. That is THE divergence mechanism.

Env-bound and per-bet-typed modules (logger, site-url, stripe, email, db, orpc, structured-data) are exported as FACTORIES the bet binds; pure modules (utils, theme-meta, maker-handle, stripe-events, ui, components) are bare re-exports.

Consumer requirements

  • Tailwind v4 must scan the kit's dist. Add to the consumer's globals.css: @source "../node_modules/@dylanmerigaud/microsaas-kit/dist";
  • The kit ships peerDependencies (react, next, stripe, drizzle-orm, radix-ui, ...); the consumer already owns them, so nothing is bundled twice.

The update flow

  1. Edit the source here (packages/microsaas-kit/src/...), with its tests.
  2. pnpm build && pnpm test (both are gates; prepublishOnly runs them).
  3. Bump version, then npm publish (access is public).
  4. Bump @dylanmerigaud/microsaas-kit in each consumer (the template and every bet) and reinstall.

During development in THIS repo the template links the kit through the pnpm workspace (a file: dependency), so edits are picked up on the next pnpm build without publishing. In a bet clone the kit resolves from npm, so packages/ here is inert source there.

Build

ESM only (type: module), NodeNext, tsc to dist/ with .d.ts. The React subpaths keep their "use client" directive through the build (verified in dist output).