Case Study · Design & Development

MemoirQuill

An AI memoir platform that turns recorded family conversations into provenance-traced chapters. Every sentence traceable to the moment it was spoken.

Site
memoirquill.com ↗
Status
Live · Early Access
Disciplines
Product design · Full-stack development · AI/LLM integration · Systems architecture
Stack
Next.js 16 · TypeScript · PostgreSQL / pgvector · Prisma · pg-boss · OpenRouter · Stripe · Vercel / Supabase / Lightsail
8NLP pipeline stages
100%Provenance-traced prose
28Prisma schema models
3-tierDeployment split

The problem

Adult children have one window to capture a parent's life story. Phone calls happen, visits happen, and then suddenly they don't. The recordings that do get made sit in cloud storage: too long, too digressive, too emotionally loaded for anyone to turn into something readable.

AI can transcribe and summarize, but that's not the problem. The problem is trust. A memoir ghostwritten by an AI with no source trail isn't a memoir. It's a plausible-sounding document that happens to use grandma's name. A platform handling irreplaceable material has to prove every sentence came from something real.

What was built

A full-stack SaaS with an 8-stage NLP pipeline that processes recorded conversation transcripts into provenance-traced memoir chapters. The pipeline handles entity extraction, chapter mapping, retelling detection across sessions, contradiction flagging, prose drafting, and a review queue. All stages are resumable and idempotent. Every published passage resolves to specific turn indices in the raw transcript; untraceable prose is a defect, not a policy.

The system runs across three deployment targets: a Next.js 16 app on Vercel for the family portal and API routes, Supabase (PostgreSQL + pgvector) for the structured life graph and embeddings, and an AWS Lightsail worker running pg-boss for the pipeline queue. Payments run through Stripe, auth through NextAuth v5, and LLM calls route through OpenRouter with per-stage model selection.

How it's built

Every sentence traces back to a spoken moment.

Provenance is the invariant the whole system is built around. If a passage can't be anchored to a specific recording turn, it doesn't ship.

8-Stage NLP Pipeline

Transcript → normalization → entity extraction → chapter mapping → structured cleaning → retelling detection → contradiction detection → prose drafting → review flagging. Resumable: re-running skips succeeded stages.

Passage Provenance Anchoring

Every published passage maps to one or more turn indices in the raw transcript: exact session, exact turn. Enforced as a schema invariant: a passage with no provenance is a defect, not a gap.

Immutable Source + Versioned Corrections

The raw transcript is frozen at import and never modified. Corrections create new versioned rows linked by a supersedesId chain; the full audit trail stays intact.

Per-Stage LLM Routing

Heavy stages (prose drafting, contradiction detection, quality evaluation) run on Claude Sonnet via OpenRouter. Lighter stages use GPT-4o-mini. Overrides are configurable per stage without code changes, with cost and latency tracked per run.

Semantic Retelling Detection

Fragments compared across sessions using 1536-dim pgvector embeddings, with Jaccard similarity as a fallback when the embedding pool is sparse. Repeated stories are surfaced for review rather than silently merged or dropped.

Consent Gate + Deletion Audit

All capture and processing route through a single guard checking both GDPR-aligned data-flow consent and subscription status. Hard deletes cascade fully; the only artifact allowed to survive is a DeletionAudit record proving what was destroyed.

Next.js 16 · React 19 · TypeScript · PostgreSQL / pgvector · Prisma · pg-boss · OpenRouter · Claude API · Stripe · NextAuth v5 · Vercel · Supabase · AWS Lightsail.

What this shows

Built for families who can't afford to trust the wrong system.

The real constraint wasn't the NLP pipeline or the multi-stage AI integration (those are engineering problems with clear shape). It was designing a system where families can genuinely trust what they're reading. That trust has two parts.

The first is provenance: every sentence in a MemoirQuill chapter traces back to a specific moment in a recording, enforced as a schema invariant, not a documentation promise. The second is deletion: when a data subject requests their records removed, the system must be able to prove it happened, which means hard deletes with audit trail records rather than soft-delete flags or retention-mapped backups.

Both constraints shaped architecture decisions from the schema outward: the frozen raw source payload, the turn-index anchoring on every passage, the single consent gate, the DeletionAudit model. A product handling irreplaceable family material earns trust through design choices, not privacy policies.

Ω

Building something that handles sensitive material?

Data integrity, provenance design, and AI pipelines built to earn trust, from architecture through production.