diff --git a/workspaces/ui/app-config.production.yaml b/workspaces/ui/app-config.production.yaml deleted file mode 100644 index 5d426f5392..0000000000 --- a/workspaces/ui/app-config.production.yaml +++ /dev/null @@ -1,55 +0,0 @@ -app: - # Should be the same as backend.baseUrl when using the `app-backend` plugin. - baseUrl: http://localhost:7007 - -backend: - # Note that the baseUrl should be the URL that the browser and other clients - # should use when communicating with the backend, i.e. it needs to be - # reachable not just from within the backend host, but from all of your - # callers. When its value is "http://localhost:7007", it's strictly private - # and can't be reached by others. - baseUrl: http://localhost:7007 - # The listener can also be expressed as a single : string. In this case we bind to - # all interfaces, the most permissive setting. The right value depends on your specific deployment. - listen: ':7007' - - # config options: https://node-postgres.com/apis/client - database: - client: pg - connection: - host: ${POSTGRES_HOST} - port: ${POSTGRES_PORT} - user: ${POSTGRES_USER} - password: ${POSTGRES_PASSWORD} - # https://node-postgres.com/features/ssl - # you can set the sslmode configuration option via the `PGSSLMODE` environment variable - # see https://www.postgresql.org/docs/current/libpq-ssl.html Table 33.1. SSL Mode Descriptions (e.g. require) - # ssl: - # ca: # if you have a CA file and want to verify it you can uncomment this section - # $file: /ca/server.crt - -auth: - providers: - guest: {} - -catalog: - # Overrides the default list locations from app-config.yaml as these contain example data. - # See https://backstage.io/docs/features/software-catalog/#adding-components-to-the-catalog for more details - # on how to get entities into the catalog. - locations: - # Local example data, replace this with your production config, these are intended for demo use only. - # File locations are relative to the backend process, typically in a deployed context, such as in a Docker container, this will be the root - - type: file - target: ./examples/entities.yaml - - # Local example template - - type: file - target: ./examples/template/template.yaml - rules: - - allow: [Template] - - # Local example organizational data - - type: file - target: ./examples/org.yaml - rules: - - allow: [User, Group] diff --git a/workspaces/ui/app-config.yaml b/workspaces/ui/app-config.yaml deleted file mode 100644 index 58a48a3e95..0000000000 --- a/workspaces/ui/app-config.yaml +++ /dev/null @@ -1,151 +0,0 @@ -app: - title: Scaffolded Backstage App - baseUrl: http://localhost:3000 - - # Enable all packages by default, this will discover packages from packages/app/package.json - packages: all - - extensions: - # Disable the nav items that we're manually rendering in packages/app/src/modules/nav/Sidebar.tsx - - nav-item:search: false - - nav-item:user-settings: false - - nav-item:catalog: false - - nav-item:scaffolder: false - - # Configure the catalog index page to be the root page, this is normally mounted on /catalog - - page:catalog: - config: - path: / - -organization: - name: My Company - -backend: - # Used for enabling authentication, secret is shared by all backend plugins - # See https://backstage.io/docs/auth/service-to-service-auth for - # information on the format - # auth: - # keys: - # - secret: ${BACKEND_SECRET} - baseUrl: http://localhost:7007 - listen: - port: 7007 - # Uncomment the following host directive to bind to specific interfaces - # host: 127.0.0.1 - csp: - connect-src: ["'self'", 'http:', 'https:'] - # Content-Security-Policy directives follow the Helmet format: https://helmetjs.github.io/#reference - # Default Helmet Content-Security-Policy values can be removed by setting the key to false - cors: - origin: http://localhost:3000 - methods: [GET, HEAD, PATCH, POST, PUT, DELETE] - credentials: true - # This is for local development only, it is not recommended to use this in production - # The production database configuration is stored in app-config.production.yaml - database: - client: better-sqlite3 - connection: ':memory:' - # see https://backstage.io/docs/ai/mcp-actions#actions-configuration for more details - actions: - pluginSources: - - auth - - catalog - - scaffolder - # workingDirectory: /tmp # Use this to configure a working directory for the scaffolder, defaults to the OS temp-dir - -integrations: - github: - - host: github.com - # This is a Personal Access Token or PAT from GitHub. You can find out how to generate this token, and more information - # about setting up the GitHub integration here: https://backstage.io/docs/integrations/github/locations#configuration - token: ${GITHUB_TOKEN} - ### Example for how to add your GitHub Enterprise instance using the API: - # - host: ghe.example.net - # apiBaseUrl: https://ghe.example.net/api/v3 - # token: ${GHE_TOKEN} - -proxy: - ### Example for how to add a proxy endpoint for the frontend. - ### A typical reason to do this is to handle HTTPS and CORS for internal services. - # endpoints: - # '/test': - # target: 'https://example.com' - # changeOrigin: true - -# Reference documentation http://backstage.io/docs/features/techdocs/configuration -# Note: After experimenting with basic setup, use CI/CD to generate docs -# and an external cloud storage when deploying TechDocs for production use-case. -# https://backstage.io/docs/features/techdocs/how-to-guides#how-to-migrate-from-techdocs-basic-to-recommended-deployment-approach -techdocs: - builder: 'local' # Alternatives - 'external' - generator: - runIn: 'docker' # Alternatives - 'local' - publisher: - type: 'local' # Alternatives - 'googleGcs' or 'awsS3'. Read documentation for using alternatives. - -auth: - # see https://backstage.io/docs/auth/ to learn about auth providers - providers: - # See https://backstage.io/docs/auth/guest/provider - guest: {} - # see https://backstage.io/docs/ai/mcp-actions#client-id-metadata-documents - # to learn more about client id metadata documents - experimentalClientIdMetadataDocuments: - enabled: false - # Optional: restrict which `client_id` URLs are allowed (defaults to ['*']) - # allowedClientIdPatterns: - # - 'https://example.com/*' - # - 'https://*.trusted-domain.com/*' - # Optional: restrict which redirect URIs are allowed (defaults to ['*']) - # allowedRedirectUriPatterns: - # - 'http://localhost:*' - # - 'https://*.example.com/*' - -scaffolder: - # see https://backstage.io/docs/features/software-templates/configuration for software template options - -catalog: - import: - entityFilename: catalog-info.yaml - pullRequestBranchName: backstage-integration - rules: - - allow: [Component, System, API, Resource, Location] - locations: - # Local example data, file locations are relative to the backend process, typically `packages/backend` - - type: file - target: ../../examples/entities.yaml - - # Local example template - - type: file - target: ../../examples/template/template.yaml - rules: - - allow: [Template] - - # Local example organizational data - - type: file - target: ../../examples/org.yaml - rules: - - allow: [User, Group] - - ## Uncomment these lines to add more example data - # - type: url - # target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/all.yaml - - ## Uncomment these lines to add an example org - # - type: url - # target: https://github.com/backstage/backstage/blob/master/packages/catalog-model/examples/acme-corp.yaml - # rules: - # - allow: [User, Group] - -kubernetes: - # see https://backstage.io/docs/features/kubernetes/configuration for kubernetes configuration options - -# see https://backstage.io/docs/permissions/getting-started for more on the permission framework -permission: - # setting this to `false` will disable permissions - enabled: true - -# see https://backstage.io/docs/ai/mcp-actions for more details -mcpActions: - name: 'My Company Backstage' # defaults to "backstage" - description: 'Tools for managing your software catalog, creating new services from templates, and exploring your developer portal' # optional diff --git a/workspaces/ui/examples/entities.yaml b/workspaces/ui/examples/entities.yaml deleted file mode 100644 index 447e8b1f34..0000000000 --- a/workspaces/ui/examples/entities.yaml +++ /dev/null @@ -1,41 +0,0 @@ ---- -# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-system -apiVersion: backstage.io/v1alpha1 -kind: System -metadata: - name: examples -spec: - owner: guests ---- -# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-component -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: example-website -spec: - type: website - lifecycle: experimental - owner: guests - system: examples - providesApis: [example-grpc-api] ---- -# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-api -apiVersion: backstage.io/v1alpha1 -kind: API -metadata: - name: example-grpc-api -spec: - type: grpc - lifecycle: experimental - owner: guests - system: examples - definition: | - syntax = "proto3"; - - service Exampler { - rpc Example (ExampleMessage) returns (ExampleMessage) {}; - } - - message ExampleMessage { - string example = 1; - }; diff --git a/workspaces/ui/examples/org.yaml b/workspaces/ui/examples/org.yaml deleted file mode 100644 index a10e81fc7f..0000000000 --- a/workspaces/ui/examples/org.yaml +++ /dev/null @@ -1,17 +0,0 @@ ---- -# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-user -apiVersion: backstage.io/v1alpha1 -kind: User -metadata: - name: guest -spec: - memberOf: [guests] ---- -# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-group -apiVersion: backstage.io/v1alpha1 -kind: Group -metadata: - name: guests -spec: - type: team - children: [] diff --git a/workspaces/ui/examples/template/content/catalog-info.yaml b/workspaces/ui/examples/template/content/catalog-info.yaml deleted file mode 100644 index d4ccca42ef..0000000000 --- a/workspaces/ui/examples/template/content/catalog-info.yaml +++ /dev/null @@ -1,8 +0,0 @@ -apiVersion: backstage.io/v1alpha1 -kind: Component -metadata: - name: ${{ values.name | dump }} -spec: - type: service - owner: user:guest - lifecycle: experimental diff --git a/workspaces/ui/examples/template/content/index.js b/workspaces/ui/examples/template/content/index.js deleted file mode 100644 index 071ce5aa71..0000000000 --- a/workspaces/ui/examples/template/content/index.js +++ /dev/null @@ -1 +0,0 @@ -console.log('Hello from ${{ values.name }}!'); diff --git a/workspaces/ui/examples/template/content/package.json b/workspaces/ui/examples/template/content/package.json deleted file mode 100644 index 86f968a73b..0000000000 --- a/workspaces/ui/examples/template/content/package.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "name": "${{ values.name }}", - "private": true, - "dependencies": {} -} diff --git a/workspaces/ui/examples/template/template.yaml b/workspaces/ui/examples/template/template.yaml deleted file mode 100644 index efb33be866..0000000000 --- a/workspaces/ui/examples/template/template.yaml +++ /dev/null @@ -1,88 +0,0 @@ -apiVersion: scaffolder.backstage.io/v1beta3 -# https://backstage.io/docs/features/software-catalog/descriptor-format#kind-template -kind: Template -metadata: - name: example-nodejs-template - title: Example Node.js Template - description: An example template for the scaffolder that creates a simple Node.js service -spec: - owner: user:guest - type: service - - # These parameters are used to generate the input form in the frontend, and are - # used to gather input data for the execution of the template. - parameters: - - title: Fill in some steps - required: - - name - properties: - name: - title: Name - type: string - description: Unique name of the component - ui:autofocus: true - ui:options: - rows: 5 - - title: Choose a location - required: - - repoUrl - properties: - repoUrl: - title: Repository Location - type: string - ui:field: RepoUrlPicker - ui:options: - allowedHosts: - - github.com - - # These steps are executed in the scaffolder backend, using data that we gathered - # via the parameters above. - steps: - # Each step executes an action, in this case one templates files into the working directory. - - id: fetch-base - name: Fetch Base - action: fetch:template - input: - url: ./content - values: - name: ${{ parameters.name }} - - # This step publishes the contents of the working directory to GitHub. - # If you or your organization prefer another default branch name over 'main' - # you can change that here. - - id: publish - name: Publish - action: publish:github - input: - description: This is ${{ parameters.name }} - repoUrl: ${{ parameters.repoUrl }} - defaultBranch: 'main' - - # The final step is to register our new component in the catalog. - - id: register - name: Register - action: catalog:register - input: - repoContentsUrl: ${{ steps['publish'].output.repoContentsUrl }} - catalogInfoPath: '/catalog-info.yaml' - - # Let's notify the user that the template has completed using the Notification action - - id: notify - name: Notify - action: notification:send - input: - recipients: entity - entityRefs: - - user:default/guest - title: 'Template executed' - info: 'Your template has been executed' - severity: 'normal' - - # Outputs are displayed to the user after a successful execution of the template. - output: - links: - - title: Repository - url: ${{ steps['publish'].output.remoteUrl }} - - title: Open in catalog - icon: catalog - entityRef: ${{ steps['register'].output.entityRef }} diff --git a/workspaces/ui/packages/README.md b/workspaces/ui/packages/README.md deleted file mode 100644 index 6327fa0a99..0000000000 --- a/workspaces/ui/packages/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# The Packages Folder - -This is where your own applications and centrally managed libraries live, each -in a separate folder of its own. - -From the start there's an `app` folder (for the frontend) and a `backend` folder -(for the Node backend), but you can also add more modules in here that house -your core additions and adaptations, such as themes, common React component -libraries, utilities, and similar. diff --git a/workspaces/ui/packages/app/.eslintignore b/workspaces/ui/packages/app/.eslintignore deleted file mode 100644 index a48cf0de7a..0000000000 --- a/workspaces/ui/packages/app/.eslintignore +++ /dev/null @@ -1 +0,0 @@ -public diff --git a/workspaces/ui/packages/app/.eslintrc.js b/workspaces/ui/packages/app/.eslintrc.js deleted file mode 100644 index e2a53a6ad2..0000000000 --- a/workspaces/ui/packages/app/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/workspaces/ui/packages/app/e2e-tests/app.test.ts b/workspaces/ui/packages/app/e2e-tests/app.test.ts deleted file mode 100644 index d8dbc1faa8..0000000000 --- a/workspaces/ui/packages/app/e2e-tests/app.test.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright 2020 The Backstage Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -import { test, expect } from '@playwright/test'; - -test('App should render the welcome page', async ({ page }) => { - await page.goto('/'); - - const enterButton = page.getByRole('button', { name: 'Enter' }); - await expect(enterButton).toBeVisible(); - await enterButton.click(); - - const nav = page.getByRole('navigation'); - await expect( - nav.getByRole('link', { name: 'Catalog', exact: true }), - ).toBeVisible(); - await expect( - page.getByRole('link', { name: 'APIs', exact: true }), - ).toBeVisible(); -}); diff --git a/workspaces/ui/packages/app/package.json b/workspaces/ui/packages/app/package.json deleted file mode 100644 index 3c9eac59ad..0000000000 --- a/workspaces/ui/packages/app/package.json +++ /dev/null @@ -1,72 +0,0 @@ -{ - "name": "app", - "version": "0.0.0", - "private": true, - "bundled": true, - "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/cli": "^0.36.1", - "@backstage/core-components": "^0.18.9", - "@backstage/core-plugin-api": "^1.12.5", - "@backstage/frontend-defaults": "^0.5.1", - "@backstage/frontend-plugin-api": "^0.16.0", - "@backstage/integration-react": "^1.2.17", - "@backstage/plugin-api-docs": "^0.14.0", - "@backstage/plugin-app-react": "^0.2.2", - "@backstage/plugin-app-visualizer": "^0.2.2", - "@backstage/plugin-auth": "^0.1.7", - "@backstage/plugin-catalog": "^2.0.2", - "@backstage/plugin-catalog-graph": "^0.6.1", - "@backstage/plugin-catalog-import": "^0.13.12", - "@backstage/plugin-kubernetes": "^0.12.18", - "@backstage/plugin-notifications": "^0.5.16", - "@backstage/plugin-org": "^0.7.1", - "@backstage/plugin-scaffolder": "^1.36.2", - "@backstage/plugin-search": "^1.7.1", - "@backstage/plugin-signals": "^0.0.30", - "@backstage/plugin-techdocs": "^1.17.3", - "@backstage/plugin-techdocs-module-addons-contrib": "^1.1.35", - "@backstage/plugin-user-settings": "^0.9.2", - "@backstage/ui": "^0.14.0", - "@material-ui/core": "^4.12.2", - "@material-ui/icons": "^4.9.1", - "react": "^18.0.2", - "react-dom": "^18.0.2", - "react-router": "^6.30.2", - "react-router-dom": "^6.30.2" - }, - "devDependencies": { - "@backstage/frontend-test-utils": "^0.5.2", - "@playwright/test": "^1.32.3", - "@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" - ] -} diff --git a/workspaces/ui/packages/app/public/android-chrome-192x192.png b/workspaces/ui/packages/app/public/android-chrome-192x192.png deleted file mode 100644 index eec0ae25b9..0000000000 Binary files a/workspaces/ui/packages/app/public/android-chrome-192x192.png and /dev/null differ diff --git a/workspaces/ui/packages/app/public/apple-touch-icon.png b/workspaces/ui/packages/app/public/apple-touch-icon.png deleted file mode 100644 index 3158830ac7..0000000000 Binary files a/workspaces/ui/packages/app/public/apple-touch-icon.png and /dev/null differ diff --git a/workspaces/ui/packages/app/public/favicon-16x16.png b/workspaces/ui/packages/app/public/favicon-16x16.png deleted file mode 100644 index 58cf61a35e..0000000000 Binary files a/workspaces/ui/packages/app/public/favicon-16x16.png and /dev/null differ diff --git a/workspaces/ui/packages/app/public/favicon-32x32.png b/workspaces/ui/packages/app/public/favicon-32x32.png deleted file mode 100644 index c0915ece75..0000000000 Binary files a/workspaces/ui/packages/app/public/favicon-32x32.png and /dev/null differ diff --git a/workspaces/ui/packages/app/public/favicon.ico b/workspaces/ui/packages/app/public/favicon.ico deleted file mode 100644 index 5e45e5dfbd..0000000000 Binary files a/workspaces/ui/packages/app/public/favicon.ico and /dev/null differ diff --git a/workspaces/ui/packages/app/public/index.html b/workspaces/ui/packages/app/public/index.html deleted file mode 100644 index 18da7c4773..0000000000 --- a/workspaces/ui/packages/app/public/index.html +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - - - - - - - - - - - <%= config.getOptionalString('app.title') ?? 'Backstage' %> - - - -
- - - diff --git a/workspaces/ui/packages/app/public/manifest.json b/workspaces/ui/packages/app/public/manifest.json deleted file mode 100644 index 4a7c1b4ec4..0000000000 --- a/workspaces/ui/packages/app/public/manifest.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "short_name": "Backstage", - "name": "Backstage", - "icons": [ - { - "src": "favicon.ico", - "sizes": "48x48", - "type": "image/png" - } - ], - "start_url": "./index.html", - "display": "standalone", - "theme_color": "#000000", - "background_color": "#ffffff" -} diff --git a/workspaces/ui/packages/app/public/robots.txt b/workspaces/ui/packages/app/public/robots.txt deleted file mode 100644 index 01b0f9a107..0000000000 --- a/workspaces/ui/packages/app/public/robots.txt +++ /dev/null @@ -1,2 +0,0 @@ -# https://www.robotstxt.org/robotstxt.html -User-agent: * diff --git a/workspaces/ui/packages/app/public/safari-pinned-tab.svg b/workspaces/ui/packages/app/public/safari-pinned-tab.svg deleted file mode 100644 index 0f500b3002..0000000000 --- a/workspaces/ui/packages/app/public/safari-pinned-tab.svg +++ /dev/null @@ -1 +0,0 @@ -Created by potrace 1.11, written by Peter Selinger 2001-2013 \ No newline at end of file diff --git a/workspaces/ui/packages/app/src/App.test.tsx b/workspaces/ui/packages/app/src/App.test.tsx deleted file mode 100644 index 98e7a6438d..0000000000 --- a/workspaces/ui/packages/app/src/App.test.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { render, waitFor } from '@testing-library/react'; -import App from './App'; - -describe('App', () => { - it('should render', async () => { - process.env = { - NODE_ENV: 'test', - APP_CONFIG: [ - { - data: { - app: { title: 'Test' }, - backend: { baseUrl: 'http://localhost:7007' }, - techdocs: { - storageUrl: 'http://localhost:7007/api/techdocs/static/docs', - }, - }, - context: 'test', - }, - ] as any, - }; - - const rendered = render(App.createRoot()); - - await waitFor(() => { - expect(rendered.baseElement).toBeInTheDocument(); - }); - }); -}); diff --git a/workspaces/ui/packages/app/src/App.tsx b/workspaces/ui/packages/app/src/App.tsx deleted file mode 100644 index c0206fec07..0000000000 --- a/workspaces/ui/packages/app/src/App.tsx +++ /dev/null @@ -1,7 +0,0 @@ -import { createApp } from '@backstage/frontend-defaults'; -import catalogPlugin from '@backstage/plugin-catalog/alpha'; -import { navModule } from './modules/nav'; - -export default createApp({ - features: [catalogPlugin, navModule], -}); diff --git a/workspaces/ui/packages/app/src/index.tsx b/workspaces/ui/packages/app/src/index.tsx deleted file mode 100644 index ac9e52bdc1..0000000000 --- a/workspaces/ui/packages/app/src/index.tsx +++ /dev/null @@ -1,6 +0,0 @@ -import '@backstage/cli/asset-types'; -import ReactDOM from 'react-dom/client'; -import App from './App'; -import '@backstage/ui/css/styles.css'; - -ReactDOM.createRoot(document.getElementById('root')!).render(App.createRoot()); diff --git a/workspaces/ui/packages/app/src/modules/nav/LogoFull.tsx b/workspaces/ui/packages/app/src/modules/nav/LogoFull.tsx deleted file mode 100644 index 95f69ae530..0000000000 --- a/workspaces/ui/packages/app/src/modules/nav/LogoFull.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { makeStyles } from '@material-ui/core'; - -const useStyles = makeStyles({ - svg: { - width: 'auto', - height: 30, - }, - path: { - fill: '#7df3e1', - }, -}); - -export const LogoFull = () => { - const classes = useStyles(); - - return ( - - - - ); -}; diff --git a/workspaces/ui/packages/app/src/modules/nav/LogoIcon.tsx b/workspaces/ui/packages/app/src/modules/nav/LogoIcon.tsx deleted file mode 100644 index 38544dd156..0000000000 --- a/workspaces/ui/packages/app/src/modules/nav/LogoIcon.tsx +++ /dev/null @@ -1,28 +0,0 @@ -import { makeStyles } from '@material-ui/core'; - -const useStyles = makeStyles({ - svg: { - width: 'auto', - height: 28, - }, - path: { - fill: '#7df3e1', - }, -}); - -export const LogoIcon = () => { - const classes = useStyles(); - - return ( - - - - ); -}; diff --git a/workspaces/ui/packages/app/src/modules/nav/Sidebar.tsx b/workspaces/ui/packages/app/src/modules/nav/Sidebar.tsx deleted file mode 100644 index e0bb425d56..0000000000 --- a/workspaces/ui/packages/app/src/modules/nav/Sidebar.tsx +++ /dev/null @@ -1,58 +0,0 @@ -import { - Sidebar, - SidebarDivider, - SidebarGroup, - SidebarItem, - SidebarScrollWrapper, - SidebarSpace, -} from '@backstage/core-components'; -import { NavContentBlueprint } from '@backstage/plugin-app-react'; -import { SidebarLogo } from './SidebarLogo'; -import MenuIcon from '@material-ui/icons/Menu'; -import SearchIcon from '@material-ui/icons/Search'; -import { SidebarSearchModal } from '@backstage/plugin-search'; -import { UserSettingsSignInAvatar } from '@backstage/plugin-user-settings'; -import { NotificationsSidebarItem } from '@backstage/plugin-notifications'; - -export const SidebarContent = NavContentBlueprint.make({ - params: { - component: ({ navItems }) => { - const nav = navItems.withComponent(item => ( - item.icon} to={item.href} text={item.title} /> - )); - - // Skipped items - nav.take('page:search'); // Using search modal instead - - return ( - - - } to="/search"> - - - - }> - {nav.take('page:catalog')} - {nav.take('page:scaffolder')} - - - {nav.rest({ sortBy: 'title' })} - - - - - - - } - to="/settings" - > - {nav.take('page:app-visualizer')} - {nav.take('page:user-settings')} - - - ); - }, - }, -}); diff --git a/workspaces/ui/packages/app/src/modules/nav/SidebarLogo.tsx b/workspaces/ui/packages/app/src/modules/nav/SidebarLogo.tsx deleted file mode 100644 index 80df964d74..0000000000 --- a/workspaces/ui/packages/app/src/modules/nav/SidebarLogo.tsx +++ /dev/null @@ -1,36 +0,0 @@ -import { - Link, - sidebarConfig, - useSidebarOpenState, -} from '@backstage/core-components'; -import { makeStyles } from '@material-ui/core'; -import { LogoFull } from './LogoFull'; -import { LogoIcon } from './LogoIcon'; - -const useSidebarLogoStyles = makeStyles({ - root: { - width: sidebarConfig.drawerWidthClosed, - height: 3 * sidebarConfig.logoHeight, - display: 'flex', - flexFlow: 'row nowrap', - alignItems: 'center', - marginBottom: -14, - }, - link: { - width: sidebarConfig.drawerWidthClosed, - marginLeft: 24, - }, -}); - -export const SidebarLogo = () => { - const classes = useSidebarLogoStyles(); - const { isOpen } = useSidebarOpenState(); - - return ( -
- - {isOpen ? : } - -
- ); -}; diff --git a/workspaces/ui/packages/app/src/modules/nav/index.ts b/workspaces/ui/packages/app/src/modules/nav/index.ts deleted file mode 100644 index abb61fc8af..0000000000 --- a/workspaces/ui/packages/app/src/modules/nav/index.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { createFrontendModule } from '@backstage/frontend-plugin-api'; -import { SidebarContent } from './Sidebar'; - -export const navModule = createFrontendModule({ - pluginId: 'app', - extensions: [SidebarContent], -}); diff --git a/workspaces/ui/packages/app/src/setupTests.ts b/workspaces/ui/packages/app/src/setupTests.ts deleted file mode 100644 index 7b0828bfa8..0000000000 --- a/workspaces/ui/packages/app/src/setupTests.ts +++ /dev/null @@ -1 +0,0 @@ -import '@testing-library/jest-dom'; diff --git a/workspaces/ui/packages/backend/.eslintrc.js b/workspaces/ui/packages/backend/.eslintrc.js deleted file mode 100644 index e2a53a6ad2..0000000000 --- a/workspaces/ui/packages/backend/.eslintrc.js +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('@backstage/cli/config/eslint-factory')(__dirname); diff --git a/workspaces/ui/packages/backend/Dockerfile b/workspaces/ui/packages/backend/Dockerfile deleted file mode 100644 index a70705fba1..0000000000 --- a/workspaces/ui/packages/backend/Dockerfile +++ /dev/null @@ -1,70 +0,0 @@ -# This dockerfile builds an image for the backend package. -# It should be executed with the root of the repo as docker context. -# -# Before building this image, be sure to have run the following commands in the repo root: -# -# yarn install --immutable -# yarn tsc -# yarn build:backend -# -# Once the commands have been run, you can build the image using `yarn build-image` -# -# Alternatively, there is also a multi-stage Dockerfile documented here: -# https://backstage.io/docs/deployment/docker#multi-stage-build - -FROM node:24-trixie-slim - -# Set Python interpreter for `node-gyp` to use -ENV PYTHON=/usr/bin/python3 - -# Install isolate-vm dependencies, these are needed by the @backstage/plugin-scaffolder-backend. -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - apt-get update && \ - apt-get install -y --no-install-recommends python3 g++ build-essential && \ - rm -rf /var/lib/apt/lists/* - -# Install sqlite3 dependencies. You can skip this if you don't use sqlite3 in the image, -# in which case you should also move better-sqlite3 to "devDependencies" in package.json. -RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ - --mount=type=cache,target=/var/lib/apt,sharing=locked \ - apt-get update && \ - apt-get install -y --no-install-recommends libsqlite3-dev && \ - rm -rf /var/lib/apt/lists/* - -# From here on we use the least-privileged `node` user to run the backend. -USER node - -# This should create the app dir as `node`. -# If it is instead created as `root` then the `tar` command below will fail: `can't create directory 'packages/': Permission denied`. -# If this occurs, then ensure BuildKit is enabled (`DOCKER_BUILDKIT=1`) so the app dir is correctly created as `node`. -WORKDIR /app - -# Copy files needed by Yarn -COPY --chown=node:node .yarn ./.yarn -COPY --chown=node:node .yarnrc.yml ./ -COPY --chown=node:node backstage.json ./ - -# This switches many Node.js dependencies to production mode. -ENV NODE_ENV=production - -# This disables node snapshot for Node 20 to work with the Scaffolder -ENV NODE_OPTIONS="--no-node-snapshot" - -# Copy repo skeleton first, to avoid unnecessary docker cache invalidation. -# The skeleton contains the package.json of each package in the monorepo, -# and along with yarn.lock and the root package.json, that's enough to run yarn install. -COPY --chown=node:node yarn.lock package.json packages/backend/dist/skeleton.tar.gz ./ -RUN tar xzf skeleton.tar.gz && rm skeleton.tar.gz - -RUN --mount=type=cache,target=/home/node/.cache/yarn,sharing=locked,uid=1000,gid=1000 \ - yarn workspaces focus --all --production && rm -rf "$(yarn cache clean)" - -# This will include the examples, if you don't need these simply remove this line -COPY --chown=node:node examples ./examples - -# Then copy the rest of the backend bundle, along with any other files we might want. -COPY --chown=node:node packages/backend/dist/bundle.tar.gz app-config*.yaml ./ -RUN tar xzf bundle.tar.gz && rm bundle.tar.gz - -CMD ["node", "packages/backend", "--config", "app-config.yaml", "--config", "app-config.production.yaml"] diff --git a/workspaces/ui/packages/backend/README.md b/workspaces/ui/packages/backend/README.md deleted file mode 100644 index 3607b0a092..0000000000 --- a/workspaces/ui/packages/backend/README.md +++ /dev/null @@ -1,59 +0,0 @@ -# example-backend - -This package is an EXAMPLE of a Backstage backend. - -The main purpose of this package is to provide a test bed for Backstage plugins -that have a backend part. Feel free to experiment locally or within your fork by -adding dependencies and routes to this backend, to try things out. - -Our goal is to eventually amend the create-app flow of the CLI, such that a -production ready version of a backend skeleton is made alongside the frontend -app. Until then, feel free to experiment here! - -## Development - -To run the example backend, first go to the project root and run - -```bash -yarn install -``` - -You should only need to do this once. - -After that, go to the `packages/backend` directory and run - -```bash -yarn start -``` - -If you want to override any configuration locally, for example adding any secrets, -you can do so in `app-config.local.yaml`. - -The backend starts up on port 7007 per default. - -## Populating The Catalog - -If you want to use the catalog functionality, you need to add so called -locations to the backend. These are places where the backend can find some -entity descriptor data to consume and serve. For more information, see -[Software Catalog Overview - Adding Components to the Catalog](https://backstage.io/docs/features/software-catalog/#adding-components-to-the-catalog). - -To get started quickly, this template already includes some statically configured example locations -in `app-config.yaml` under `catalog.locations`. You can remove and replace these locations as you -like, and also override them for local development in `app-config.local.yaml`. - -## Authentication - -We chose [Passport](http://www.passportjs.org/) as authentication platform due -to its comprehensive set of supported authentication -[strategies](http://www.passportjs.org/packages/). - -Read more about the -[auth-backend](https://github.com/backstage/backstage/blob/master/plugins/auth-backend/README.md) -and -[how to add a new provider](https://github.com/backstage/backstage/blob/master/docs/auth/add-auth-provider.md) - -## Documentation - -- [Backstage Readme](https://github.com/backstage/backstage/blob/master/README.md) -- [Backstage Documentation](https://backstage.io/docs) diff --git a/workspaces/ui/packages/backend/package.json b/workspaces/ui/packages/backend/package.json deleted file mode 100644 index 4e6464cc65..0000000000 --- a/workspaces/ui/packages/backend/package.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "name": "backend", - "version": "0.0.0", - "main": "dist/index.cjs.js", - "types": "src/index.ts", - "private": true, - "backstage": { - "role": "backend" - }, - "scripts": { - "start": "backstage-cli package start", - "build": "backstage-cli package build", - "lint": "backstage-cli package lint", - "test": "backstage-cli package test", - "clean": "backstage-cli package clean", - "build-image": "docker build ../.. -f Dockerfile --tag backstage" - }, - "dependencies": { - "@backstage/backend-defaults": "^0.17.0", - "@backstage/config": "^1.3.7", - "@backstage/plugin-app-backend": "^0.5.13", - "@backstage/plugin-auth-backend": "^0.28.0", - "@backstage/plugin-auth-backend-module-github-provider": "^0.5.2", - "@backstage/plugin-auth-backend-module-guest-provider": "^0.2.18", - "@backstage/plugin-auth-node": "^0.7.0", - "@backstage/plugin-catalog-backend": "^3.6.0", - "@backstage/plugin-catalog-backend-module-logs": "^0.1.21", - "@backstage/plugin-catalog-backend-module-scaffolder-entity-model": "^0.2.19", - "@backstage/plugin-kubernetes-backend": "^0.21.3", - "@backstage/plugin-mcp-actions-backend": "^0.1.12", - "@backstage/plugin-notifications-backend": "^0.6.4", - "@backstage/plugin-permission-backend": "^0.7.11", - "@backstage/plugin-permission-backend-module-allow-all-policy": "^0.2.18", - "@backstage/plugin-permission-common": "^0.9.8", - "@backstage/plugin-permission-node": "^0.10.12", - "@backstage/plugin-proxy-backend": "^0.6.12", - "@backstage/plugin-scaffolder-backend": "^3.4.0", - "@backstage/plugin-scaffolder-backend-module-github": "^0.9.8", - "@backstage/plugin-scaffolder-backend-module-notifications": "^0.1.21", - "@backstage/plugin-search-backend": "^2.1.1", - "@backstage/plugin-search-backend-module-catalog": "^0.3.14", - "@backstage/plugin-search-backend-module-pg": "^0.5.54", - "@backstage/plugin-search-backend-module-techdocs": "^0.4.13", - "@backstage/plugin-search-backend-node": "^1.4.3", - "@backstage/plugin-signals-backend": "^0.3.14", - "@backstage/plugin-techdocs-backend": "^2.1.7", - "app": "link:../app", - "better-sqlite3": "^12.0.0", - "node-gyp": "^10.0.0", - "pg": "^8.11.3" - }, - "devDependencies": { - "@backstage/cli": "^0.36.1" - }, - "files": [ - "dist" - ] -} diff --git a/workspaces/ui/packages/backend/src/index.ts b/workspaces/ui/packages/backend/src/index.ts deleted file mode 100644 index 7e9be64a7d..0000000000 --- a/workspaces/ui/packages/backend/src/index.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* - * Hi! - * - * Note that this is an EXAMPLE Backstage backend. Please check the README. - * - * Happy hacking! - */ - -import { createBackend } from '@backstage/backend-defaults'; - -const backend = createBackend(); - -backend.add(import('@backstage/plugin-app-backend')); -backend.add(import('@backstage/plugin-proxy-backend')); - -// scaffolder plugin -backend.add(import('@backstage/plugin-scaffolder-backend')); -backend.add(import('@backstage/plugin-scaffolder-backend-module-github')); -backend.add( - import('@backstage/plugin-scaffolder-backend-module-notifications'), -); - -// techdocs plugin -backend.add(import('@backstage/plugin-techdocs-backend')); - -// auth plugin -backend.add(import('@backstage/plugin-auth-backend')); -// See https://backstage.io/docs/backend-system/building-backends/migrating#the-auth-plugin -backend.add(import('@backstage/plugin-auth-backend-module-guest-provider')); -// See https://backstage.io/docs/auth/guest/provider - -// catalog plugin -backend.add(import('@backstage/plugin-catalog-backend')); -backend.add( - import('@backstage/plugin-catalog-backend-module-scaffolder-entity-model'), -); - -// See https://backstage.io/docs/features/software-catalog/configuration#subscribing-to-catalog-errors -backend.add(import('@backstage/plugin-catalog-backend-module-logs')); - -// permission plugin -backend.add(import('@backstage/plugin-permission-backend')); -// See https://backstage.io/docs/permissions/getting-started for how to create your own permission policy -backend.add( - import('@backstage/plugin-permission-backend-module-allow-all-policy'), -); - -// search plugin -backend.add(import('@backstage/plugin-search-backend')); - -// search engine -// See https://backstage.io/docs/features/search/search-engines -backend.add(import('@backstage/plugin-search-backend-module-pg')); - -// search collators -backend.add(import('@backstage/plugin-search-backend-module-catalog')); -backend.add(import('@backstage/plugin-search-backend-module-techdocs')); - -// kubernetes plugin -backend.add(import('@backstage/plugin-kubernetes-backend')); - -// notifications and signals plugins -backend.add(import('@backstage/plugin-notifications-backend')); -backend.add(import('@backstage/plugin-signals-backend')); - -// mcp actions plugin -backend.add(import('@backstage/plugin-mcp-actions-backend')); - -backend.start();