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.0App Model currently guiding stabilization and selective rebuilds.
Anatomy of a WebbiOS App
Section titled “Anatomy of a WebbiOS App”Each stateful App consists of three decoupled layers:
- 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. - Micro-Frontend (MFE): An admin UI bundle loaded into the Universal Dashboard host via Module Federation, scoped to the App’s permissions and routes.
- 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.
App Lifecycle & Zero Core Redeploy
Section titled “App Lifecycle & Zero Core Redeploy”- Independent Lifecycles:
install,update,disable,uninstall, andreinstalloperate 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
purgeaction. - Immutable Release Descriptors: Releases follow SemVer 2.0.0 with
SHA-256artifact digests and signed descriptors distributed out-of-band viaWebbiPlatform(DEV/Preview/Stablechannels). Runtime instances never depend on live Control Plane calls to serve business requests.
Developer Loop (First-Party Apps)
Section titled “Developer Loop (First-Party Apps)”- Implement domain API, migrations, MFE, and declarative
app.manifest.json. - Run automated safety checks (build, typecheck, manifest validation, compatibility, integrity, permission & migration checks).
- Package and publish an immutable release artifact to
WebbiPlatform(DEV/Preview/Stable). - Install or update via App Manager in the Universal Dashboard.