Skip to content

Plugin demo app

plugins-demo is the local harness for trying plugin APIs without publishing a package first. It imports plugin source directly from this workspace and exposes small UI pages for each plugin.

What it is for

Use the demo app when you need to:

  • exercise a plugin function interactively;
  • inspect emitted state from the builder plugins;
  • test authenticated /edge/... calls from a secure local host;
  • add a quick local page for a new plugin while developing it.

Runtime requirements

The Vite dev server is configured for:

  • host: ng.secure.investec.com
  • port: 8080
  • HTTPS certificate files under plugins-demo/ssl/

It also proxies selected routes such as /edge/base, /api, and /az-proxy to staging Investec hosts.

Setup

Create the certificate files expected by plugins-demo/vite.config.ts:

text
plugins-demo/ssl/ng.secure.investec.com.crt
plugins-demo/ssl/ng.secure.investec.com.key

Then run:

sh
npx nx serve plugins-demo

Open:

text
https://ng.secure.investec.com:8080

If you are exercising authenticated endpoints, first establish a valid browser session against the relevant secure Investec host in the same browser profile.

How routes are registered

The demo home page route list is defined in:

text
plugins-demo/src/app/app.element.ts

Each entry lazy-loads a local demo component for one plugin.

Add a page for a new plugin

  1. Create a new page under:

    text
    plugins-demo/src/app/plugins/my-plugin/my-plugin.ts
  2. Import the plugin API directly from this workspace source.

  3. Render inputs and outputs in the custom element.

  4. Add a route entry to the routes array in plugins-demo/src/app/app.element.ts.

Consumer notes

  • The demo app is a local development tool, not a published consumer contract.
  • It uses direct workspace imports, so it can exercise unreleased changes.
  • Authenticated behaviour depends on browser cookies and the local secure host matching what the upstream services expect.