weft
ir 2.6.0 · warp 1.8.0
generatedread out of the interfaces that implement them

Reference

Every field of every declaration, with the type it accepts and the default it gets by being left out. Six pages, one per thing you write, and not a sentence on them that the source did not say first.

Every entry — the type, the default, the sentence explaining it — is read out of the source that implements it. A field added to the framework appears here in the same commit; a field removed disappears; a default changed changes on the page that quotes it.

This is the half the guide is not. The guide explains a mechanism and shows the two fields that make the point, which is the right thing to read first and the wrong thing to have open beside a config file at four in the afternoon.

ReferenceWhat it isFields
weft.config.tsEvery option a deployment may state, with the type it accepts and the default it gets by leaving it out.35
defineRouteEvery field a route’s .data.ts may declare — placement, cache policy, budgets, streaming, regions — and what each one decides.62
defineIntentEvery field a mutation declares: what it writes, who may run it, and how much of it one caller gets.9
defineRenderableThe catalogue: what a browser may ask to have rendered, by opaque id, and the gates that ask passes.8
Files and directoriesEvery path the framework gives a meaning to, read out of the convention the discovery walks.17
Ports and adaptersEvery seam the kernel refuses to know about, what implements it, and which config key binds it.14

A weft application needs no configuration file. Without one it gets an in-process store, a cookie session, no flag axes and inline as its only executor — which is a real deployment for one process and an honest starting point for any other, because the moment a port is bound here nothing else in the application changes.

A route’s .data.ts default-exports defineRoute({…}). It is read at build time, so everything here becomes part of the generated plan rather than a branch taken per request — and everything here is checked against what the compiler inferred from the fragments it places. A declaration that contradicts a derivation loses, at build time, with the read that caused it named.

A render cannot write — that is enforced by the type of the context a render receives — so every mutation is an intent, and intents are the only thing in this framework allowed to change anything.

A module under app/renderables/ is to a render request what an intent module is to a mutation, down to the derivation: the id is intentId(module, export), the same six hex characters the compiler writes into a template’s wiring.

A weft application is a folder. The route table is the file tree, and nothing downstream of it may add a route — weft build generates plans from what the discovery found, and a page that is not in app/routes/ does not exist.

Everything a framework normally does for you is a port here: the store, the session, the flags, the executors, the registry, the transport. The kernel imports nothing but the WinterTC Minimum Common Web API, so anything that is not the document request path is on the other side of one of these interfaces.