Skip to content

feat(faustwp): versioned document store with conflict detection #2562

Closed

Description

@josephfusco

Teams that need to persist app data in WordPress (settings, drafts, structured documents) each end up writing the same small plugin: a custom post type, a REST route, and some kind of version check so concurrent writers don't overwrite each other.

Proposal

Ship a supported, versioned document store in FaustWP:

  • A custom post type holding JSON documents keyed by slug.
  • REST routes under faustwp/v1 to read and write documents.
  • Every write includes the version it was based on. If the stored version has moved on, the route returns 409 Conflict with the current version so the client can merge or retry.
  • Permissions go through standard capabilities, so it composes with the scoped service user proposed in feat(faustwp): scoped service user for server-side writes #2561.

Acceptance

  • GET returns the document and its version.
  • A PUT with a matching version succeeds and bumps the version.
  • A PUT with an old version returns 409 and does not modify the document.
  • Covered by PHPUnit tests and documented.

Activity

  1. added
    phpPull requests that update php code
    and removed on Oct 7, 2026
  2. self-assigned this
    on Oct 20, 2026
  3. josephfusco commented on Oct 20, 2026

    @josephfusco
    MemberAuthor

    The wider direction for this, using WordPress as an app's data store from any frontend, is now an RFC in wpengine/hwptoolkit#817. Storage and the first release's scope are open questions there, so #2674 is a prototype until that's settled.

  4. josephfusco commented on Oct 20, 2026

    @josephfusco
    MemberAuthor

    Tracked in the RFC at wpengine/hwptoolkit#817, with the prototype in #2674.

  5. moved this from 🆕 Backlog to ✅ Closed in Headless OSSon Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Needs DiscussionAnything that needs a discussion/agreement[Area] WordPress PluginIssues for the Faust.js WordPress plugin[Type] FeatureA new feature within an existing modulephpPull requests that update php code

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions