📄️ Overview
In order to start, Klerk must have a configuration. The configuration contains all declared rules and a few more things.
📄️ Context
In all interaction with Klerk you must supply a context. As an example:
📄️ Collections
Each model you define will also have a corresponding collections object. This object has one or more collections, it
📄️ DSL and functions
In Klerk, you use the Domain Specific Language (DSL) to define your system at a high level and then implement the details through pure functions. These functions are called by the framework at the appropriate times to enforce the behavior you've specified.
📄️ Models and Types
Use data classes to declare your models. Don't start their names with 'Plugin' as that is reserved for models declared
📄️ State machines
Let's look at an example where we declare the flow of an invoice:
📄️ Authorization
No action (read model, trigger event, read event log) is allowed unless explicitly allowed. This makes it easy to create
📄️ Validation
In order to maintain data integrity, Klerk lets you add validation rules. These rules apply to different levels.