← 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.

StatusPublic recruiter demo
EnvironmentSynthetic data · Stripe test mode
RoleProduct + engineering
PriorityReviewable AI output

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

  1. 01Document
  2. 02Parse / OCR
  3. 03Chunk + embed
  4. 04Retrieve
  5. 05Generate + cite
  6. 06Human review

03 / Decisions

How I approached it

  1. Preserve page-level provenance through document parsing and OCR fallback.
  2. Validate structured extraction against typed templates instead of accepting free-form output.
  3. Ground chat in retrieved document chunks and return source citations with answers.
  4. Enforce workspace membership in application checks, PostgreSQL policies, and regression tests.
  5. 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

See how the other system handles a different boundary.