Skip to content

Latest commit

 

History

History
611 lines (445 loc) · 26.9 KB

File metadata and controls

611 lines (445 loc) · 26.9 KB

Strata — Product Requirements Document

Working Title: Strata | Version: 2.1 | Date: April 2026


High-Level Outline

  1. Vision & Problem Statement
  2. Target Audience
  3. Core Features
  4. Content Pipeline
  5. Technical Architecture
  6. Feature Specs
  7. Subscription Model
  8. Monetization
  9. MVP Scope
  10. 8-Week MVP Launch Roadmap
  11. Risk Assessment
  12. Go-to-Market
  13. Platform Roadmap & Integrations

MVP Launch Strategy — Brothers Karamazov

Why Brothers Karamazov as MVP

Hallow's 2026 Pray40 challenge featured The Brothers Karamazov and exposed 1.6M+ Catholics to the book at a surface level. That creates an immediate opening for Strata to become the deeper guided experience while awareness is still warm.

MVP Positioning

  • Primary MVP book for launch
  • Launch message: "The deeper dive after Pray40"
  • Goal: Prove the pipeline and product loop on one culturally relevant flagship title before broad catalog expansion

Why this title works

  • Public domain — available via Project Gutenberg
  • Dense enough to showcase commentary, abridgment, notes, and quotations
  • Strong overlap with Catholic, homeschool, Great Books, and sleep-listening audiences
  • No high-quality guided podcast or YouTube version currently exists

Launch sequencing

  1. Ship Brothers Karamazov first as the flagship MVP
  2. Use America 250 as the next major content wave (July 4, 2026)
  3. Expand into Catholic Fathers, Stoics, and Scripture after pipeline is proven

1. Vision & Problem Statement

Public domain literature contains some of the most transformative books ever written. Most people never read them because they are long, dense, archaic, and intimidating. Existing audiobook platforms use generic narration, no commentary, and no interactivity. Strata turns the world's greatest public domain books into guided, immersive audio experiences — commentary, abridgment options, contextual atmospheres, and AI-powered Q&A — at a fraction of the cost of licensed content platforms.

The gap: 1.6M people just did Hallow's Pray40 Lent challenge with The Brothers Karamazov as the anchor book. Hallow gave them surface-level reflections. Strata gives them the full guided deep dive.


2. Target Audience

Primary

  • ADHD listeners who want structure and guidance through long books
  • Catholic and Christian readers seeking formation and devotional content
  • Homeschool families using Great Books curricula
  • Intellectual self-improvers who want to finally finish the classics

Secondary

  • Philosophy and history enthusiasts
  • Sleep listeners who use calm long-form audio
  • College students and lifelong learners
  • Anyone who saw a movie adaptation and wants to read the source

3. Core Features

Feature Description
Guided Reading Narrated episodes with embedded commentary every few minutes
Dynamic Abridgment User selects depth: Full, Standard, Essentials, or Highlights Only
Atmospheres AI-generated contextual ambient audio under narration
Multi-Voice Characters Different AI voices per character in dialogue-heavy books
Sleep Mode Slowed narration, extended pauses, sleep timer, resume-from-sleep
Focus Mode Commentary off, pure narration at 1.25x–1.75x speed
Must Read / Most Quoted Tags for landmark passages; filterable
Notes & Highlights Timestamped notes synced to audio positions
AI Chat (Book-Specific) RAG-based Q&A trained on the processed book + commentary
Voice Selection Pro users choose from 10,000+ ElevenLabs voices
Book Requests Pro users submit any public domain book for pipeline processing

4. Content Pipeline

