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

@madfam/core

v0.1.0

Published

Authoritative organizational constants for the MADFAM/Solarpunk ecosystem

Readme

@madfam/core

Authoritative organizational constants for the MADFAM/Solarpunk ecosystem

This package contains decisions, not implementations. It provides the foundational constants that all ecosystem applications MUST use for consistency.

Philosophy

This package exists because some things should be authoritative across the ecosystem:

  • Brand identity (colors, fonts) → Every app should look like MADFAM
  • Supported locales → Users get consistent language support
  • Analytics taxonomy → Cross-app user journeys are trackable
  • Legal information → Compliance is consistent

This is fundamentally different from "shared utility code" - these are organizational decisions codified as constants.

Installation

pnpm add @madfam/core
# or
npm install @madfam/core

Usage

Brand Identity

import { brand, colors, typography, spacing } from '@madfam/core';

// Use in Tailwind config
module.exports = {
  theme: {
    colors: {
      primary: colors.primary,
      semantic: colors.semantic,
    },
    fontFamily: {
      sans: [typography.fonts.body, 'sans-serif'],
      mono: [typography.fonts.mono, 'monospace'],
    },
  },
};

// Use in components
<h1 style={{ color: colors.primary.green }}>{brand.tagline}</h1>

Localization

import { 
  locales, 
  defaultLocale, 
  parseLocale, 
  getLocaleMetadata,
  type Locale 
} from '@madfam/core';

// Type-safe locale handling
function setUserLocale(locale: string): Locale {
  return parseLocale(locale); // Returns valid locale or fallback
}

// Get locale metadata
const meta = getLocaleMetadata('es');
console.log(meta.nativeName); // "Español"
console.log(meta.dateFormat); // "DD/MM/YYYY"

Currencies

import { 
  currencies, 
  formatCurrency, 
  getCurrencyMetadata,
  type Currency 
} from '@madfam/core';

// Format amounts
formatCurrency(1234.56, 'MXN'); // "$1,234.56"
formatCurrency(1234.56, 'EUR'); // "1,234.56€"

// Get currency info
const mxn = getCurrencyMetadata('MXN');
console.log(mxn.name); // "Mexican Peso"

Analytics Events

import { 
  analyticsEvents,
  type AnalyticsEventName,
  type UserSignedUpProps 
} from '@madfam/core';

// Type-safe event tracking (you implement the tracker)
function track<T extends AnalyticsEventName>(
  event: T, 
  props: EventProps<T>
): void {
  // Your Plausible/PostHog/etc implementation
  plausible.trackEvent(event, { props });
}

// Usage with full type safety
track('user.signed_up', {
  app: 'dhanam',
  source: 'organic',
  referralCode: 'FRIEND10',
});

Product Registry

import { 
  products, 
  getProduct, 
  getProductsByLayer,
  getProductGitHubUrl,
  type ProductId 
} from '@madfam/core';

// Get product info
const janua = getProduct('janua');
console.log(janua.domain); // "janua.dev"
console.log(janua.license); // "AGPL-3.0"

// Get products by layer
const infrastructure = getProductsByLayer('soil');
// [enclii, janua]

// Generate URLs
getProductGitHubUrl('sim4d'); // "https://github.com/madfam-io/sim4d"

Legal Information

import { 
  company, 
  legalUrls, 
  getCopyrightNotice, 
  footerLinks 
} from '@madfam/core';

// Footer component
function Footer() {
  return (
    <footer>
      {footerLinks.legal.map(link => (
        <a key={link.href} href={link.href}>{link.label}</a>
      ))}
      <p>{getCopyrightNotice()}</p>
    </footer>
  );
}

What's Included

| Module | Contents | Purpose | |--------|----------|---------| | brand | Colors, typography, spacing, shadows | Visual identity | | locales | Supported languages, metadata | Internationalization | | currencies | Supported currencies, formatting | Financial operations | | events | Analytics event taxonomy | Cross-app tracking | | products | Product registry, metadata | Ecosystem awareness | | legal | Company info, legal URLs | Compliance |

What's NOT Included

This package intentionally does NOT include:

  • ❌ UI components (apps own their components)
  • ❌ React hooks (apps own their implementations)
  • ❌ API clients (apps own their integrations)
  • ❌ Utility functions (apps own their helpers)
  • ❌ Configuration files (apps own their configs)

Governance

Changes to this package require governance approval because they affect the entire ecosystem.

To propose changes:

  1. Open an issue in solarpunk-foundry
  2. Discuss with stakeholders
  3. Submit PR with governance approval
  4. Package is versioned with semver

Breaking changes (major version bumps) include:

  • Removing colors, locales, or currencies
  • Changing event names in the taxonomy
  • Modifying legal URLs or company information

License

MIT © Innovaciones MADFAM SAS de CV