Skip to content

Document Lifecycle Overview

Document Lifecycle tracks controlled documents across publication and acceptance workflows. It is built for legal, policy, terms, and operational documents where the system needs to prove which version was published and accepted.

  • capell-app/admin
  • capell-app/core
  • capell-app/publishing-studio
  • DocumentResource in the admin Websites navigation group.
  • Read/edit access to controlled document records.
  • Publication and acceptance relation managers on each document.
  • Actions for registering documents, publishing versioned content, resolving the latest publication, and recording acceptances.
  • Publishing Studio revision listener that creates document publications when a matching registered document is published.
  • Protected table registration for document and acceptance audit tables.
SurfacePurpose
DocumentResource indexLists controlled documents with key, title, status, publication count, and update time.
EditDocumentEdits title, status, and metadata for a controlled document.
PublicationsRelationManagerShows version labels, content hashes, publishing revision IDs, and publish times.
AcceptancesRelationManagerShows accepted versions, hashes, contexts, acceptors, and acceptance times.

This package does not register public frontend routes or Blade views in the current implementation. Public projects should call package actions from their own consent, legal, or account flows when recording acceptances.

The screenshot contract is stored in screenshots.json. The first isolated audit pass expects screenshots for:

  • controlled documents index;
  • controlled document edit form;
  • publications relation manager;
  • acceptances relation manager.

Install in a Capell app with Publishing Studio:

Terminal window
composer require capell-app/document-lifecycle

Then verify package behaviour from this repository:

Terminal window
vendor/bin/pest packages/document-lifecycle/tests --configuration=phpunit.xml

Document Lifecycle is admin/database-only in this pass. It has no package-owned frontend output, so public screenshots should only be added when a host package wires these actions into a visible consent or legal-document flow.