Skip to content

Use the generated application

Nomos generates the application surface from its compiled law. In Flutter, the starter reads like this:

final estate = await application.estates.birth(
const CreateEstateInput(reference: 'E-001', name: 'Foundry'),
);
final NomosRef<Asset> asset = await estate.commissionAsset(
const CommissionAssetInput(
name: 'Main electricity meter',
rfidQrIdentity: 'E20034120123456789012345',
),
);
estate.assets.watchOne(asset).listen(render);

EstateApplication is application state. Reuse the opened instance across routes and micro-frontends. Do not reopen the workspace on navigation, and do not mirror its reads into a hand-written repository.

NomosRef<Asset> is the asset’s identity everywhere. An accepted update changes the aggregate’s history; it does not manufacture a replacement business object.