Step-by-Step Process

  1. Ingest — Pull public domain text from Project Gutenberg or Standard Ebooks via URL
  2. Segment — Claude splits text into 3–7 minute audio segments
  3. Analyze & Tag — Claude tags each segment:
    • type: narrative / philosophical / theological / biographical / dialogue
    • scene_mood: battle / nature / sacred / contemplative / melancholy / triumphant / neutral
    • atmosphere_prompt: natural language prompt for ElevenLabs Sound Effects API
    • must_read: boolean
    • most_quoted_passages: array
    • characters: named characters in segment
  4. Generate Commentary — the LLM writes 60–120s commentary per segment from the full episode text, then an automated verification pass checks it references only what's in the transcript; it enters an admin review queue and is served to users only once approved (see §6.4a)
  5. Abridgment Profiles — the LLM generates Full / Standard / Essentials / Highlights versions
  6. Narration Render — ElevenLabs voices the narration and commentary
  7. Multi-Voice — character voices assigned for dialogue segments
  8. Atmosphere Generation — ElevenLabs Sound Effects API generates an ambient clip per segment
  9. Assembly — FFmpeg mixes narration + ambient audio into the final episode
    • Free tier: pre-mixed single file
    • Pro tier: two separate files (narration + atmosphere) for client-side mixing
  10. Metadata & Storage — chapter markers, tags, timestamps, transcripts stored in Postgres; audio written to the object-storage driver (durable, private)
  11. Distribution — YouTube upload, self-hosted podcast RSS (free episodes), in-app streaming, and the public catalog API for Haven

Orchestration is Inngest, not n8n — each step above is a durable, retryable Inngest step with pause/resume/extend and onFailure cleanup.


5. Technical Architecture

This reflects the actual, implemented stack (as of the July 2026 audit and the Tier 0 work that followed). Earlier drafts of this PRD described an n8n / pydub / Supabase-Auth design that was never built; that has been removed.

Layer Stack
App Next.js 14 (App Router), TypeScript, Tailwind CSS, Web Audio API
Auth Custom JWT (jose) + bcrypt. One getProfileFromSession() path keyed on users.id. No third-party auth provider.
Database PostgreSQL via Drizzle ORM (pg pool). shared/schema.ts is the source of truth; Supabase Postgres in production.
Audio storage Storage-agnostic driver (src/lib/storage/): Supabase Storage or Cloudflare R2 in prod (private bucket + signed URLs), local disk in dev. Served only through a tier-checked stream endpoint.
Pipeline orchestration Inngest (per-episode steps, pause/resume/extend/retry, timeouts, onFailure cleanup)
Audio assembly FFmpeg (fluent-ffmpeg) — narration + atmosphere mix, duration probe, video shorts
AI — Segmentation & Commentary Multi-provider LLM (src/lib/pipeline/llm.ts): Anthropic / Gemini (approved for flagship content), Groq / OpenRouter optional
AI — Narration, Voices, SFX ElevenLabs or Microsoft Edge neural voices (free) behind a TTS driver; SFX/atmosphere always ElevenLabs
Commentary trust Full-text grounding + automated verification pass + admin review gate + interpretive disclaimer
AI — Book Chat Grounded Q&A over the processed book text (Pro)
Podcast distribution Self-hosted RSS (Podcast 2.0), gated to free-preview episodes
Public catalog /api/haven/catalog — CORS-friendly JSON for the Haven integration
Video distribution YouTube (short-form)
Payments Stripe (webhook-idempotent; entitlement read from the DB, not the JWT)
Deploy Portable Next.js — Vercel / Netlify with no adapter; Cloudflare Pages via @cloudflare/next-on-pages. CI (typecheck/lint/test) gates every merge.

6. Feature Specs

6.1 Guided Episode Player

  • Chapter-by-chapter navigation
  • Commentary toggle (on/off)
  • 10-second skip forward/back
  • Playback speed: 0.65x – 2x
  • Bookmark any timestamp
  • Chapter completion tracking

6.2 Dynamic Abridgment Engine

Profile Description
Full Complete text, all commentary
Standard Minor cuts to pacing, full commentary
Essentials Core narrative + philosophical moments only
Highlights Only Must Read passages + Most Quoted only

6.3 Voice Selection (Pro)

  • 10,000+ ElevenLabs voices
  • Filter by gender, accent, age, tone
  • Voice preview before committing
  • Saved voice preference per book
  • On-demand render triggered on selection

6.4 Book-Specific AI Chat

  • RAG pipeline over processed text + commentary
  • Grounded responses — no hallucination outside the book
  • Example queries:
    • "What does Alyosha believe vs Ivan?"
    • "Explain the Grand Inquisitor scene"
    • "What does Dostoevsky mean by active love?"
  • Chat history saved per book

6.5 Book Request Queue (Pro)

  • Pro users submit any Gutenberg URL or title
  • Pipeline processes automatically within 48–72 hours
  • User notified on completion
  • Approved books added to public catalog

