S-Contract — Document Workflow

A document/contract workflow: upload DOCX templates, collect submissions through shareable forms, review and approve them, and auto-generate filled DOCX + PDF.

Check the gallery
Date:

Apr 2026 - Present

Categories:
Web DevelopmentDocument AutomationWorkflowFull Stack DevelopmentLaravel
Technologies:
  • Laravel
  • Filament
  • PHPWord
  • LibreOffice
  • PostgreSQL
  • Octane/RoadRunner
  • Pest

S-Contract — Document Workflow

A tool that turns a Word contract template into a shareable form, collects filled submissions from external parties, routes them through an approval workflow, and produces the final signed-ready DOCX and PDF — automatically.

Challenge

Organizations reuse the same contracts over and over, but the process is manual: copy a template, fill the blanks, email it around, chase approvals, and re-export to PDF every single time.

Solution

  • Template variables: upload a DOCX with {{ placeholders }} and the app extracts them into a structured form — even when Word splits a placeholder across internal runs.
  • Shareable forms: generate public links with optional OTP email verification, allowed-domain restrictions, expiry, and submission limits.
  • Approval workflow: auto-approve when validation passes, or route for manual review with approve / reject (and resubmit) — with email notifications at each step.
  • Document generation: on approval, the filled DOCX is produced with PHPWord and converted to PDF via headless LibreOffice, all on background queues.

Technical Implementation

Laravel 13 with two Filament 5 panels (admin + public form), PHPWord for templating, and LibreOffice for PDF conversion. Deployed with Nixpacks + RoadRunner (Octane) and a supervisor-managed queue. Tested with Pest and a GitHub Actions CI pipeline.

© 2025, All Rights Reserved.