Project

dev

Primary Sources Project

A reader for bills, laws, and court filings that won't answer without a verifiable citation.

Next.js 15Postgres + pgvectorFastAPIVertex AICloud RunFirebase

It's hard to know whether what you hear about a new bill, a court ruling, or an executive order is actually true. Most of what reaches you came through a journalist, a partisan account, or a chatbot that won't tell you what it's based on. We built Primary Sources Project so you can go straight to the source — the PDF itself — and use an LLM to help find and make sense of the parts that matter.

You upload a folder of PDFs; the app parses each one, embeds it page-by-page in a pgvector index, and routes your questions through Anthropic's Claude or Google's Gemini. Every answer carries footnote citations, and clicking one jumps the right pane to the cited paragraph with the bounding box pulsed on the page. The principle is non-negotiable: the model never makes a claim without a citation, and every citation must be verifiable in one click. When a folder doesn't address a question, the app says so instead of guessing.

Currently in beta. Document uploads are allowlisted to a small set of admins; any signed-in user can read those folders and ask questions. The retrieval layer narrows each citation to the exact paragraph that contained the model's anchor quote, not just the chunk it came from.

Screens

A look at it

Two-pane workspace: chat with footnote citations on the left, PDF viewer with a highlighted passage on the right.
Two-pane workspace: chat with footnote citations on the left, PDF viewer with a highlighted passage on the right.
A citation pill clicked open, with the cited paragraph pulsed in the PDF viewer.
A citation pill clicked open, with the cited paragraph pulsed in the PDF viewer.
Admin folder view with three documents in uploading, processing, and ready states.
Admin folder view with three documents in uploading, processing, and ready states.