6.6 Must Read / Most Quoted

  • Claude tags landmark passages at processing time
  • Users can filter episode list to Must Read only
  • Most Quoted passages surfaced in UI with attribution
  • Shareable quote cards (image + audio clip)

6.7 Notes & Highlights

  • Tap to highlight any sentence during playback
  • Voice-to-text or typed annotation
  • Timestamped to audio position
  • Exportable as:
    • Markdown
    • PDF with timestamps
    • Notion / Obsidian import
    • Email digest

6.8 Focus Mode

  • Commentary disabled
  • Speeds: 1.25x / 1.5x / 1.75x
  • Minimal UI — only progress and skip controls
  • Auto-advances through chapters

6.9 Offline Mode (Pro)

  • Download full book or individual chapters
  • Offline playback with full player functionality
  • Sync notes when reconnected

6.10 Progress Sync

  • Cross-device sync via Supabase
  • Resume from exact timestamp on any device
  • Reading streaks and completion badges

6.11 Atmospheres — Contextual Background Audio

Description: AI-generated ambient soundscapes that match the scene or mood of the content being read, mixed under the narration to create an immersive listening experience.

Free / YouTube / Podcast

Pre-mixed single audio file — narration + AI-generated ambient audio baked together at ~15-20% ambient volume during pipeline assembly. Zero extra cost per stream.

Pro — Separate Tracks via Web Audio API

Pro users receive two independent audio streams synchronized via the Web Audio API:

  • Narration track — independent volume slider
  • Atmosphere track — independent volume slider (0 = off, replace, or swap)

Atmosphere presets users can swap to:

  • 🌧️ Rain / Storm
  • 🌊 Ocean / Water
  • 🔥 Fireplace
  • 🌿 Forest / Nature
  • 📻 Brown / White / Pink Noise
  • ✝️ Gregorian Chant (loop)
  • 🎵 Lo-fi / Study Music
  • 🤫 Silence (narration only)

Pipeline Integration

Claude tags each segment with:

scene_mood: [battle / nature / sacred / domestic / melancholy / triumphant / contemplative / neutral]
atmosphere_prompt: "medieval swords clashing, iron armor clanging, distant crowd noise"

ElevenLabs Sound Effects API generates the ambient clip per segment at processing time. pydub mixes it at episode assembly. Pro users receive the narration and ambient as two separate stored files, synced client-side.

Cost: Generated once at processing time per segment — no per-stream cost on either tier.

Differentiator vs. Hallow: Hallow's background music is licensed from a third party and is completely decoupled from content. Strata's atmospheres are contextually matched to the scene, AI-generated, and royalty-free.


6.12 Multi-Voice Characters

Description: For books with dialogue and multiple named characters, ElevenLabs Studio auto-detects characters and assigns a unique voice per character, switching voices per dialogue line.

  • Powered by ElevenLabs Studio API
  • Available as a Pro feature
  • Particularly effective for novels, plays, dialogue-heavy theology
  • Pipeline passes character-tagged text to ElevenLabs Studio

6.13 Sleep Mode

Setting Normal Mode Sleep Mode
Voice User's choice Slowest, warmest available voice
Speed 1x 0.65x – 0.75x
Pauses Normal Extended (2–3x longer between sentences)
Commentary Included Off by default
Screen Normal Black screen, zero UI after 5 seconds
Timer None Sleep timer (15 / 30 / 45 / 60 min) with fade-out
Resume Normal "You fell asleep at 14:22 — resume from here?"

"Where You Fell Asleep" Feature

When the sleep timer ends, Strata bookmarks the exact timestamp. Next session: "You fell asleep around here last night — want to back up 5 minutes?"

Sleep-Optimized Book Tags

  • 😴 Sleep-Rated: Meditations, Confessions, poetry, nature writing, gentle philosophy
  • ⚠️ Not Sleep-Rated: War narratives, dense economics, high-conflict fiction

7. Subscription Model

Tier Price Access
Free $0 First 3 episodes of each book (free preview); YouTube + podcast RSS
Pro $5.99/mo or $39.99/yr Full library, all app features, no ads

