Entity / One domain declaration
How one domain feeds the server, client, and checks
Every rule and query in the domain module uses the Expr language (Expressions), so three independent consumers interpret the exact same declarations:
- The server (
foldkit-remote-drizzle): Binds Entities to SQL tables (bind), compiles queries and guard rules to SQL (query,source), attachesCHECKconstraints (checkConstraints), and executes declared writes (writer,GuardServer.writer). - The browser (
foldkit-remote,foldkit-form,foldkit-crud): Tracks cached rows, applies optimistic write layers, places rows in lists, computesData.canhints, and validates form inputs againstEntity.input. - Offline checks (
Entity.judge,Laws.check): Evaluates invariants against test rows and verifies declared writes against every rule without touching a database.