Step 01 · Model
Declare the domain once.
Attributes own global keys and value types. Entity types declare aliases, required fields, cardinality, and reference targets. The same declarations drive command inputs and typed reads.
Typed configuration →import { Effect, Layer } from "effect";
import { EntityId, KvTriples } from "@triplex-build/triplex";
import { Attribute, ConfigStore, EntityType } from "@triplex-build/triplex/config";
import * as Database from "@triplex-build/triplex/database";
import { Why } from "@triplex-build/triplex/why";
const Worker = EntityType.make("Worker", {
name: Attribute.text(":worker/name").required(),
});
const Model = { types: [Worker] } as const;
const maria = EntityId.make("worker:maria");
const MAR_2 = Date.UTC(2026, 2, 2);