The authoritative price is whatever STRIPE_PRO_PRICE_ID points to in the Stripe configuration; the figures above are the product target. The free/paid boundary is enforced server-side by the audio stream endpoint (the first FREE_PREVIEW_COUNT = 3 episodes of a book are free), and entitlement is read from the database, not the JWT, so upgrades take effect immediately.


7A. Subscription Model — Tenderfoot TV Pattern

Description: Free listeners get one episode per week on the public feed. Subscribers get the full library on-demand immediately.

Pro Conversion Triggers:

  • User wants to binge past the weekly episode
  • User wants voice selection, abridgment, notes, exports
  • User submits a book for processing
  • User wants Atmospheres track control

8. Monetization

Stream Description
Pro Subscriptions $5.99/mo or $39.99/yr
YouTube AdSense Free public episode feed generates ad revenue
Podcast Sponsorships Aligned sponsors (Catholic media, education, self-improvement)
Book Request Processing Optional one-time fee for priority book processing
Voice Pack Bundles Curated premium voice packs
Future: Licensing License pipeline to publishers, seminaries, homeschool programs

9. MVP Scope

In Scope for MVP (Brothers Karamazov)

  • Full automated content pipeline (ingest URL → segment → tag → commentary → render → assemble)
  • Basic episode player with commentary toggle
  • 3 ElevenLabs voice options
  • Pre-mixed atmosphere audio (Free)
  • Dual-track atmosphere control (Pro)
  • Sleep Mode
  • YouTube channel + podcast RSS live
  • Freemium subscription (Stripe)

Out of Scope for MVP

  • Book Request Queue (user-facing pipeline UI — Phase 2)
  • Voice clone
  • Notion/Obsidian export
  • Bible / New Testament series
  • Full social/community features

10. 8-Week MVP Launch Roadmap

Core Philosophy: Build the Pipeline First

The pipeline IS the product. Rather than manually ingesting Brothers Karamazov once, the first 4 hours of work should build the automated pipeline that processes any Gutenberg URL end-to-end. This investment pays off immediately — processing one book manually takes the same time as building the automation that processes every future book in minutes.

This pipeline also becomes the user-facing Book Request feature in Phase 2: Pro users paste a Gutenberg URL, the pipeline runs automatically, and the processed book appears in the catalog within 48–72 hours. The internal tool IS the future product feature.

Week 1 pipeline target: Paste https://gutenberg.org/ebooks/28054 → fully assembled episodes with narration + commentary + atmospheres → ready for player.

Week Focus Deliverables
1 Pipeline Gutenberg ingest → Claude segment + tag + commentary → ElevenLabs render → pydub assembly. End-to-end automated for any URL.
2 Render & Polish Multi-voice characters, atmosphere tracks, dual-file output (pre-mixed free + separate Pro tracks)
3 Player & App Basic Next.js player, dual-track audio, Sleep Mode, commentary toggle
4 Launch YouTube channel live, podcast RSS live, Stripe subscription
5 Polish Voice selection, notes/highlights, abridgment toggle
6 Engagement AI Chat (book-specific RAG), Must Read tags, shareable quote cards
7 Expansion Run America 250 pipeline (Common Sense, Federalist Papers)
8 Growth TikTok AI scenes campaign, podcast guesting, community outreach

11. Risk Assessment

Risk Mitigation
AI voice quality ElevenLabs multi-voice, user voice choice, Sleep Mode optimization
ChatGPT competition Trained-on-book RAG outperforms generic chat; UX is passive listening not active chat
Free tier too generous Tenderfoot model: free = 1/week, Pro = full library now
8-week timeline Pipeline first, ruthlessly cut scope, Brothers Karamazov only for MVP
Copyright Public domain only; ElevenLabs output is royalty-free
Theological accuracy Review layer before NT release; commentary flagged as interpretive

12. Go-to-Market

Channel Strategy

  • YouTube first: Channel as top-of-funnel; each video is a free episode pointing to the app
  • Podcast: Auto-distribute via Transistor.fm to Spotify, Apple Podcasts, Amazon Music
  • Catholic / Christian communities: Hallow audience, Catholic Reddit, RCIA groups
  • Homeschool community: Co-ops, Facebook groups, curriculum forums
  • ADHD community: Reddit, newsletters, influencer partnerships

12A. Content Strategy

