Skip to content

Add a recipe/cookbook example for common patterns #5

@mgoldsborough

Description

@mgoldsborough

Summary

New users often want to see specific patterns beyond the full examples. A short cookbook/recipes document showing common patterns would help with onboarding.

What to do

Create docs/COOKBOOK.md with short, copy-paste-ready snippets for:

  1. Singleton entity — how to define a config entity that only has one instance (see CRM pipeline example)
  2. Entity relationships — how to link entities via the relationships field (e.g., task → project)
  3. Structured search — common filter patterns ($gte, $in, $contains)
  4. Soft delete + restore — delete an entity and bring it back
  5. Seed data format — how to structure seed JSON files (single entity vs. array)

Each recipe should be 10-20 lines with a code snippet and one sentence of explanation.

Acceptance criteria

  • docs/COOKBOOK.md exists with 5+ recipes
  • Each recipe has a working code example
  • Linked from the main README (in the Specs table or a new section)

Estimated time: ~2 hours

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions