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-contractsimport { SurfaceRenderer } from '@phimajor-solutions/pwfabric-runtime'
export function Page({ surface }) {
return <SurfaceRenderer surface={surface} />
}The packages
| Package | What it is | Licence |
|---|---|---|
pwfabric-contracts | The types and schemas everything agrees on | Apache-2.0 |
pwfabric-authoring | defineBlock, defineFactory — write your own blocks | Apache-2.0 |
pwfabric-core | Primitives the rest is built from | BSL 1.1 |
pwfabric-runtime | The renderer | BSL 1.1 |
pwfabric-runner | Runs a pwapp — routing, navigation, sign-in | BSL 1.1 |
pwfabric-embed | Puts one surface inside a page you already have | BSL 1.1 |
All published under the @phimajor-solutions scope.
Where to start
| You want to… | Go to |
|---|---|
| Render a surface in an app you have | Quickstart |
| Write your own block | defineBlock |
| Understand what you may do with the code | Licensing |
| Work from a terminal | CLI |
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.