Strategic Principle

Strata should not launch with a random library. Initial catalog should be built around cultural moments that already have search demand, press momentum, and community energy.

America 250 Launch Anchor (July 4, 2026)

Title Priority
Common Sense — Thomas Paine Tier 1
Federalist Papers — Hamilton, Madison, Jay Tier 1
Declaration of Independence + Constitution Tier 1
Democracy in America — Tocqueville Tier 1
The Wealth of Nations — Adam Smith Tier 2
Poor Richard's Almanack — Franklin Tier 2
Founders' Letters Tier 2
Two Treatises of Government — Locke Tier 3

Gen Z Catholic Renaissance

Category Works
Church Fathers Confessions, City of God, On the Incarnation, Justin Martyr, Tertullian
Medieval Doctors Summa Theologica selections, Proslogion
Mystics Imitation of Christ, Interior Castle, Dark Night of the Soul, Story of a Soul
Apologists Orthodoxy, The Everlasting Man, Newman works
Saints' Lives Butler's Lives of the Saints

Film Adaptation SEO Wave (2026)

  • The Odyssey (Christopher Nolan, Zendaya, Tom Holland)
  • The Count of Monte Cristo
  • Pride and Prejudice
  • Lord of the Flies
  • The Aeneid

Recommended Sequencing

  1. Brothers Karamazov (MVP — immediate launch, Hallow momentum)
  2. America 250 series (July 4, 2026)
  3. Catholic Fathers and Mystics (sustained niche growth)
  4. Stoics and Great Books (evergreen expansion)

12B. Q2 Launch Calendar

Week Theme Primary Release
Week 1 Founding Primer Common Sense — Thomas Paine
Week 2 Founding Documents Declaration of Independence + Constitution
Week 3 Federalist Start Federalist Papers Part 1
Week 4 Founding Letters Selected Founders' Letters
Week 5 American Character Democracy in America Part 1
Week 6 Economic Foundation The Wealth of Nations Part 1
Week 7 Federalist Continuation Federalist Papers Part 2
Week 8 Civic Finish Poor Richard's Almanack
Week 9 Catholic Launch 1 Confessions Part 1
Week 10 Catholic Launch 2 On the Incarnation
Week 11 Stoic Reset Meditations Part 1
Week 12 Prestige Close The Republic Part 1

12C. Production Evolution Path

Tier Description Use Case
Tier 1 — AI Launch Edition AI narration, AI commentary, AI atmospheres, pre-mixed Default launch version
Tier 2 — Enhanced AI Edition Better voice selection, separate tracks, more polish Pro users and recurring titles
Tier 3 — Human Read Edition Community-sourced or commissioned human narration Top-performing books, prestige releases

12D. Viral TikTok / Reels Strategy

Objective: Generate high-quality AI movie scenes from classic books to drive awareness and app downloads.

Format Example Tools
30-sec scene recreation "Grand Inquisitor scene from Brothers Karamazov" Luma Dream Machine + ElevenLabs
Quote + visual Chesterton quote with cinematic background Runway + text overlay
"What if" adaptation "Federalist Papers as a modern movie trailer" Higgsfield AI + cinematic style
Sleep Mode teaser "Augustine's Confessions with Gregorian chant" Lo-fi aesthetic + ambient sound

Legal risk: Extremely low. Public domain source material + AI-generated output = no copyright exposure.

Production flow:

  1. Claude generates scene description from book passage
  2. Luma Dream Machine / Runway generates cinematic clip
  3. ElevenLabs voices the narration / dialogue
  4. CapCut / Premiere Rush adds text, music, CTA
  5. Post to TikTok, Reels, YouTube Shorts simultaneously

12E. New Testament Series — Background Build

Cadence: 1 book per month or every other month for theological review.

Priority Book Rationale
1 Gospel of Mark Shortest, most accessible
2 Gospel of John Theological depth
3 Acts Narrative momentum
4 Romans Foundational theology
5 1 Corinthians Practical application
6+ Epistles Group by theme

Timeline: Background build starting immediately, first releases Q4 2026 or Q1 2027.


12F. Legal Risk Assessment — AI Video Content

