Skip to content

App Architecture

WebbiOS Apps are independent business modules that extend an instance’s capabilities without modifying or redeploying WebbiOS Core.

Target vs As-Built: Current legacy Apps in early prototypes used static Worker Service Bindings and a shared D1 database. The architecture below defines the Target v1.1.0 App Model currently guiding stabilization and selective rebuilds.

Each stateful App consists of three decoupled layers:

  1. App Worker API: An isolated Cloudflare Worker executing domain business logic behind The Kernel API (Single API Entry Point, e.g., /v1/apps/:slug/*). Technical App Worker hostnames are internal transport targets—clients never call them directly.
  2. Micro-Frontend (MFE): An admin UI bundle loaded into the Universal Dashboard host via Module Federation, scoped to the App’s permissions and routes.
  3. Isolated D1 Database (Stateful Apps Only): Under Strict Data Ownership, Core owns Core D1 (wb_*) and each stateful App owns its own D1 database per instance. Stateless Apps do not provision a D1 database. Cross-App direct database access is strictly forbidden; inter-App integration happens only through versioned API contracts.
  • Independent Lifecycles: install, update, disable, uninstall, and reinstall operate per App without rebuilding or redeploying the Core Worker.
  • Data Retention by Default: Disabling or uninstalling an App preserves its D1 database and R2 objects by default. Destructive data purging requires an explicit, separately approved purge action.
  • Immutable Release Descriptors: Releases follow SemVer 2.0.0 with SHA-256 artifact digests and signed descriptors distributed out-of-band via WebbiPlatform (DEV / Preview / Stable channels). Runtime instances never depend on live Control Plane calls to serve business requests.
  1. Implement domain API, migrations, MFE, and declarative app.manifest.json.
  2. Run automated safety checks (build, typecheck, manifest validation, compatibility, integrity, permission & migration checks).
  3. Package and publish an immutable release artifact to WebbiPlatform (DEV / Preview / Stable).
  4. Install or update via App Manager in the Universal Dashboard.