service-betterportal-config-manager
betterportal/service-betterportal-config-managerBetterPortal config management admin service
BetterPortal Config Manager
Admin-oriented BetterPortal service that discovers enabled service bindings and their BP config schema surfaces.
PostgreSQL presence updates use a separate activity table (created on startup), without changing the platform config revision. Presence reads are cached for five seconds; real config writes always enqueue replica invalidation. Setup, bootstrap and hostname-change completions commit their leased result and config change in one transaction.
Identical preview deployment POST retries replay the original response, including credentials, for 15 minutes. Only the latest request per deployment is retained, encrypted with the control-plane identity; preserve that identity across replicas and restarts. GET never returns the replay record. Expired replay records are removed by maintenance. An identical POST within this window is a retry, not a fresh production-config sync.
Config streams revalidate credentials on updates, coalesce concurrent changes and omit unchanged payloads. Webhook delivery remains at-least-once: receivers must deduplicate by x-bp-webhook-id. Each attempt has a 10-second request deadline and is leased immediately before delivery.
Preview API writes retry revision conflicts up to five total attempts, reloading configuration and rechecking authorization and credential replay each time. Continued contention returns HTTP 503 with Retry-After: 1; callers may retry the same request. This also covers preview deletion and expiry cleanup during GET.
Preview route refreshes consolidate equivalent generated API mounts for the same service, view and URL pattern. For example, separate GET, PUT and DELETE mounts copied from the source app become one generated API mount with all current API operations, preserving the first mount ID and compatible request and presentation settings. Distinct valid aliases and service-path variants survive; aliases retain their selected operations. Conflicting request settings or paths owned by unrelated routes still return HTTP 409. Repeating a successful refresh leaves the routes unchanged; deleting staging is unnecessary. See preview deployment operations for an example.
Preview reconciliation also owns API mounts during normal service manifest sync. Generic source-app normalization does not rewrite preview aliases or strip their query strings, fixed parameters or path variants before reconciliation.
Installation
bsb client install betterportal/service-betterportal-config-manager
bsb plugin install betterportal/service-betterportal-config-manager
npm install @betterportal/config-manager
Configuration
Configuration options for this plugin:
No configuration required
Events
Events available to clients of this plugin:
Listen (Fire and Forget)
Events this plugin handles silently.
webhook.delivery.available
fire-and-forget
Wakes one config-manager instance to process durable webhook deliveries.
webhook.delivery.available
fire-and-forget
Listen to Broadcasts
Broadcast events this plugin subscribes to.
platform-config.changed
broadcast
Emitted after a platform config revision is committed.
platform-config.changed
broadcast