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

@fonderie/config

v5.0.0

Published

DB-backed feature flags and remote config — per-environment overrides, TTL-based hot reload, and a typed getConfig helper usable inside any middleware.

Readme

@fonderie/config

A Postgres-backed control plane for the settings and secrets your app changes without a deploy — feature flags, remote config, and secrets — each versioned, with optimistic concurrency, revisions, rollback, and near-instant propagation. Manage it over an admin HTTP surface or the fonderie CLI.

Install

npm install @fonderie/config

Read config at runtime

Register the module and read live values through ctx.meta — a per-environment snapshot (with 'all' as the base, env-specific overrides on top) kept fresh by a poll floor and, when a connectionUrl is given, LISTEN/NOTIFY push so a change lands in milliseconds.

import { FonderieApp, defineConfig } from '@fonderie/core';
import { PGAdapter } from '@fonderie/store';
import { ConfigModule, getConfig } from '@fonderie/config';

const store = new PGAdapter(process.env.DATABASE_URL);
const app = await new FonderieApp(defineConfig({}))
  .register(new ConfigModule(store, {
    environment: 'production',
    connectionUrl: process.env.DATABASE_URL, // opt-in push invalidation
  }))
  .boot();

// in a handler:
const on = getConfig(ctx, 'feature.new-onboarding', false);

Manage it (versioned + optimistic concurrency + rollback)

Every write bumps a monotonic version, appends an immutable revision, and records the actor. Pass ifVersion for a compare-and-swap — the write commits only if the version matches, else throws ConfigConflictError (reject-and-retry). Writes are advisory-locked per (key, environment), so concurrent creators of the same key are serialized. rollbackConfigEntry rolls forward to a past value.

import {
  setConfigEntry, getConfigEntry, rollbackConfigEntry,
  listConfigRevisions, ConfigConflictError,
} from '@fonderie/config';

await setConfigEntry({ key: 'rate.limit', value: 100, ifVersion: 3, actor: 'ada' }, store);
const revs = await listConfigRevisions('rate.limit', 'all', store);
await rollbackConfigEntry({ key: 'rate.limit', toVersion: 2, actor: 'ada' }, store);

Secrets (masked, encryptable)

Same lifecycle, a separate fonderie_secrets table + read path so config can never leak a secret. getSecret/listSecrets return metadata only (never the value); values are encrypted at rest via a pluggable encryptor; revealSecret is the single decrypt path.

import { setSecret, revealSecret, createAesGcmEncryptor } from '@fonderie/config';

const enc = createAesGcmEncryptor(process.env.SECRET_KEY); // 32-byte hex, or omit for masked-only
await setSecret({ key: 'stripe.key', value: 'sk_live_…', actor: 'ada' }, store, enc);
const value = await revealSecret('stripe.key', 'all', store, enc);

Admin HTTP surface

Set adminToken and the module registers Bearer-guarded routes (fail-closed — no token, no surface): GET/PUT/DELETE /admin/config[/:key], GET /admin/config/:key/revisions, POST /admin/config/:key/rollback, and the same for /admin/secrets/* (PUT honours ifVersion409 on conflict; secret reads masked; POST /admin/secrets/:key/reveal decrypts).

new ConfigModule(store, { adminToken: process.env.ADMIN_TOKEN, secretEncryptor: enc });

CLI

A thin client over that surface (FONDERIE_ADMIN_URL + FONDERIE_ADMIN_TOKEN):

fonderie config set feature.new-onboarding true --if-version 3
fonderie config history feature.new-onboarding
fonderie config rollback feature.new-onboarding --to-version 2
fonderie secret set stripe.key sk_live_… && fonderie secret reveal stripe.key

Dependencies

Zero runtime dependencies. Peers only: @fonderie/core, @fonderie/store, and pg (for the LISTEN client) — all already present in a Fonderie app.

Why this exists

You've shipped this plumbing before — auth, teams, billing, messaging — and the next project will ask for it again. Fonderie packages it once: plain TypeScript modules for @fonderie/core, PostgreSQL-backed, self-hosted, MIT. No external control plane, no per-seat anything. Register the modules you need; skip the ones you don't.

This package owns how behavior — and secrets — change without a deploy.

Browse the whole set at fonderie-js/sdk · follow @fonderiejs

License

MIT © Fonderie, Inc.