workflow-plugin-cms

module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2026 License: MIT

README

workflow-plugin-cms

⚠️ Experimental — This plugin compiles and passes its unit tests but has not been validated in any active GoCodeAlone-internal production deployment. Use with caution. Please open an issue if you adopt it so we can promote it to verified status.

License Go Reference

Multi-tenant CMS engine for the workflow engine. Foundation plugin of gocodealone-multisite.

What it provides

  • Tenant resolver (cms.tenant_resolver) — Host header → tenant_id; unknown domain → 404 neutral.
  • Static-wins routing (cms.static_serve_before_dynamic) — static files match before any CMS route is considered.
  • CMS engine (cms.engine) — page CRUD, dynamic-section render, theme resolver, bundle fetcher, ingest webhook, upload handler.
  • Analytics injection (analytics.injection) — per-tenant Google Analytics injection delegated to workflow-plugin-analytics.
  • Pipeline stepsstep.cms_render_page, step.cms_bundle_activate.

Status

v0.1.0 — first releasable CMS plugin build. Includes tenant resolution, static-before-dynamic serving, CMS page CRUD/rendering, bundle activation, analytics HTML injection helpers, audit-chain recording for admin writes, and strict plugin contracts.

Static Page Overlays

CMS overlays can clone a static bundle page by recording the source path, source hash, CSS selectors, and draft block document. Publishing requires the current source hash to match the clone hash unless the caller has an explicit force permission. A mismatch moves the overlay to conflict_review so updated static content is reviewed before CMS changes override it.

Disabling an overlay never deletes or mutates the source static bundle; it only marks the overlay inactive for render hooks.

Navigation, Widgets, And Media

Navigation items can target static routes, CMS pages, overlays, or external HTTP(S) URLs. Published navigation excludes draft, archived, and future scheduled items.

Widget instances render only from an explicit allowlist. Raw script tags, inline event handlers, and javascript: URLs are rejected so widget behavior stays bounded by reviewed widget types.

Published migrated content must reference relative media paths or object-store URLs owned by the site. Wix/parastorage/source-host media URLs are rejected until mirrored into site-owned storage.

Admin integration

The cms.engine module exposes the strict service method CMSEngine.AdminContribution. Hosts such as gocodealone-multisite can call it to register the CMS site manager inside the extensible admin shell.

The contribution requires the multisite admin scopes:

  • admin:multisite.sites:read
  • admin:multisite.sites:update
  • admin:multisite.pages:read
  • admin:multisite.pages:update
  • admin:multisite.publish:update
  • admin:multisite.onboarding:plan

API route metadata is returned only when the caller passes authorized: true. That keeps route discovery behind the host's authz check while preserving the strict protobuf contract declared in plugin.contracts.json.

Persistence and backup

CMS page documents are durable application state. Operators backing this plugin with Postgres must include the pages table in backup and restore runs, including body_blocks, template_id, publish_at, and unpublish_at. body_blocks is the canonical editor document when present; body_html remains the backward-compatible fallback for older pages.

Install

# wfctl.yaml
plugins:
  - name: workflow-plugin-cms
    version: v0.1.0
    source: github.com/GoCodeAlone/workflow-plugin-cms
wfctl plugin install

Local development

git clone https://github.com/GoCodeAlone/workflow-plugin-cms.git
cd workflow-plugin-cms
GOWORK=off go build ./...
GOWORK=off go test ./...

License

MIT. See LICENSE.

Directories

Path Synopsis
Package adminui serves the minimum-viable admin web app for the multisite host.
Package adminui serves the minimum-viable admin web app for the multisite host.
Package analytics injects per-tenant analytics snippets into served HTML.
Package analytics injects per-tenant analytics snippets into served HTML.
Package audit emits HMAC-signed audit-chain entries for admin mutations.
Package audit emits HMAC-signed audit-chain entries for admin mutations.
Package bundle owns the per-tenant static-content bundle lifecycle: HMAC-verified ingest webhook → authenticated GH release tarball fetch → un-tar into versioned directory → atomic swap of `current` symlink.
Package bundle owns the per-tenant static-content bundle lifecycle: HMAC-verified ingest webhook → authenticated GH release tarball fetch → un-tar into versioned directory → atomic swap of `current` symlink.
cmd
workflow-plugin-cms command
Command workflow-plugin-cms is a workflow engine external plugin providing the CMS host functionality for gocodealone-multisite.
Command workflow-plugin-cms is a workflow engine external plugin providing the CMS host functionality for gocodealone-multisite.
Package editor defines the WYSIWYG editor provider interface for workflow-plugin-cms.
Package editor defines the WYSIWYG editor provider interface for workflow-plugin-cms.
editorjs
Package editorjs implements the alternative Editor.js WYSIWYG provider — example T23 / SPEC V10.
Package editorjs implements the alternative Editor.js WYSIWYG provider — example T23 / SPEC V10.
tiptap
Package tiptap implements the TipTap WYSIWYG editor.Provider for the CMS engine.
Package tiptap implements the TipTap WYSIWYG editor.Provider for the CMS engine.
Package host wires the workflow-plugin-cms components into a single http.Handler suitable for a standalone CMS host binary.
Package host wires the workflow-plugin-cms components into a single http.Handler suitable for a standalone CMS host binary.
Package internal implements the workflow-plugin-cms plugin — the CMS engine used by gocodealone-multisite to serve multi-tenant content sites from a single workflow app.
Package internal implements the workflow-plugin-cms plugin — the CMS engine used by gocodealone-multisite to serve multi-tenant content sites from a single workflow app.
Package media implements tenant-scoped media upload + retrieval.
Package media implements tenant-scoped media upload + retrieval.
Package monitoring exposes dependency-free per-tenant request counters for CMS host observability adapters.
Package monitoring exposes dependency-free per-tenant request counters for CMS host observability adapters.
Package render handles dynamic-section substitution in served HTML.
Package render handles dynamic-section substitution in served HTML.
Package store defines persistence interfaces + an in-memory test implementation for the CMS engine.
Package store defines persistence interfaces + an in-memory test implementation for the CMS engine.
postgres
Package postgres provides a Postgres-backed CMS store.
Package postgres provides a Postgres-backed CMS store.
Package theme resolves the active theme for a tenant page render.
Package theme resolves the active theme for a tenant page render.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL