← Back to projects
2026-04-17

AI PDF Reader

A private, local-first document AI product with grounded retrieval, desktop packaging, and strong UX.

Built a local-first AI PDF Reader that lets users upload documents, retrieve grounded answers, generate study guides, and run as both a web app and offline desktop experience.

AI EngineeringSoftware ArchitectureLocal-First AISecurity Engineering

Context

AI PDF Reader solves a practical problem: people want to ask questions about long PDFs without sending sensitive files to a remote service and without losing trust in the answers. The product had to feel simple for end users while still handling local model setup, document parsing, retrieval, study-guide generation, and desktop delivery.

Architecture decisions

  • Built the application with Next.js and TypeScript, then extended it with Electron so the same product experience could run as a desktop app.
  • Used PDF parsing plus chunking and embedding workflows so answers stay grounded in retrieved document sections instead of generic model output.
  • Added local model status handling and desktop runtime directory management so offline usage is practical instead of fragile.
  • Structured the product around clear flows: upload PDF, parse text, create chunks, embed locally, retrieve relevant sections, then answer with a local model.

Security analysis

  • The primary trust boundary is the user device. Uploaded PDFs, generated embeddings, and local model assets all need clear handling because documents may contain sensitive information.
  • Key threats include malicious PDFs, unsafe local file handling, prompt abuse, data leakage through logs, and desktop packaging risks when distributing bundled models.
  • The design reduces exposure by preferring local-first execution, local storage paths, explicit security policy guidance, and tighter desktop boundaries through Electron preload isolation.

Delivery impact

  • The project brings product thinking, AI integration, UX design, desktop packaging, and security awareness into one system.
  • It combines architecture structure, retrieval design, runtime trade-offs, privacy posture, and practical implementation details.
  • It spans interface design, backend workflow design, local AI integration, packaging, documentation, and release readiness.

Architecture diagram

System boundaries, data flow, and core platform components.

AI PDF Reader architecture diagram

Threat model

Trust boundaries, risk areas, and design decisions for safer operation.

AI PDF Reader threat model diagram