Risk Likelihood Mitigation
Copyright infringement None Source material is public domain
AI output copyright None AI-generated works not copyrightable (SCOTUS 2026)
Trademark Very low Use scene descriptions, not trademarked names
Platform TOS violations Low Luma/Runway allow commercial use
YouTube Content ID Very low Public domain source = no Content ID match

13. Platform Roadmap & Integrations

13A. Pipeline-First Build Philosophy

The single most important architectural decision in Strata's build is this: the internal book processing pipeline should be built as a real application from day one, not as a one-time manual script.

Why this matters:

The temptation is to manually process Brothers Karamazov — copy the text, paste it into Claude, manually run ElevenLabs, manually stitch audio files. This takes ~4 hours and produces one book.

The smarter investment is to spend those same 4 hours building the automated pipeline (n8n + Claude + ElevenLabs + pydub + Supabase), then paste in the Gutenberg URL and let it run. The pipeline processes Brothers Karamazov automatically AND every future book automatically. The pipeline gets debugged on a real book with real edge cases.

This pipeline becomes the user-facing product: In Phase 2, when Pro users submit a book request, this is the exact same pipeline that runs — it just gets triggered by a user form submission instead of an internal admin action. The internal tool IS the future feature.

Week 1 target: gutenberg.org/ebooks/28054 in → fully assembled, tagged, narrated, atmosphere-mixed episodes out.


13B. Content Curator Integration

What is Content Curator?

Content Curator (see: github.com/bitskc/content-curator) is a companion product that monitors YouTube channels, podcast RSS feeds, and blogs — automatically surfacing content that a user's audience should know about and formatting it for social posting. It is an intelligent feed monitor + social publishing assistant, not a manual snipping tool.

Strata and Content Curator share the same core pipeline architecture:

Pipeline Step Strata Content Curator
Ingest source Gutenberg URL YouTube / Podcast RSS URL
Pull text Book text Transcript via Whisper / RSS
Segment content Claude splits into chapters Claude splits into episode chunks
AI analysis Tag mood, themes, must-read Score shareability, match to audience
AI output Commentary + atmosphere prompts Social captions + platform formatting
Storage Supabase Supabase
Distribution YouTube + podcast + app Social media queue

Approximately 70% of Strata's pipeline code is directly reusable for Content Curator. The Claude prompts, n8n workflow structure, Supabase schema patterns, and ElevenLabs integrations are all shared or near-identical.

Strata feeds Content Curator directly:

Strata publishes a weekly podcast and YouTube series. A Content Curator user who follows philosophy, theology, or Catholic content would add Strata's RSS as a monitored source. CC automatically surfaces the most shareable quotes from each Strata episode and formats them for LinkedIn or X. Strata generates high-quality source material that Content Curator's pipeline then processes — the two products are naturally complementary.

Build sequencing recommendation:

Phase Product Rationale
Phase 1 (Now) Strata MVP Public domain moat, no legal risk, builds the pipeline
Phase 2 (Month 3–6) Strata catalog expansion Prove pipeline on 10+ books, grow audience
Phase 3 (Month 6–9) Content Curator MVP Reuse ~70% of Strata pipeline, add social scheduling layer
Phase 4 (Month 9+) Shared platform layer Unified auth, shared subscription, Strata as CC source

Content Curator is Strata's B2B counterpart:

  • Strata = B2C consumer product ($5.99/mo), high volume
  • Content Curator = B2B prosumer product ($29–59/mo), lower volume, higher LTV

Building Strata first subsidizes Content Curator's development. By the time CC is ready to build, the hardest infrastructure work is already paid for.


Brothers Karamazov — Immediate Launch Opportunity

Market Context: Hallow's 2026 Lent Pray40 challenge (1.6M+ participants) featured The Brothers Karamazov as its anchor book. Hallow provided surface-level treatment. Strata delivers the full guided deep dive.

Public Domain Status: Fully public domain in the U.S. (1879-1880). Available via Project Gutenberg.

Launch Recommendation:

  • Position: "The deeper dive Hallow participants are looking for"
  • Abridgment profile: "Theological Core" — Alyosha / Ivan / Grand Inquisitor focus
  • Atmosphere: Cathedral reverb, contemplative piano, soft Gregorian chant
  • Must Read flags: Grand Inquisitor chapter, Alyosha's key conversations

Strata PRD v2.1 — April 2026