A robust pipeline that merges complex application data with standard templates, outputting compliant PDFs and tracking them historically inside an immutable ledger.
Create document layouts using standard Blade views, Markdown files, or by uploading fillable PDFs directly.
The stateless engine flattens your Eloquent data and passes it to drivers like Gotenberg or Pdftk to generate the finalized artifact.
Generated artifacts are attached to application models and bundled into Document Envelopes for strict lifecycle and e-signature management.
By separating the mechanical rendering pipeline from the stateful business logic, this package keeps controllers clean while providing an audit-ready compliance trail.
Split logically into two concepts: A stateless DocumentEngine that merges arrays and generates files, and a database-aware DocumentManager orchestrating temporal versions and polymorphic persistence.
To keep domain logic out of controllers, the package utilizes an abstract BaseDocumentMapper (extending Laravel's JsonResource) to flatten complex relationships into predictable key-value arrays.
Initial tests powered by Pest verify Blade hydration and Markdown parsing strictly within the Document Engine, requiring absolutely no database connection to assert rendering logic.
Designed to be fully headless, but conditionally loads a complete UI (featuring Monaco code editors, routing streams, and template previews) if Filament is detected in the host application.