Financial documents, in plain English.
FinanceLens AI
Financial documents are written for lawyers and analysts. They are among the most consequential documents a company publishes, yet nearly inaccessible without a trained framework. Summarization removes complexity; it does not show what the language signals, what changed quarter to quarter, or where management hedged versus committed. FinanceLens is built on the thesis that structured intelligence is a different product than summarization.
The proof point
The shift from "we will deliver" to "we believe we are well positioned to deliver" is not a stylistic choice. It is information. FinanceLens structures financial documents into six sections of analysis, surfaces where the language shifted, ties claims to source passages when present, and closes the loop at a 30-day shareable URL.
Translation is the minimum. Intelligence is the product: what it signals, where language drifted, what changed from last quarter, and what deserves a closer look.
The problem
The stakes are not abstract
structured analysis sections
FinanceLens product spec
pivot decisions from Canva API block through media pipeline, attribution, share URLs, and compare UX
Case study Section 3
day TTL on all Supabase-backed share URLs (410 on expiry)
financelens_sessions
Process
How it was built
STEP 01 — PRODUCT THESIS
The product thesis
Summarization is a solved problem. Intelligence is not. The brief was to build a tool that structures financial documents into distinct analytical sections, each with a defined purpose, with claims tied to source passages when present. Six sections, Zod-validated, with language drift detection as the most analytically novel capability.
Pivots
What changed and why
The original spec called for Canva Connect API. App review blocked access with no timeline. The architecture was redesigned: Claude generates a JSON deck outline, pptxgenjs renders the PPTX (Calibri, Office-safe), pdf-lib generates the branded PDF (WSJ Editorial typography), and a custom deck viewer at /deck/[slug] serves the 30-day Supabase-backed URL.
A roadmap dependency on a pending API approval is a schedule risk. Own the layer.
Landing hero and OG assets were originally multi-megabyte raw exports. scripts/optimize-assets.mjs uses Sharp to produce public/hero.webp, public/og-image.jpg, and rasterized icons at every required size. Edge cases handled in the script, not the UI.
Shipping design exports as-is confuses handoff with production delivery. Media is a build artifact.
metadataBase set from env (NEXT_PUBLIC_SITE_URL with Vercel fallbacks). OG and Twitter images wired to optimized og-image.jpg. PortfolioSiteCredit component added across landing, shell, deck viewer, and PDF footer pointing to hannahkraulikpagade.com.
Shipping is not only features. It is how the product looks when linked on LinkedIn.
sessionStorage dies with the tab. Analyze, compare, and briefing flows insert rows into financelens_sessions with nanoid slugs and 30-day expires_at. Expired slugs return 410. Graceful degradation: Supabase failure does not block PPTX or PDF download.
The artifact, not the login, is the unit of sharing.
Compare results originally rendered all delta sections as always-visible stacked content. Accordion layout: claim shifts and new language expanded by default because those carry the most analytical signal. All other sections collapsible with summary line and item count in the collapsed header.
The order in which information reveals itself is a product decision.
What shipped
Every layer, production-ready
Input
Text paste. PDF upload (text-layer only via pdf-parse; scanned PDFs require paste). Six sample document pairs including compare mode pairs.
Analysis engine
What they said (plain language). What it actually means (interpretation, hedging removed). Key numbers (values with direction and context). Language drift (hedge/firm tags with quoted phrases). Worth a closer look (evidence-oriented flags). Source anchors (prompt-required, surfaced when present). Toggleable confidence score (0–100 evidence density rubric). Zod plus lib/claudeJsonWithRetry one repair turn on failure.
Compare mode
Two-document delta analysis (diff-aware system prompt). Accordion layout: claim shifts and new language expanded by default. All sections independently collapsible, summary line visible when collapsed. Six built-in sample pairs. 30-day share URL with compare-specific layout.
Output and sharing
Branded PDF via pdf-lib (WSJ Editorial typography). PPTX via pptxgenjs (Calibri, Office-safe). Claude 7-slide deck outline. Unsplash plus Pollinations image pipeline with attribution. Full-screen and scroll deck viewer at /deck/[slug]. 30-day Supabase-backed share URLs, 410 on expiry. /methodology trust and transparency page.
Infrastructure
Next.js 16, React 19, TypeScript. Tailwind CSS v4 (utility base) plus custom .fl-* CSS classes. Claude Sonnet 4 (claude-sonnet-4-20250514) throughout. Zod schema validation. pdf-lib, pptxgenjs (owned presentation layer). scripts/optimize-assets.mjs (Sharp media pipeline). PortfolioSiteCredit component. Supabase (financelens_sessions, 30-day TTL, 410 expiry). Vercel (maxDuration 120s on analyze/compare, 60s on export-pdf).
What this demonstrates
For every audience
Typed JSON contracts and Zod validation with one structured repair turn before failure.
Product-level distinction between a summary and six analytical sections with distinct purposes.
Prompt-required, schema-optional: anchors surface when the model returns them; supportingEvidence is optional in Zod, not a hard gate.
Each pivot has a real constraint, decision, and outcome — Canva through compare accordion.
Order of reveal is a product decision: highest-signal sections open first; collapsed headers stay scannable.
No third-party OAuth required to close analyze-to-shareable-artifact loop; custom deck viewer at 30-day URLs.
Design exports treated as build artifacts via Sharp and optimize-assets, not raw deploys.
Earnings calls, 10-K structure, language drift in investor communications, assistive-only guardrails.
From product definition to live app with 30-day share URLs and correct 404/410 semantics.
The honest summary
Three ways to understand this work
For engineers
For product
For design
The intelligence is in the delta. What changed from last quarter. Where management stopped committing and started hedging. What was disclosed in a footnote for the first time. FinanceLens surfaces the signal that the document format hides.