01 /

Research & Corpus Infrastructure

voyage-aivoyage-3-large · 1024-dim + rerank-2
// Vector search across 727 deep-research docs, 21,222 chunks
sqlite-stackSQLite + sqlite-vec (KNN vec0) + FTS5 (BM25)
// Local hybrid retrieval — zero cloud dependency
rrf-fusionk=60
// Reciprocal rank fusion merging vector and keyword results
claude-sonnet-4-6Agentic tool-use loop
// Quote synthesis and chapter drafting
verbatim-verifiersubstring match · load-bearing trust mechanism
// Every quoted passage normalized and matched before publication
02 /

Build Pipeline

1
TypeScript / tsx
Static HTML builder using unified / remark / rehype pipeline
book/build.ts → book/dist/*.html
2
Custom Markdown Preprocessor
Image tags and link syntax resolved at build time before the remark pipeline runs
<file.png> → <figure><img>
3
Conditional Media Rendering
Audio player bar auto-appears only when MP3 exists. YouTube embed only when file is present. Zero broken states.
03 /

Audio Narration Engine

Kokoro TTS
Apache 2.0 · 82M params

Local CPU inference. No API key. No recurring cost. Model weights download once (~330MB).

Voice Profile
bm_george @ 0.94× speed

British male, measured editorial register. Closest open-source analogue to New Yorker audio narration.

Audio Pipeline
espeak-ng + pydub + soundfile

Phonemizer backend, WAV→MP3, chapter stitching with 3.5s silence, NumPy I/O at 24kHz native.

NotebookLM
Google · 9-minute overview

AI-hosted audio explainer embedded on the TOC. Two AI hosts walk the full arc of the book.

04 /

Deployment

Vercel Pro
Static file serving from public/book/ and public/audio/ — ~190MB of HTML and MP3 assets committed to git and served from CDN edge.
Next.js 15
contextjamming.com site shell. PromoBar client component with localStorage dismiss, two CTAs, audiobook download link. Sitewide ISR with 30-minute AI Wire ticker revalidation.
Git
Single branch deployment. All assets including MP3s tracked in version control. Rebuild is deterministic: change a chapter, run the build script, copy dist, commit, push.
05 /

Interactive (Claude Code Generated)

Per-chapter Related Media slide-over drawer — vanilla JS, no framework, 360px panel with YouTube thumbnails pulled live from img.youtube.com
Share bar — X, LinkedIn, Copy Link with clipboard API and "Copied!" feedback, copper accent palette
Audio player — play/pause, copper progress scrubber, elapsed time counter, auto-hides if no MP3 exists for that chapter
CHAPTER_VIDEOS + CHAPTER_PRESS maps — per-chapter media registry in build.ts; adding new links is a one-liner
Sitewide promo banner — 160px chalkboard bar, two CTA buttons, audiobook download, localStorage dismiss with version key for re-showing updated designs
Photo picker — local HTML tool serving 53 archival images from the CDN, click-to-copy <filename> tags for inline markup