Skip to main content
All Projects
AIDevelopmentProductPersonal

Seefluence: AI-Grounded Document Reader

A document reader that rebuilds PDFs, EPUBs and Word files into typeset, searchable, AI-grounded reading pages. Documents are parsed into a versioned tree of content blocks instead of fixed page images, so the same chapter reflows at any width, in any font, with an assistant that cites the exact passages it drew from.

Solo Product Owner, Architect and Builder V1 shipped Aug 2026
Automated tests
171
Commits reviewed
66
Work groups closed
13
Formats parsed
5

The Challenge

Documents are laid out for print: fixed page widths, hyphenation, repeated headers, two-column academic layouts. None of that survives being read on a phone, on a laptop, or by a screen reader. Readers end up bouncing between a PDF viewer, a note app and a separate AI chat tab just to get through a single document.

My Contribution

Wrote the full product specification and the three-layer product architecture (Reading, Intelligence, Knowledge) before any code existed

Chose the core infrastructure: a stateless web tier paired with an interruption-safe worker tier, a Postgres-table job queue instead of a message broker, and one storage abstraction shared by local disk and S3-compatible object storage

Designed the block-level annotation model, four reading modes with persistent typography and theming, and a library model where a folder is explicitly a label rather than a location

Ran a ten-phase audit programme across repository health, frontend, backend, security, accessibility and performance, under a rule that every finding must cite a command, a file and a line

Reviewed and shipped all 66 commits in the project history personally; there was no second reviewer

Results

171

automated tests across 5 packages, green on lint, typecheck and test

0

cross-tenant isolation gaps, enforced by a sweep that enumerates route files rather than trusting a hand-kept list

13

planned work groups closed, with nothing left open at V1

87

kB shared JS on the no-Sentry path, versus 163 kB configured, so the unconfigured path costs nothing

AI Collaboration

Claude Code worked as the implementation partner across the build. The shipped product also contains a grounded AI reading assistant: answers are constructed from retrieved document blocks and carry the content hashes they came from, with document text treated strictly as data rather than instruction.

What I did

  • Product vision, scope, and the call on what to build first versus defer
  • Architecture and infrastructure choices, including the two-tier deployment split and the Postgres job queue
  • The ten-phase audit programme, its evidence rule, and the acceptance criteria for every group of work
  • Judgement calls written into the codebase commentary: what a folder is allowed to mean, why tree depth is capped at the sidebar rather than the database, why a confirmation link must be redeemed by a page action because mail scanners fetch links before people do
  • Review and acceptance of every commit before it landed

What AI executed

  • Writing the parser passes, API routes, React components and Prisma schema against direction I set
  • Drafting and running the test suites, including the adversarial prompt-injection fixture
  • First-pass audit sweeps against the rule set I defined
  • Iterative fixes where a defect was named and the repair needed writing, reviewing and re-verifying

Work Completed

Upload, parse and read core loop

PDF, EPUB, DOCX, Markdown and TXT, with OCR for scanned pages.

Shipped

Reader: typography, themes, reading modes

Preferences persist across every document rather than resetting per session.

Shipped

Annotations: highlights, notes, bookmarks

Offset-anchored, so they survive re-extraction and theme changes.

Shipped

Library: folders, collections, tags, search

Sort, filter and pagination run in the database, not against a fetched array.

Shipped

AI reading assistant

Behind a feature flag, citation-linked back to the source blocks.

Shipped

Account: auth, reset, verification, export and delete

Hashed single-use tokens with no email enumeration.

Shipped

Accessibility: keyboard nav, focus, reduced motion

Section-level keyboard navigation, skip-to-content, ARIA labelling.

Shipped

Figure extraction from PDFs

Deliberately deferred; the figure count is reported as zero rather than faked.

Planned

Cross-document search and research workspace

Knowledge-layer roadmap item scoped for V3.

Planned

Translation, text-to-speech, citation export

Scoped in the specification, not yet started.

Planned

Challenges and Solutions

Several APIs were fully built and tested with nothing in the UI calling them: annotations, reading progress and preferences were backend-complete and frontend-absent.

Solution

Reordered the remaining-work plan to ship those frontends first, because they were the cheapest and highest-value work available.

Real uploads failed with a 413 that no application code ever saw. The app validated files up to a 100 MB limit, but the serverless function body cap was 4.5 MB.

Solution

Rebuilt uploads as a three-step direct-to-storage flow (ticket, client PUT, finalize), moving validation onto the object that actually landed rather than the request that arrived.

A two-column academic PDF was read straight across. Column detection measured coverage against the page's full bounding box, and a running head plus page number stretched that box past the body text's own coverage.

Solution

Measured coverage against the median occupied bin instead, which reflects a typical column and ignores the sparse bins under a title.

Moving a folder inside its own subtree satisfied every database constraint while producing a ring with no path from the root: data stays in Postgres and silently vanishes from every screen.

Solution

Three independent layers — a pure cycle-detection function, a tree builder that refuses to recurse through a stored ring, and a parent picker that never offers the illegal move.

Technical Implementation

Frontend

Next.js 14 (App Router)React 18Tailwind CSSShared design-token package

Backend

Next.js API routesStandalone Node/tsx worker servicePostgres-table job queue

Data and ORM

PostgreSQLPrisma 5GIN index over document text

Authentication

NextAuth (Auth.js) v5bcryptjsSHA-256 hashed, single-use, purpose-namespaced tokens

Infrastructure

Vercel (web)Railway (worker)Neon (Postgres)Cloudflare R2Sentry

Tooling

TurborepopnpmVitestPlaywright
Available Now

Want something like this built?

I scope, architect, and ship products end to end, using AI coding assistants as implementation partners under close direction. Let us talk about what you are building.