Spatial Text Extraction Solves PDF Layout Chaos
LiteParse extracts text from PDFs using traditional parsing—not AI—via PDF.js for layout analysis and Tesseract.js OCR fallback for scanned images. Its core innovation is spatial parsing: heuristics detect multi-column layouts, tables, and complex structures to reorder text into logical reading flow, preserving context lost in naive left-to-right extraction. Output includes JSON with bounding boxes per text element (position, dimensions, font), enabling visual citations—crop and highlight PDF sections in RAG Q&A responses for higher credibility. Run lit parse document.pdf in Node CLI; browser version processes 86-page PDFs locally, outputting copyable text/JSON without data leaving your device.
Trade-offs: OCR adds compute (unchecked by default); skips full screenshots initially but supports page renders via PDF.js canvas for verification.
Build Fast Web Apps with Claude Code Prompts
Fork LiteParse repo, create web branch, prompt Claude Code: generate plan.md adapting Node libs (PDF.js, Tesseract.js) to browser—handle streams/readables via canvas-encode swap, add file drop UI, text/JSON outputs with copy buttons. Implement via red/green TDD using Playwright (test Chrome/Firefox/Safari), small commits for reviewability, Vite dev server for live reload. Queue fixes: center drop zone text, "Copied!" feedback (1.5s), mobile-friendly, link to original repo.
Deploy: GitHub Actions on push—run tests, Vite build, Pages deploy to simonw.github.io/liteparse/. Total build: 59 minutes. Verify without review: prompt GPT-5.5 on Node vs web diffs confirms faithful port.
Key prompts extract max value: start with plan artifact, iterate queued instructions, screenshot UI bugs, specify browsers for cross-compat.
Vibe Coding Works for Low-Risk Client-Side Tools
Vibe code (AI builds without code review) shines here: static GitHub Pages app has zero server blast radius—bugs affect only your PDF. No network calls during parse ensures privacy. Engineering judgment picks port (feasible per Claude analysis), prompts enforce quality (TDD, commits). Result ships faster than manual: attach reputation confidently, offer as upstream PR starter. Differs from pure vibe by requiring domain insight (browser feasibility) but skips audits since local-only.