📝 Problem / use case *
Currently, VistaRemote's core business logic (such as file transfer, terminal access, and enterprise auditing) is tightly coupled within the main workspace applications (server, desktop, web). As a high-velocity open-source ecosystem under the VibeCode organization, this monolithic approach introduces several critical engineering bottlenecks:
- High Contribution Friction: External community developers cannot extend system capabilities or inject domain-specific tools (e.g., specialized AI auditing adapters, virtual game controllers) without heavily refactoring the core codebase.
- Enterprise Customization Block: We lack a standardized extension sandbox, preventing corporate clients from deploying proprietary, air-gapped security protocols or industry-specific telemetry compliance rules.
- Repository Architecture Bloat: Forcing every specialized feature into the Meta-Repo ruins compilation velocities and introduces heavy dependency-hoisting risks across Electron, React, and NestJS runtimes.
🚀 Proposed solution *
Introduce a unified, decoupled, runtime-injected Cross-Platform Micro-Plugin Framework. The architecture utilizes our flat Meta-Repo layout to implement a "Core-as-Infrastructure, Feature-as-Plugin" strategy across 3 distinct architectural boundaries:
1. Protocol Core (shared)
- Role: The Single Source of Truth for plugin communication.
- Implementation: Establish standard plugin manifest specifications (
PluginManifest) and cross-platform lifecycle hooks/interfaces via pure TypeScript contracts. This ensures that any plugin built by the community strictly adheres to VistaRemote's data schemas.
2. Backend Engine (server - NestJS)
- Role: Dynamic routing and event orchestration.
- Implementation: Implement a decoupled
PluginManagerService inside NestJS. It uses Node.js dynamic import() to scan, hot-load, and orchestrate external JavaScript bundles out of a designated /plugins directory without polluting core boot routing or breaking the Fastify underlying layer.
3. Frontend Runtime (web / desktop)
- Role: On-demand UI component injection.
- Implementation: Configure Module Federation via Rsbuild / Rspack on the Host UI workspace. Establish strict layout slots (
PluginSlot) to securely fetch and isolate remote or local plugin React components at runtime, enabling instant interface extension without client re-compilation.
🛠️ Detailed Implementation Checklist
📌 Additional context
- Tech Stack Bounds: React 19, NestJS 11+, Electron, Rsbuild (Rspack), Vitest.
- Architectural Compliance: All cross-repo commits related to this issue must respect the deterministic sequence rule:
shared ──> server ──> frontend primitives (web / desktop).
📝 Problem / use case *
Currently, VistaRemote's core business logic (such as file transfer, terminal access, and enterprise auditing) is tightly coupled within the main workspace applications (
server,desktop,web). As a high-velocity open-source ecosystem under the VibeCode organization, this monolithic approach introduces several critical engineering bottlenecks:🚀 Proposed solution *
Introduce a unified, decoupled, runtime-injected Cross-Platform Micro-Plugin Framework. The architecture utilizes our flat Meta-Repo layout to implement a "Core-as-Infrastructure, Feature-as-Plugin" strategy across 3 distinct architectural boundaries:
1. Protocol Core (
shared)PluginManifest) and cross-platform lifecycle hooks/interfaces via pure TypeScript contracts. This ensures that any plugin built by the community strictly adheres to VistaRemote's data schemas.2. Backend Engine (
server- NestJS)PluginManagerServiceinside NestJS. It uses Node.js dynamicimport()to scan, hot-load, and orchestrate external JavaScript bundles out of a designated/pluginsdirectory without polluting core boot routing or breaking the Fastify underlying layer.3. Frontend Runtime (
web/desktop)PluginSlot) to securely fetch and isolate remote or local plugin React components at runtime, enabling instant interface extension without client re-compilation.🛠️ Detailed Implementation Checklist
shared): Createplugin-types.tsdefiningPluginManifest,ServerPluginLifecycle, and standard execution permission arrays.server): BuildPluginManagerModulewith dynamic system directory scanning, error-boundary sandboxing, and hot-loading hooks.web&desktop): Updatersbuild.config.tsto support@module-federation/enhancedas Host, and expose generic UI mounting layout slots (PluginSlot).test-plugincontaining minimal server logs and a mock React dashboard to evaluate end-to-end rendering capability via Playwright integration smoke tests.📌 Additional context
shared──>server──> frontend primitives (web/desktop).