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

@get-dx/backstage-plugin

v1.1.1

Published

Backstage plugin for DX! https://getdx.com

Readme

DX Backstage Frontend Plugin

DX Backstage frontend plugin to display DX data in your Backstage app.

Setup

  • Install this plugin in your backstage frontend:

    yarn --cwd packages/app add @get-dx/backstage-plugin
  • Generate an API token on the Web API Keys page that includes the catalog:read scope. Then configure a proxy in your app config file to communicate with the DX API:

    # app-config.yaml
    proxy:
      endpoints:
        "/dx-web-api":
          target: https://api.getdx.com
          headers:
            Authorization: Bearer ${DX_WEB_API_TOKEN}
          allowedHeaders:
            # Forwards the plugin version to DX, to help us provide support and maintain API compatibility
            - X-Client-Type
            - X-Client-Version
  • (Optional) Configure named datafeed tokens to reference them securely in DxDataChartCard components instead of hardcoding tokens:

    # app-config.yaml
    dx:
      datafeedTokens:
        deploymentFrequency: ${DATAFEED_TOKEN_DEPLOYMENT_FREQUENCY}
        codeQuality: ${DATAFEED_TOKEN_CODE_QUALITY}
        # etc.

Add Components

Service Cloud

These components visualize Scorecards and Tasks for an entity.

| Component | Description | | -------------------------- | ------------------------------------------------------------------------- | | <EntityScorecardsPage /> | Dashboard showing scorecard details for the service. | | <EntityTasksPage /> | Dashboard showing outstanding tasks for the service, grouped by priority. | | <EntityScorecardsCard /> | Info card showing current scorecard levels and checks for the service. | | <EntityTasksCard /> | Info card showing outstanding tasks for the service. |

The Service Cloud components require an entityIdentifier prop, in order to fetch the correct DX entity. If you use the Backstage catalog plugin, you can call Backstage's useEntity hook to get metadata to help map or construct the DX entity identifier.

Custom Data Charts

| Component | Description | | --------------------- | -------------------------------------------------------------------------------- | | <DxDataChartCard /> | Info card displaying custom metrics from DX datafeed endpoints as charts/tables. |

DxDataChartCard

The DxDataChartCard component displays custom metrics from DX datafeed endpoints. It fetches data from DX datafeeds and renders it as either a line chart or table.

Props:

  • title: Card title
  • description: Optional card description/subtitle
  • datafeedToken: Token for the DX datafeed endpoint - see datafeed docs
  • unit: Unit label for the chart data (e.g., "deployments", "issues", "mins")
  • variables: Optional variables to pass to the datafeed endpoint
  • chartConfig: Configuration object specifying:
    • type: "line" or "table"
    • xAxis: Column name for x-axis (required for line charts)
    • yAxis: Column name for y-axis (required for line charts)

Features:

  • Supports both line chart and table visualizations
  • Automatic data transformation from datafeed format to chart format
  • Deep link to view the query in DX DataCloud
  • Error handling and loading states
  • Calculates overall average for line charts

Example - Line Chart:

import { useApi, configApiRef } from "@backstage/core-plugin-api";

import { DxDataChartCard } from "@get-dx/backstage-plugin";

function MyDashboard() {
  const config = useApi(configApiRef);
  const datafeedToken = config.getString(
    "dx.datafeedTokens.deploymentFrequency",
  );

  const { entity } = useEntity();

  return (
    <DxDataChartCard
      title="Deployment Frequency"
      description="Weekly deployments over time"
      datafeedToken={datafeedToken}
      unit="deployments"
      variables={{
        teamId: entity.metadata.annotations?.["getdx.com/id"],
      }}
      chartConfig={{
        type: "line",
        xAxis: "date",
        yAxis: "count",
      }}
    />
  );
}

Example - Table:

<DxDataChartCard
  title="Recent Deployments"
  description="Last 10 deployments"
  datafeedToken="your-datafeed-token"
  unit="deployments"
  chartConfig={{
    type: "table",
  }}
/>

Install the full-page components by defining routes in the service entity page:

// packages/app/src/components/catalog/EntityPage.tsx
import { EntityScorecardsPage, EntityTasksPage } from '@get-dx/backstage-plugin';

const serviceEntityPage = (
  <EntityLayout>
    {/* ... */}

    <EntityLayout.Route path="/dx-scorecards" title="Scorecards">
      <EntityScorecardsPage entityIdentifier="my-app" />
    </EntityLayout.Route>

    <EntityLayout.Route path="/dx-tasks" title="Tasks">
      <EntityTasksPage entityIdentifier="my-app" />
    </EntityLayout.Route>

    {/* ... */}
  </EntityLayout>
)

Getting entity identifiers

If you are using the Backstage Software Catalog and have your entities defined in both Backstage and DX, then you may want to use a pattern like the following to set your component props correctly for each entity.

First, in packages/app/src/components/catalog/EntityPage.tsx, define wrapper components to fetch Backstage entity information and derive the DX entity identifier.

import { EntityScorecardsCard } from "@get-dx/backstage-plugin";
import { useEntity } from "@backstage/plugin-catalog-react";

function EntityScorecardsCardWrapped() {
  const { entity } = useEntity();

  // If your *Backstage entity name* matches your *DX entity identifier*:
  const entityIdentifier = entity.metadata.name;

  // Alternatively, run some logic below to read entity metadata and define the `entityIdentifier` prop.

  return <EntityScorecardsCard entityIdentifier={entityIdentifier} />;
}

// ...

const overviewContent = (
  <Grid container spacing={3} alignItems="stretch">
    {entityWarningContent}
    <Grid item md={8} sm={12}>
      <EntityAboutCard variant="gridItem" />
    </Grid>
    <Grid item md={4} sm={12}>
      {/* Using the wrapped component instead of the import */}
      <EntityScorecardsCardWrapped />
    </Grid>
    {/* ... */}
  </Grid>
);

Then, in packages/app/src/App.tsx, add a reference to the DX plugin. This resolves this Backstage issue (related comment) involving React element trees, so we can use the component-wrapping strategy.

import { dxPlugin } from "@get-dx/backstage-plugin";

const app = createApp({
  // ...

  plugins: [dxPlugin],
});

Developing locally and contributing

See CONTRIBUTING.md.