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
62 changes: 62 additions & 0 deletions apps/aparavi-ui/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{
"name": "@rocketride/aparavi-ui",
"version": "1.0.0",
"private": true,
"description": "Aparavi AQL Chat — natural-language query interface for Aparavi data",
"license": "MIT",
"appManifest": {
"id": "rocketride.aparavi",
"publisher": "Aparavi Software AG",
"name": "Aparavi AQL",
"description": "Chat with your Aparavi data using natural language",
"icon": "./src/icon.svg",
"categories": ["tools"],
"mode": "free",
"authenticated": true,
"showStatusBar": true,
"settings": [
{
"key": "ROCKETRIDE_APARAVI_URL",
"label": "Aparavi Server URL",
"description": "Base URL of the Aparavi platform API (e.g. https://app.aparavi.com)",
"type": "text",
"required": true
},
{
"key": "ROCKETRIDE_APARAVI_USER",
"label": "Aparavi User ID",
"description": "User ID for authenticating with the Aparavi API",
"type": "text",
"required": true
},
{
"key": "ROCKETRIDE_APARAVI_PASSWORD",
"label": "Aparavi Password",
"description": "Password for authenticating with the Aparavi API",
"type": "envkey",
"required": true
}
]
},
"scripts": {
"build": "pnpm rsbuild build"
},
"browserslist": [
"chrome >= 81",
"edge >= 83",
"firefox >= 76",
"safari >= 13"
],
"dependencies": {
"@module-federation/rsbuild-plugin": "^2.5.1",
"shell-ui": "workspace:*",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"shared": "workspace:*"
},
"devDependencies": {
"@rsbuild/core": "~2.0.11",
"@rsbuild/plugin-react": "~2.0.1",
"typescript": "^5.3.0"
}
}
77 changes: 77 additions & 0 deletions apps/aparavi-ui/rsbuild.config.mts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
// =============================================================================
// APARAVI-UI — Module Federation Remote (Aparavi AQL Chat)
// =============================================================================
// Builds remoteEntry.js + AppDescriptor chunk only.
// NOT a standalone app. Run shell-ui:dev for development.
// =============================================================================

import fs from 'node:fs';
import path from 'node:path';
import { fileURLToPath } from 'node:url';
import { defineConfig } from '@rsbuild/core';
import { pluginReact } from '@rsbuild/plugin-react';
import { pluginModuleFederation } from '@module-federation/rsbuild-plugin';

const __dirname = path.dirname(fileURLToPath(import.meta.url));
const pkg = JSON.parse(fs.readFileSync(path.resolve(__dirname, 'package.json'), 'utf-8'));
const moduleId = (pkg.appManifest?.id ?? 'unknown').replace(/[^a-zA-Z0-9_$]/g, '_');

export default defineConfig(() => {
return {
plugins: [
pluginReact(),
pluginModuleFederation({
name: moduleId,
filename: 'remoteEntry.js',
exposes: {
'./AppDescriptor': './src/AppDescriptor.ts',
},
dts: false,
// runtime: false — the host (shell-ui) provides the MF runtime;
// remotes don't embed their own copy, keeping remoteEntry.js
// stable across app-code-only rebuilds.
runtime: false,
shared: {
// eager: true makes shared-scope negotiation synchronous on
// both host and remote, eliminating the async deadlock that
// hangs the browser when only one remote is recompiled.
react: { singleton: true, eager: true, requiredVersion: '^18.2.0' },
'react-dom': { singleton: true, eager: true, requiredVersion: '^18.2.0' },
// import: false tells MF to NOT bundle a fallback copy —
// the host (shell-ui) always provides these at runtime.
'shell-ui': { singleton: true, requiredVersion: false, import: false },
'shared': { singleton: true, requiredVersion: false, import: false },
},
}),
],
// No resolve aliases — all shared modules (shell-ui, shared, react)
// resolve through node_modules (pnpm workspace link) and MF provides
// the host's singleton at runtime.
resolve: {},
tools: {
// Treat .pipe files as JSON so the pipeline definition can be imported.
rspack: {
module: {
rules: [{ test: /\.pipe$/, type: 'json' }],
},
},
},
server: { port: 3018 },
source: {
entry: {
index: './src/index.ts',
},
},
output: {
distPath: {
root: path.join(process.env.ROCKETRIDE_BUILD_ROOT ?? '../../build', 'apps', 'aparavi-ui'),
},
assetPrefix: 'auto',
cleanDistPath: true,
sourceMap: {
js: 'source-map',
css: true,
},
},
};
});
36 changes: 36 additions & 0 deletions apps/aparavi-ui/scripts/tasks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
// MIT License
//
// Copyright (c) 2026 Aparavi Software AG
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

/**
* Aparavi UI Build Module
*
* Aparavi AQL Chat — natural-language query interface for Aparavi data.
*/
const path = require('path');
const { createAppModule } = require('../../../scripts/lib/appModule');

module.exports = createAppModule({
name: 'aparavi-ui',
description: 'Aparavi AQL Chat Application',
appRoot: path.join(__dirname, '..'),
dev: true,
});
Loading
Loading