Dyrected
Examples & RecipesRecipe Library

Add draft, review, and publishing states

Attach Dyrected's standard editorial workflow and its capability-aware transitions to a collection.

This generated recipe is review-ready source material. Use it from the runtime where it appears in the sidebar and search results.

Attach Dyrected's standard editorial workflow and its capability-aware transitions to a collection.

Use this when

  • add draft and publish states
  • require review before publishing
  • create an editorial workflow
  • let editors submit content for approval

Dyrected concepts

publishingWorkflow, workflow transitions, capabilities

Additional packages: No additional packages.

Decisions and cautions

Use this recipe only when its runtime matches the project you are documenting or building. Cloud recipes must stay inside the managed content backend boundary. Self-hosted recipes may use the server runtime, database, hooks, and infrastructure you control.

Complete recipe

This is the canonical source compiled and behavior-tested by @dyrected/knowledge.

import { defineCollection, defineRichTextField, defineTextField, publishingWorkflow } from "@dyrected/core";

export const Posts = defineCollection({
  slug: "posts",
  workflow: publishingWorkflow(),
  fields: [
    defineTextField({ name: "title", label: "Title", required: true }),
    defineRichTextField({ name: "body", label: "Body", required: true }),
  ],
});

On this page

Dyrected| Cloud

Get your backend ready in minutes

Use a managed database, storage, APIs, and admin dashboard without setting up the infrastructure yourself.

Set Up My Backend