Entity / One domain declaration

One domain declaration

In most applications, facts about your data—such as products having an owner, stock limits, lifecycle states, and reviews—get duplicated in four places: SQL tables on the server, cache keys and optimistic updates in the browser, validation in forms, and pre-checks inside handlers. Every extra copy drifts over time until the UI permits an action or renders a list that the server rejects.

Foldkit Plus lets you write those facts once in a domain module using foldkit-entity, foldkit-guard, and foldkit-remote: Entities and relations, invariants, lifecycle states, guard rules, declared writes, and queries. The domain module stays free of database drivers and UI code, so the server, browser cache, forms, and tests all read one source of truth.

This model is state-based—the stored row is the authoritative fact. If your server is event-sourced, see When to use another approach.