Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions workspaces/scorecard/.changeset/tidy-windows-behave.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@red-hat-developer-hub/backstage-plugin-scorecard': minor
---

Added support for the New Frontend System (NFS), including an alpha export for NFS apps and a new `app-next` package.
2 changes: 2 additions & 0 deletions workspaces/scorecard/.prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ dist-types
coverage
.vscode
.eslintrc.js
report-alpha.api.md
report.api.md
12 changes: 7 additions & 5 deletions workspaces/scorecard/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
# [Backstage](https://backstage.io)
# [Backstage](https://backstage.io) — Scorecard

This is your newly scaffolded Backstage App, Good Luck!
This workspace contains the Scorecard plugin and a Backstage example app. The frontend is available in two packages: **app** (New Frontend System / NFS) and **app-legacy** (legacy frontend).

To start the app, run:
## Getting started

```sh
yarn install
yarn start
```

> Notice: The guest user has admin permissions in this application for quick setup. For better control, specify more users and groups in app-config.local.yaml and define a separate admin/admins permission instead of using the guest user. Using the guest user as an admin is not recommended for permission management.
- **app (NFS, default):** Run `yarn start` to start the NFS app and backend. Open [http://localhost:3000](http://localhost:3000), then go to Catalog and open an entity to use the Scorecard tab.
- **app-legacy:** Run `yarn start:legacy` to start the legacy frontend with the backend. Use the Scorecard tab on entity pages or the scorecard homepage card.

> **Notice:** The guest user has admin permissions in this application for quick setup. For better control, specify more users and groups in `app-config.local.yaml` and define a separate admin/admins permission instead of using the guest user. Using the guest user as admin is not recommended for permission management.
14 changes: 14 additions & 0 deletions workspaces/scorecard/app-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
app:
title: Scaffolded Backstage App
baseUrl: http://localhost:3000
packages: all
extensions:
- api:app/app-language:
config:
availableLanguages: ['en', 'de', 'fr']
defaultLanguage: 'en'

# Scorecard tab: entity shows tab if it matches any filter below.
- entity-content:catalog/entity-content-scorecard:
config:
allowedFilters:
- kind: component # e.g. Component with spec.type: website
type: website
- kind: api # e.g. any API entity
- type: service # e.g. Component or System with spec.type: service
organization:
name: My Company

Expand Down
4 changes: 4 additions & 0 deletions workspaces/scorecard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
},
"scripts": {
"start": "backstage-cli repo start",
"start:legacy": "backstage-cli repo start packages/app-legacy packages/backend",
"start-backend": "yarn workspace backend start",
"tsc": "tsc",
"tsc:full": "tsc --skipLibCheck true --incremental false",
Expand Down Expand Up @@ -65,5 +66,8 @@
"*.{json,md}": [
"prettier --write"
]
},
"dependencies": {
"changeset": "^0.2.6"
}
}
1 change: 1 addition & 0 deletions workspaces/scorecard/packages/app-legacy/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname);
File renamed without changes.
90 changes: 90 additions & 0 deletions workspaces/scorecard/packages/app-legacy/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
{
"name": "app-legacy",
"version": "0.0.0",
"private": true,
"bundled": true,
"repository": {
"type": "git",
"url": "https://github.com/redhat-developer/rhdh-plugins",
"directory": "workspaces/scorecard/packages/app-legacy"
},
"backstage": {
"role": "frontend"
},
"scripts": {
"start": "backstage-cli package start",
"build": "backstage-cli package build",
"clean": "backstage-cli package clean",
"test": "backstage-cli package test",
"lint": "backstage-cli package lint"
},
"dependencies": {
"@backstage-community/plugin-github-issues": "^0.13.0",
"@backstage-community/plugin-rbac": "^1.50.0",
"@backstage/app-defaults": "^1.7.2",
"@backstage/catalog-model": "^1.7.6",
"@backstage/cli": "^0.34.5",
"@backstage/core-app-api": "^1.19.2",
"@backstage/core-components": "^0.18.3",
"@backstage/core-plugin-api": "^1.12.0",
"@backstage/integration-react": "^1.2.12",
"@backstage/plugin-api-docs": "^0.13.1",
"@backstage/plugin-catalog": "^1.32.0",
"@backstage/plugin-catalog-common": "^1.1.7",
"@backstage/plugin-catalog-graph": "^0.5.3",
"@backstage/plugin-catalog-import": "^0.13.7",
"@backstage/plugin-catalog-react": "^1.21.3",
"@backstage/plugin-kubernetes": "^0.12.13",
"@backstage/plugin-org": "^0.6.46",
"@backstage/plugin-permission-react": "^0.4.38",
"@backstage/plugin-scaffolder": "^1.34.3",
"@backstage/plugin-search": "^1.5.0",
"@backstage/plugin-search-react": "^1.10.0",
"@backstage/plugin-techdocs": "^1.16.0",
"@backstage/plugin-techdocs-module-addons-contrib": "^1.1.30",
"@backstage/plugin-techdocs-react": "^1.3.5",
"@backstage/plugin-user-settings": "^0.8.29",
"@backstage/theme": "^0.7.0",
"@backstage/ui": "^0.9.1",
"@material-ui/core": "^4.12.2",
"@material-ui/icons": "^4.9.1",
"@openshift/dynamic-plugin-sdk": "^5.0.1",
"@red-hat-developer-hub/backstage-plugin-dynamic-home-page": "^1.10.2",
"@red-hat-developer-hub/backstage-plugin-scorecard": "workspace:^",
"@red-hat-developer-hub/backstage-plugin-theme": "^0.12.0",
"@roadiehq/backstage-plugin-github-pull-requests": "^3.5.1",
"@roadiehq/backstage-plugin-jira": "^2.13.1",
"@scalprum/react-core": "0.11.1",
"react": "^18.0.2",
"react-dom": "^18.0.2",
"react-router": "^6.3.0",
"react-router-dom": "^6.3.0"
},
"devDependencies": {
"@axe-core/playwright": "^4.10.0",
"@backstage/test-utils": "^1.7.13",
"@playwright/test": "^1.56.1",
"@red-hat-developer-hub/backstage-plugin-scorecard-common": "workspace:^",
"@testing-library/dom": "^9.0.0",
"@testing-library/jest-dom": "^6.0.0",
"@testing-library/react": "^14.0.0",
"@testing-library/user-event": "^14.0.0",
"@types/react-dom": "*",
"cross-env": "^7.0.0"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
},
"files": [
"dist"
]
}
60 changes: 60 additions & 0 deletions workspaces/scorecard/packages/app-legacy/public/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<meta name="theme-color" content="#000000" />
<meta
name="description"
content="Backstage is an open source framework for building developer portals"
/>
<!--
manifest.json provides metadata used when your web app is installed on a
user's mobile device or desktop. See https://developers.google.com/web/fundamentals/web-app-manifest/
-->
<link
rel="manifest"
href="<%= publicPath %>/manifest.json"
crossorigin="use-credentials"
/>
<link rel="icon" href="<%= publicPath %>/favicon.ico" />
<link rel="shortcut icon" href="<%= publicPath %>/favicon.ico" />
<link
rel="apple-touch-icon"
sizes="180x180"
href="<%= publicPath %>/apple-touch-icon.png"
/>
<link
rel="icon"
type="image/png"
sizes="32x32"
href="<%= publicPath %>/favicon-32x32.png"
/>
<link
rel="icon"
type="image/png"
sizes="16x16"
href="<%= publicPath %>/favicon-16x16.png"
/>
<link
rel="mask-icon"
href="<%= publicPath %>/safari-pinned-tab.svg"
color="#5bbad5"
/>
<title><%= config.getOptionalString('app.title') ?? 'Backstage' %></title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.

You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.

To begin the development, run `yarn start`.
To create a production bundle, use `yarn build`.
-->
</body>
</html>
Loading
Loading