← Back to selected work
Flagship · document intelligence
Paperline
A full-stack AI document system that turns PDFs, DOCX files, scans, and images into structured, cited, reviewable outputs.
01 / Problem
The engineering challenge
Model output is only useful when a person can trace it back to the source, review uncertainty, and keep one workspace from crossing into another.
02 / System
From input to evidence
- 01Document
- 02Parse / OCR
- 03Chunk + embed
- 04Retrieve
- 05Generate + cite
- 06Human review
03 / Decisions
How I approached it
- Preserve page-level provenance through document parsing and OCR fallback.
- Validate structured extraction against typed templates instead of accepting free-form output.
- Ground chat in retrieved document chunks and return source citations with answers.
- Enforce workspace membership in application checks, PostgreSQL policies, and regression tests.
- Expose a deliberately read-only MCP surface so an agent can retrieve evidence without mutating customer data.
04 / Proof
What can be inspected
- Next.js 16 and TypeScript application surfaces
- Supabase/PostgreSQL schema with pgvector and row-level security
- Clerk workspace identity and scoped authorization checks
- Security regressions, deterministic evaluation fixtures, and CI gates
- Public demo with explicit synthetic-data and test-billing labels
05 / Boundaries
What this does not claim
- The public demo is a recruiter environment, not a production customer deployment.
- Billing is test mode; sample users and documents are synthetic.
- Planned integrations are labeled separately from implemented behavior.
Next case study