Skip to main content
Backstage Integration

API stability data inside Backstage

Only a granted change can proceed.

What this gate does. Advisory, and read-only. The card displays decisions already made; it gates nothing.

The npm package @coderifts/backstage-plugin is not maintained since 2026-03-15: that date is version 1.0.0, and the registry has no later version.

The @coderifts/backstage-plugin adds a CodeRifts card to your Backstage entity pages. See risk scores, block rates, and breaking change patterns for every service.

Format coverage, read 2026-10-04, is the table on the documentation page. An incomplete analysis in authorize mode is ANALYSIS_FAILED and STOP, with the gap named.

API Stability

CodeRifts
Block Rate
45%
Avg Risk Score
62/100
Total Analyses
28
Top Pattern
ENDPOINT_REMOVAL
View Dashboard → (part of the illustration above; the card links to the CodeRifts dashboard in a real install)

Installation

Install the Backstage plugin from npm:

# npm
npm install @coderifts/backstage-plugin

# yarn
yarn add @coderifts/backstage-plugin

Add to your Entity Page

Import the CodeRiftsCard component and add it to your Backstage entity page layout:

Do not paste a key here. CodeRiftsCard renders in the browser, so a literal key in JSX ships to every visitor of your Backstage instance. The literal below shows the prop, not a place to put a secret — read it from app config, as the Configuration section does.

// packages/app/src/components/catalog/EntityPage.tsx

import { CodeRiftsCard } from '@coderifts/backstage-plugin';

// Inside your entity page layout:
<CodeRiftsCard
  repo="your-org/your-repo"
  apiKey="cr_live_..."
/>

Dynamic Repo Detection

Automatically detect the repo from the Backstage entity annotations:

import { useEntity } from '@backstage/plugin-catalog-react';
import { CodeRiftsCard } from '@coderifts/backstage-plugin';

const { entity } = useEntity();
const repo = entity.metadata.annotations?.['github.com/project-slug'] || '';

<CodeRiftsCard repo={repo} apiKey={apiKey} />

Configuration

For production, store the API key in your Backstage app config:

# app-config.yaml
coderifts:
  apiKey: ${CODERIFTS_API_KEY}

Then read it in your component:

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

const config = useApi(configApiRef);
const apiKey = config.getString('coderifts.apiKey');

Props Reference

Prop Type Required Description
repo string Yes Repository in owner/repo format
apiKey string Yes CodeRifts API key (cr_live_...)
baseUrl string No Override API base URL (default: https://app.coderifts.com)

What the card shows

Block Rate
Percentage of PRs blocked for breaking changes in the last 30 days.
Avg Risk Score
Average risk score (0–100) across all analyzed PRs.
Total Analyses
Number of PR analyses performed by CodeRifts for this repo.
Top Pattern
Most common breaking change pattern detected (e.g., ENDPOINT_REMOVAL).

Illustration — the numbers below are placeholders, not a measurement from any repository.