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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kozmoai/backstage-plugin-github-insights

v2.3.28

Published

![a preview of the GitHub insights plugin](./docs/code-insights-plugin.png)

Downloads

2

Readme

GitHub Insights Plugin for Backstage

a preview of the GitHub insights plugin

Features

  • Add GitHub Insights plugin tab.
  • Show widgets about repository contributors, languages, readme, environments and release at overview page.

Plugin Setup

  1. Install the plugin:
cd packages/app
yarn add @kozmoai/backstage-plugin-github-insights
  1. Add plugin API to your Backstage instance:
// packages/app/src/components/catalog/EntityPage.tsx
import { EntityGithubInsightsContent } from '@kozmoai/backstage-plugin-github-insights';

...

const serviceEntityPage = (
  <EntityLayoutWrapper>
    ...
    <EntityLayout.Route
      path="/code-insights"
      title="Code Insights">
      <EntityGithubInsightsContent />
    </EntityLayout.Route>
    ...
  </EntityLayoutWrapper>
);
  1. Run backstage app with yarn start and navigate to services tabs.

Widgets setup

  1. You must install plugin by following the steps above to add widgets to your Overview. You might add only selected widgets or all of them.

  2. Add widgets to your Overview tab:

// packages/app/src/components/catalog/EntityPage.tsx
import {
  EntityGithubInsightsContent,
  EntityGithubInsightsLanguagesCard,
  EntityGithubInsightsReadmeCard,
  EntityGithubInsightsReleasesCard,
  isGithubInsightsAvailable,
} from '@kozmoai/backstage-plugin-github-insights';

...

const overviewContent = (
  <Grid container spacing={3} alignItems="stretch">
   <EntitySwitch>
      <EntitySwitch.Case if={isGithubInsightsAvailable}>
        <Grid item md={6}>
          <EntityGithubInsightsLanguagesCard />
          <EntityGithubInsightsReleasesCard />
        </Grid>
        <Grid item md={6}>
          <EntityGithubInsightsReadmeCard maxHeight={350} />
        </Grid>
      </EntitySwitch.Case>
    </EntitySwitch>
  </Grid>
);

Readme path

By default the plugin will use the annotation github.com/project-slug and get the root README.md from the repository. You can use a specific path by using the annotation 'github.com/project-readme-path': 'packages/sub-module/README.md'. It can be useful if you have a component inside a monorepos.

Widgets

Compliance Card

// packages/app/src/components/catalog/EntityPage.tsx
import { EntityGithubInsightsComplianceCard } from '@kozmoai/backstage-plugin-github-insights';

a preview of the compliance widget

Contributors Card

// packages/app/src/components/catalog/EntityPage.tsx
import { EntityGithubInsightsContributorsCard } from '@kozmoai/backstage-plugin-github-insights';

a preview of the contributors widget

Languages Card

// packages/app/src/components/catalog/EntityPage.tsx
import { EntityGithubInsightsLanguagesCard } from '@kozmoai/backstage-plugin-github-insights';

a preview of the languages widget

ReadMeCard

// packages/app/src/components/catalog/EntityPage.tsx
import { EntityGithubInsightsReadmeCard } from '@kozmoai/backstage-plugin-github-insights';

a preview of the compliance widget

Please note that the workflow status badge feature in GitHub will not work with the Readme plugin.

ReleasesCard

// packages/app/src/components/catalog/EntityPage.tsx
import { EntityGithubInsightsReleasesCard } from '@kozmoai/backstage-plugin-github-insights';

a preview of the releases widget

EnvironmentsCard

// packages/app/src/components/catalog/EntityPage.tsx
import { EntityGithubInsightsEnvironmentsCard } from '@kozmoai/backstage-plugin-github-insights';

a preview of the releases widget

Links

  • Backstage
  • Get hosted, managed Backstage for your company: https://glint.io