Kelvin Perez / Workflow engineering
Read the receipt.
Validate before writing.
A visual explanation of the verified Trigger.dev and TypeScript demonstration.
Recorded evidence • November 7, 202601 / Architecture
Hosted orchestration. Private processing.
Trigger.dev records task execution and retries. A single macOS development worker reads private files, runs OCR and TypeScript validation, and persists review decisions and CSV receipts on the same durable filesystem.
The task payload contains a filename, not PDF bytes. The public portfolio contains sanitized retained evidence. A visitor-facing task gateway is still pending, so this page never presents its evidence replay as a fresh processing run.
What each component owns
| Component | Responsibility | Boundary |
|---|---|---|
| Storage intake | Read a bounded PDF, hash it and take an immutable snapshot. | 5 MB, five pages, no document code execution. |
| Trigger.dev task | Schedule and observe execution. Retry eligible synthetic transient faults. | Four attempts total. Permanent or ambiguous failures abort. |
| Extraction | Poppler text or Apple Vision OCR, layout rows and source evidence. | Draft fields, no invented identity or currency. |
| TypeScript rules | Require evidence, exact positive amounts, calendar-valid due dates for invoices. | Receipts can omit due dates. No currency conversion. |
| Processor store | Serialize changes, save versions, decisions and effect receipts. | One shared local filesystem, not distributed storage. |
| Accounting CSV | Append one accepted record and reconcile a stable marker after uncertainty. | Controlled QA output, no payments or production bookkeeping. |
02 / Decisions
Extraction proposes. Validation gates. A person resolves.
International amounts
1.234,56 and 1,234.56 can both normalize to 1234.56. Strict group sizes prevent arbitrary punctuation stripping. A single separator followed by three digits remains uncertain and requires confirmation.
The reference total for receipt 002 is 28,000. Its normalized draft is 28000.00. Currency remains unknown. The source line stays visible so the reviewer can assess the interpretation.
Human review
A missing vendor, missing currency, conflicting field, invalid amount or invalid date blocks export. Corrections require a reason and preserve before/after values, actor, timestamp and version. The corrected document passes the same validation again.
Approving an outdated version fails. An approval is permission to export a valid revision; it is not permission to skip the accounting boundary.
03 / Results
What the evidence actually establishes
Real receipt totals matched reference annotations.
Real receipts stayed in review. None was exported.
Synthetic accounting rows had unique destination markers.
These five receipts were used during development. This is an in-sample result, not a production accuracy benchmark. There is no measured staff-time or revenue improvement. The separate synthetic controls establish accepted output, correction and recovery behavior.
Inspect the retained measurement data · Read the detailed architecture guide
04 / Actual interface

