Skip to content

Commit d198681

Browse files
committed
feat(app-next): app-next initial spike
This change introduces the new frontend system by adding a new app-next package. This new frontend can co-exist alongside the previous frontend system and is enabled by setting the following environment variable: ```bash export APP_CONFIG_app_packageName=app-next ``` before starting the RHDH backend. An additional start:next script has been added to the backend package, and it is also possible to use this environment variable to select the new frontend when using the RHDH container. Signed-off-by: Stan Lewis <[email protected]> Assisted-by: Cursor Desktop
1 parent 032fb71 commit d198681

20 files changed

+779
-20
lines changed

.rhdh/docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ COPY $EXTERNAL_SOURCE_NESTED/plugins/dynamic-plugins-info-backend/package.json .
7373
COPY $EXTERNAL_SOURCE_NESTED/packages/plugin-utils/package.json ./packages/plugin-utils/package.json
7474
COPY $EXTERNAL_SOURCE_NESTED/packages/backend/package.json ./packages/backend/package.json
7575
COPY $EXTERNAL_SOURCE_NESTED/packages/app/package.json ./packages/app/package.json
76+
COPY $EXTERNAL_SOURCE_NESTED/packages/app-next/package.json ./packages/app-next/package.json
7677
COPY $EXTERNAL_SOURCE_NESTED/package.json ./package.json
7778
# END COPY package.json files
7879

docker/Dockerfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ COPY $EXTERNAL_SOURCE_NESTED/plugins/dynamic-plugins-info-backend/package.json .
7272
COPY $EXTERNAL_SOURCE_NESTED/packages/plugin-utils/package.json ./packages/plugin-utils/package.json
7373
COPY $EXTERNAL_SOURCE_NESTED/packages/backend/package.json ./packages/backend/package.json
7474
COPY $EXTERNAL_SOURCE_NESTED/packages/app/package.json ./packages/app/package.json
75+
COPY $EXTERNAL_SOURCE_NESTED/packages/app-next/package.json ./packages/app-next/package.json
7576
COPY $EXTERNAL_SOURCE_NESTED/package.json ./package.json
7677
# END COPY package.json files
7778

packages/app-next/.eslintrc.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
module.exports = require('@backstage/cli/config/eslint-factory')(__dirname, {
2+
rules: {
3+
'@backstage/no-top-level-material-ui-4-imports': 'error',
4+
},
5+
});

packages/app-next/README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# app-next
2+
3+
## Overview
4+
5+
This package contains the Red Hat Developer Hub (RHDH) frontend application built using Backstage's new frontend system architecture. The `app-next` package leverages Backstage's new frontend system, which introduces a more modular and extensible architecture compared to the legacy frontend system. This new system is built around the concepts of extensions, plugins, and utility APIs, providing better composability and customization options.
6+
7+
## Development
8+
9+
### Primary Development Workflow
10+
11+
The recommended way to run the new frontend system is using the `backend start:next` command:
12+
13+
```bash
14+
# from the root of the repo
15+
yarn workspace backend start:next
16+
```
17+
18+
### Standalone Development
19+
20+
You can also run the frontend application independently for development:
21+
22+
```bash
23+
# from the root of the repo
24+
yarn workspace app-next start
25+
```
26+
27+
### Other Available Commands
28+
29+
- `yarn build` - Build the application for production
30+
- `yarn test` - Run the test suite
31+
- `yarn lint` - Run linting checks
32+
- `yarn clean` - Clean build artifacts
33+
34+
## Architecture
35+
36+
This application is built using Backstage's [new frontend system](https://backstage.io/docs/frontend-system/architecture/index), which provides:
37+
38+
- **Extension-based architecture**: Modular components that can be composed together
39+
- **Plugin system**: Reusable functionality packages
40+
- **Utility APIs**: Shared services and functionality
41+
- **Route management**: Dynamic routing system for plugin navigation
42+
- **Theming and customization**: Flexible styling and branding options

