Pulp Engine Document Rendering
Get started
Release v0.51.0

Release v0.51.0

Date: 2026-04-03

Security headers, starter pack library, and exhaustive documentation sweep.


Added

@fastify/helmet security headers

The API now registers @fastify/helmet to set baseline HTTP security headers on every response:

  • Route-aware Content-Security-Policy: Editor allows blob: and unsafe-inline for PDF preview and styles; Swagger UI defers to its own staticCSP; HTML render endpoints rely on the renderer’s <meta> CSP; all other routes use default-src 'none'.
  • Strict-Transport-Security: max-age=31536000; includeSubDomains when REQUIRE_HTTPS=true.
  • X-Frame-Options: DENY on all routes.
  • Referrer-Policy: strict-origin-when-cross-origin.
  • Permissions-Policy: clipboard-write=(self) for the editor; camera=(), microphone=(), geolocation=() for API routes.
  • Cross-origin isolation policies (CORP/COEP/COOP) are disabled to support cross-port editor development.

See deployment-guide.md § HTTP security headers.

23 starter packs

The new-template dialog now offers 23 starter packs (up from 5), organised into 4 category tabs:

TabPacks
DocumentsLetter, Proposal, Meeting Minutes, Report, Certificate, Contract, NDA, Event Agenda, Product Sheet
FinancialInvoice (Recommended), Quote, Receipt, Credit Note, Expense Report, Timesheet, Statement
HROffer Letter, Pay Stub, Performance Review
OperationsPacking Slip, Purchase Order, Inventory Report

Blank is pinned above the tabs as the default. Each card shows a description, bestFor label, and optional Recommended badge. Selecting a pack auto-fills the template name.

Security-hardening test suite

New test file (apps/api/src/__tests__/security-hardening.test.ts) with 30+ assertions verifying:

  • CSP header presence and correctness per route category
  • HSTS presence when REQUIRE_HTTPS=true and absence when false
  • X-Frame-Options, Referrer-Policy, X-Content-Type-Options on all routes
  • Permissions-Policy per route

Documentation additions

  • RATE_LIMIT_MAX, RATE_LIMIT_RENDER_MAX, PREVIEW_BODY_LIMIT, APP_VERSION added to the deployment-guide env var table
  • GET /render/preview/status endpoint documented in the API guide
  • pulp_engine_renderer_status gauge metric added to the API guide metrics table
  • @fastify/helmet security headers section added to the deployment guide

Changed

Exhaustive documentation sweep

All documentation guides audited and aligned with the current codebase:

FileChanges
api-guide.mdVersion strings updated (0.49.0 → 0.51.0), renderer_status metric added, preview/status endpoint documented
deployment-guide.mdVersion string updated, 4 env vars added, /metrics auth wording corrected, helmet section added
editor-guide.mdStarter packs rewritten: 5 presets → 23 packs across 4 category tabs
evaluator-guide.mdEvaluation checklist expanded with v0.50.0+ editor features
demo-guide.mdTemplate count corrected
mvp-technical-spec.md”Still deferred” section cleaned up (shipped features removed), auth description updated to reflect scoped credential model
README.mdAPI surface description expanded, version example updated
runbook.mdVersion strings updated

Editor internals

  • EditorShell decomposed for maintainability
  • NewTemplateDialog refactored to card-based picker with category tabs
  • Vitest configs updated for html-renderer and pdf-renderer coverage

Validation evidence

CheckMethodResult
Version consistencynode scripts/check-version.mjsCI-verified
Buildpnpm buildCI-verified
Lintpnpm lintCI-verified
Typecheckpnpm typecheckCI-verified
Testspnpm testCI-verified
No stale version stringsgrep -r "0.49.0" docs/Locally verified — zero hits
Starter pack countgrep -c "id: '" starter-packs.tsLocally verified — 23
Metrics auth wordingManual review of deployment-guide.mdLocally verified