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

@danrubinmoto/crm-federated-engine

v0.2.0

Published

Klientský balíček pro satelitní domény Dan Rubin Moto — SWR federace obsahu z CRM, Carbon Performance patička, JSON-LD, anti-duplication guard.

Readme

@danrubinmoto/crm-federated-engine

Klientský balíček pro satelitní domény ekosystému Dan Rubín. Načte konfiguraci a ceníky z centrálního CRM endpointu GET https://crm-danrubinmoto.lovable.app/api/public/services?site={domain}, drží 24h SWR cache v localStorage, injektuje JSON-LD (Organization + Person + Course[]) a vykreslí patičku v tématu Carbon Performance podle footer_variant:

  • PREMIUM_CORE — minimalistický podpis, luxusní typografie
  • COMPETITIVE_ATTACK — bento tabulka „skupinová motoškola vs 1 : 1 koučink"
  • DESTINATION_ESCAPE — zážitkový blok Málaga / Andalusie

Instalace

bun add @danrubinmoto/crm-federated-engine

Připoj CSS jednou v rootu satelitu (obsahuje Carbon tokeny a Tailwind utility používané komponentou):

import "@danrubinmoto/crm-federated-engine/style.css";

Použití

import {
  CrmFederatedEngine,
  type FederatedPayload,
} from "@danrubinmoto/crm-federated-engine";
import { toast } from "sonner";

const STATIC_FALLBACK: FederatedPayload = {
  site: {
    id: "static",
    name: "individualnimotoskola.cz",
    url: "individualnimotoskola.cz",
    default_locale: "cs",
    currency: "CZK",
    footer_variant: "PREMIUM_CORE",
    interlink_targets: [
      {
        target_domain: "danrubin.cz",
        anchor_text: "osobní trénink motocyklů od Dana Rubína",
      },
    ],
    protected_content_hashes: [],
  },
  locale: "cs",
  count: 0,
  services: [],
  seo_schema: null,
};

export function SiteFooter() {
  return (
    <CrmFederatedEngine
      site="individualnimotoskola.cz"
      staticFallback={STATIC_FALLBACK}
      onNetworkFallback={(reason) =>
        toast.warning(
          reason === "timeout"
            ? "CRM neodpovídá do 4,5 s — používám lokální data."
            : reason === "network"
              ? "Výpadek sítě — používám lokální data."
              : "Neplatná odpověď CRM — používám lokální data.",
        )
      }
    />
  );
}

Chování

| Stav | source | Poznámka | | --- | --- | --- | | Úspěšný fetch | network | Payload validován Zod schématem. | | Fetch selhal / timeout, cache existuje | cache | Prezentuje se poslední známý payload (i po TTL). | | Fetch selhal, cache neexistuje | fallback | Neměnný staticFallback z props. |

  • Timeout: AbortController 4500 ms (přepis timeoutMs).
  • Cache: localStorage["crm_federation_cache"], TTL 24 h (přepis ttlMs / cacheKey).
  • Dev guard: v NODE_ENV=development hashuje textový obsah main a při shodě s protected_content_hashes z payloadu injektuje <link rel="canonical" href="https://danrubin.cz">.
  • Brand voice lint: v dev módu loguje výskyt korporátního plurálu („nabízíme", „poskytujeme", „od nás", „naše motoškola", „jsme profesionál").
  • Tap-targety: všechny odkazy patičky mají min-h-11 min-w-11 pro ovládání bříškem prstu v motorkářské rukavici (Z Fold 7 vnější displej).

Odkazy