packages/app-next/package.json

Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
{
2+
"name": "app-next",
3+
"version": "0.0.23",
4+
"private": true,
5+
"bundled": true,
6+
"backstage": {
7+
"role": "frontend"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "https://github.com/redhat-developer/rhdh",
12+
"directory": "packages/app-next"
13+
},
14+
"license": "Apache-2.0",
15+
"files": [
16+
"dist"
17+
],
18+
"scripts": {
19+
"build": "backstage-cli package build",
20+
"clean": "backstage-cli package clean",
21+
"lint": "backstage-cli package lint",
22+
"start": "backstage-cli package start --config ../../app-config.yaml",
23+
"test": "backstage-cli package test"
24+
},
25+
"browserslist": {
26+
"production": [
27+
">0.2%",
28+
"not dead",
29+
"not op_mini all"
30+
],
31+
"development": [
32+
"last 1 chrome version",
33+
"last 1 firefox version",
34+
"last 1 safari version"
35+
]
36+
},
37+
"dependencies": {
38+
"@backstage/app-defaults": "1.6.2",
39+
"@backstage/catalog-model": "1.7.4",
40+
"@backstage/cli": "0.32.1",
41+
"@backstage/config": "1.3.2",
42+
"@backstage/core-app-api": "1.17.0",
43+
"@backstage/core-compat-api": "0.4.2",
44+
"@backstage/core-components": "0.17.2",
45+
"@backstage/core-plugin-api": "1.10.7",
46+
"@backstage/frontend-app-api": "0.11.2",
47+
"@backstage/frontend-defaults": "0.2.2",
48+
"@backstage/frontend-dynamic-feature-loader": "0.1.0",
49+
"@backstage/frontend-plugin-api": "0.10.2",
50+
"@backstage/integration-react": "1.2.7",
51+
"@backstage/plugin-app": "0.1.9",
52+
"@backstage/plugin-app-visualizer": "0.1.19",
53+
"@backstage/plugin-auth-react": "0.1.15",
54+
"@backstage/plugin-catalog": "1.30.0",
55+
"@backstage/plugin-catalog-common": "1.1.4",
56+
"@backstage/plugin-catalog-graph": "0.4.19",
57+
"@backstage/plugin-catalog-import": "0.13.0",
58+
"@backstage/plugin-catalog-react": "1.18.0",
59+
"@backstage/plugin-catalog-unprocessed-entities": "0.2.17",
60+
"@backstage/plugin-home": "0.8.8",
61+
"@backstage/plugin-permission-react": "0.4.34",
62+
"@backstage/plugin-scaffolder": "1.31.0",
63+
"@backstage/plugin-scaffolder-react": "1.16.0",
64+
"@backstage/plugin-search": "1.4.26",
65+
"@backstage/plugin-search-common": "1.2.18",
66+
"@backstage/plugin-search-react": "1.9.0",
67+
"@backstage/plugin-user-settings": "0.8.22",
68+
"@backstage/theme": "0.6.6",
69+
"@material-ui/core": "4.12.2",
70+
"@material-ui/icons": "4.9.1",
71+
"@material-ui/lab": "4.0.0-alpha.61",
72+
"@octokit/rest": "19.0.3",
73+
"history": "5.0.0",
74+
"react": "18.3.1",
75+
"react-dom": "18.3.1",
76+
"react-router": "6.3.0",
77+
"react-router-dom": "6.30.1",
78+
"react-use": "17.6.0",
79+
"zen-observable": "0.10.0"
80+
},
81+
"devDependencies": {
82+
"@backstage/test-utils": "1.7.8",
83+
"@testing-library/dom": "9.3.4",
84+
"@testing-library/jest-dom": "6.6.3",
85+
"@testing-library/react": "14.3.1",
86+
"@testing-library/user-event": "14.6.1",
87+
"@types/jquery": "3.3.34",
88+
"@types/react": "18.3.23",
89+
"@types/react-dom": "18.3.7",
90+
"@types/zen-observable": "0.8.0",
91+
"cross-env": "7.0.0"
92+
}
93+
}
13.3 KB
Loading
4.72 KB
Loading

packages/app-next/public/favicon.ico

14.7 KB
Binary file not shown.

0 commit comments

Comments
 (0)