Overview

PWFabric

PWFabric turns a declarative surface — blocks, bindings, capabilities, appearance — into a live page, in a browser or on a server. It is the engine behind PhiWebs, and it runs without it.

An app built on PWFabric travels. Its source moves as a pwpack, its runnable form as a pwapp, and either can be served from any static host. That portability is why this engine is open: a promise that your app is yours cannot rest on an engine you are not allowed to read.

pnpm add @phimajor-solutions/pwfabric-runtime @phimajor-solutions/pwfabric-contracts
import { SurfaceRenderer } from '@phimajor-solutions/pwfabric-runtime'
 
export function Page({ surface }) {
  return <SurfaceRenderer surface={surface} />
}

The packages

PackageWhat it isLicence
pwfabric-contractsThe types and schemas everything agrees onApache-2.0
pwfabric-authoringdefineBlock, defineFactory — write your own blocksApache-2.0
pwfabric-corePrimitives the rest is built fromBSL 1.1
pwfabric-runtimeThe rendererBSL 1.1
pwfabric-runnerRuns a pwapp — routing, navigation, sign-inBSL 1.1
pwfabric-embedPuts one surface inside a page you already haveBSL 1.1

All published under the @phimajor-solutions scope.

Where to start

You want to…Go to
Render a surface in an app you haveQuickstart
Write your own blockdefineBlock
Understand what you may do with the codeLicensing
Work from a terminalCLI

Two licences, on purpose

The contracts are Apache-2.0: an interface that is not free to adopt is not an interface. The engine is under the Business Source License — use it, change it, host what you build with it, including for your own customers. The one thing reserved is offering PWFabric itself as a competing hosted service. Four years after each release, that version becomes Apache-2.0.

Read the licensing model →