# Cookbook

Each recipe states a problem, shows code that compiles with `@dryvcode/author`, and explains why. The patterns come from the maintained `core-journey` example project in the repository (`sdk/_examples/projects/core-journey`), which is generated and tested end to end.

| Recipe                                                                            | Solves                                                                      |
| --------------------------------------------------------------------------------- | --------------------------------------------------------------------------- |
| [A CRUD resource](/authoring/cookbook/crud-resource)                              | Entity, read/create/update/query shapes, five operations, HTTP              |
| [Properties, enums and validation](/authoring/cookbook/properties-and-validation) | Reusable value types, constraints, enums, unions, optional and array fields |
| [Relations between schemas](/authoring/cookbook/relations)                        | Foreign keys, cardinality, delete behaviour                                 |
| [Policies and access](/authoring/cookbook/policies-and-access)                    | Authentication, rules, scope policies                                       |
| [Scoped operations](/authoring/cookbook/scoped-operations)                        | Constrain records to a tenant or owner                                      |
| [Events and workflows](/authoring/cookbook/events-and-workflows)                  | Events, failures and who listens                                            |
| [Storage and projections](/authoring/cookbook/storage-and-projections)            | Storage facets, indexes, derived shapes                                     |

> [!TIP]
> Every recipe is TypeScript. The Python author has the same concepts with Pythonic names; use the [TypeScript to Python table](/authoring/sdk/python) to translate.
