Which module loads (main process job init and renderer root UI) is controlled by a single configuration: the ARO_ACTIVE_MODULE environment variable.
- Default: When
ARO_ACTIVE_MODULEis unset or empty, the app loads hello-world. - Valid module IDs:
hello-world(default),inspect(in QA, not production-ready). - Inspect: Set
ARO_ACTIVE_MODULE=inspectwhen starting the app.
For development you can set the active module in a .env file so you don’t need to pass the env var each time. Create .env at the project root (or copy from .env.example), set ARO_ACTIVE_MODULE=hello-world or ARO_ACTIVE_MODULE=inspect, then restart the app. Shell/inline env var overrides .env if both are set.
Examples:
# Run with default (hello-world)
pnpm start
# Run with inspect module
ARO_ACTIVE_MODULE=inspect pnpm startOn Windows (PowerShell): $env:ARO_ACTIVE_MODULE="inspect"; pnpm start
Restart the app after changing the variable; no rebuild required.
Invalid value: If ARO_ACTIVE_MODULE is set to an unknown module key, the main process loads the default module (hello-world) and logs a warning; the renderer shows an error screen with the invalid value and lists valid options (hello-world, inspect).
- Add the module package to
apps/desktop/package.jsondependencies (e.g."@aro/module-foo": "workspace:*"). - Register the module in main process: apps/desktop/src/main/moduleRegistry.ts — import its
initand callregister('foo', init). - Register the module in renderer: apps/desktop/src/renderer/moduleRegistry.tsx — import its root UI component and add
'foo': FooApptomoduleComponents.
No edits to moduleLoader.ts or App.tsx logic; they resolve the active module from the registry using ARO_ACTIVE_MODULE.