OpportunitiesEntities
Docs
    Ring Platform

    Decentralized Self-building Future

    Sign In
    Entities
    Opportunities
    Store
    Docs
    Platform Concepts
    RING EconomySonoratek LLCGlobal ImpactAI Meets Web3
    Get Started
    Quick StartCalculatorRoadmap
    Privacy|Contact
    v1.104.17|Sonoratek LLC

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)

    Documentation

    Concepts, value, and typical clone scenarios — less code.

    Welcome to Ring
    Quick Reference
    Getting Started
    Prerequisites
    Installation
    First Success Validation
    Next Steps
    Features
    Multi-Vendor Store
    Inventory & Stock
    Vendor Management
    Commissions & Settlements
    SubscriptionConductor
    PaymentConductor
    Ring Oracle
    Payments Overview
    Public Pools & DAO Jars
    WayForPay Payment Integration
    Wallet & Credit System
    WalletConductor
    Affiliate & Referral Enablement
    Referral Codes (Refcodes)
    NFT Exhibition Marketplace
    Solana NFT Gates
    Token Staking System
    Owner Project Lab
    Entities
    Opportunities
    Real-Time Messaging
    Ring Tasks
    WebRTC Calls & STUNner TURN
    Peer Games
    News Module
    Member Blogs
    Public Profile Pages
    Profile Account Widgets
    Ring File Cabinet
    Username Reservation System
    Scientific Editor
    Notifications
    Push Notifications with FCM (Ring-Powered)
    Email AI-CRM
    Ring Mailer & RingdomX Mail
    Tunnel Protocol
    VideoConductor
    MediaConductor
    Generative Gallery
    Authentication
    Security & Compliance
    Admin console
    Admin Wiki
    Manage via Telegram
    Locale System
    Mobile Experience
    Performance Optimization Patterns
    Examples
    Quick Start
    Basic Setup
    White Label
    Custom Branding
    Web3 Integration
    Real World
    Advanced Features
    Customization
    Quick Start — Your First Ring Clone
    Customization Guide
    Vertical Presets (SSOT)
    Ringization playbook
    Branding
    Themes
    Features
    Localization
    Token Economics Setup
    Payment Gateway Integration
    Reference Ring deployments
    Project configuration
    Public environment variables
    Order Lab secrets
    WalletConnect Project ID (Reown Cloud)
    Supported services
    NODUS wiki (project knowledge)
    Configuration playbook
    Web3
    Token launch jurisdictions
    Wallet
    Wallet Security Tips
    Integrations
    Ethereum wallets (Wagmi v3)
    RingFileBase (object storage API)
    Ring CDN (RingFileBase edge)
    Deployment
    Self-hosted deployment
    Vercel Deployment
    Docker
    Environment Configuration
    Monitoring & Analytics
    Performance Optimization
    Backup & Recovery
    Architecture
    Data Model
    Security
    Real Time
    Discovery Mutation Sync
    PaymentConductor architecture
    WalletConductor architecture
    Backend Services
    Firebase Integration
    Development
    Ring MCP Server

    Quick entry (CTOs · auditors · agents)

    Welcome — mission & audiences
    Quick Reference
    Getting started
    Architecture & Auth.js
    Backend modes & databases (DB_BACKEND_MODE)
    Self-hosted
    Ring MCP Tools
    Ring MCP Server
    Token economics
    Token launch jurisdictions
    Deploy (Docker · k8s)
    Security & compliance reads
    ringdom.org — LegioX homebase
    Source — MIT license (GitHub)
    Ring Logo

    Loading documentation...

    Preparing Ring content

    Ring Logo

    Loading documentation...

    Preparing Ring content

    Ring Logo

    Loading documentation...

    Preparing Ring content

    MediaConductor

    MediaConductor is Ring Platform's domain facade for multi-step media generation. It does not reimplement providers — it compiles prompts and delegates to VideoConductor, ImageConductor, AudioConductor, and TextConductor. Its most visible surface is docs article media: every docs page can offer Audible (radio-host narration → TTS), Visual (optional member+ walkthrough video), and Agent (minimized NODUS at /docs/.../nodus.json, indexed from /llms.txt).

    Use Founder / Developer tabs in the docs sidebar to filter this page. Founders see the article-header buttons and cost controls; developers see enrichment modules, SHA cache contracts, after() background work, and verified routes.

    What it powers

    SurfaceEntryOutput
    Docs AudibleHeader Audible → generateDocNarration → ensureTtsAudioRadio-host audible-text → TTS (tts-audio), public, SHA-cached
    Docs VisualHeader Visual → generateDocWalkthroughSummary TTS + optional draft video (video = member+)
    Docs AgentHeader Create / Agent → ensureLlmTextMinimized docs_article NODUS (llm-text) + clipboard
    Agent index/llms.txtMarkdown index linking each article's /nodus.json
    Background enrichRSC after(ensureDocsArticleEnrichmentBackground)Audible + Agent warmed on first article load when missing
    Scripted mediaMediaConductor.generateScript / generateClipPer-clip video from a ScriptedVideoGenerationRequest

    Why this matters for your clone

    • Docs that talk — the article header Audible button plays a warm radio-host script (cold open, gist, pitfalls, next step) — not a robotic dump of every heading and table. Expand Show transcript beside the player when you want the spoken text.
    • Pay once, reuse forever — first generation stores audible-text + MP3 keyed by a full content SHA-256. Later visits reuse the file. Editing the MDX changes the SHA, so narration regenerates (with an align pass that weaves new facts into the prior script).
    • Ready while you read — on first open, the server schedules background enrichment. Buttons show Generating… and the client polls every 2s until Audible and Agent are ready.
    • Agent-friendly — /llms.txt lists docs; each page exposes /nodus.json. The Create button builds the payload once; Agent (+ copy) copies JSON or the absolute NODUS URL when ready.
    • Cost-controlled Visual — Audible is public; Visual video requires a signed-in member+ role so heavy video spend stays bounded.
    • One media brain — the same conductor drives scripted marketing clips and docs walkthroughs via your configured image / video / audio / text providers.

    Wallet

    Member roles that unlock Visual video walkthroughs.

    Architecture

    lib/media/conductor/media-conductor.ts exports the MediaConductor object. Docs Audible / Agent prefer the enrichment SSOT in lib/docs/docs-article-enrichment.ts (TextConductor radio-host → AudioConductor TTS → Filebase). Walkthrough Visual still goes through MediaConductor.generateDocWalkthrough and mirrors into generated_docs_media.

    Modules

    ModulePathRole
    MediaConductorlib/media/conductor/media-conductor.tsgenerateClip, generateScript, generateDocWalkthrough
    Docs enrichment SSOTlib/docs/docs-article-enrichment.tsensureAudibleText, ensureTtsAudio, ensureLlmText, getDocsArticleMediaStatus, ensureDocsArticleEnrichmentBackground
    Docs media actionsapp/_actions/docs-media.tsgetDocMediaStatus, ensureDocMediaBackground, , ,

    Related documentation

    Related documentation

    Doc System

    Prerequisite: MDX docs chrome and audience-curated sidebar that host the Audible / Visual / Agent header.

    VideoConductor

    Depends-on: VideoConductor is the draft walkthrough engine MediaConductor calls for Visual.

    Generative Gallery

    See-also: Generative Gallery Upload \| Generate — sibling media surface, not docs walkthrough.

    News Module

    Same-workflow: NewsConductor enriches news articles with TTS and images using the same conductor family.

    MediaConductor

    MediaConductor is Ring Platform's domain facade for multi-step media generation. It does not reimplement providers — it compiles prompts and delegates to VideoConductor, ImageConductor, AudioConductor, and TextConductor. Its most visible surface is docs article media: every docs page can offer Audible (radio-host narration → TTS), Visual (optional member+ walkthrough video), and Agent (minimized NODUS at /docs/.../nodus.json, indexed from /llms.txt).

    Use Founder / Developer tabs in the docs sidebar to filter this page. Founders see the article-header buttons and cost controls; developers see enrichment modules, SHA cache contracts, after() background work, and verified routes.

    What it powers

    SurfaceEntryOutput
    Docs AudibleHeader Audible → generateDocNarration → ensureTtsAudioRadio-host audible-text → TTS (tts-audio), public, SHA-cached
    Docs VisualHeader Visual → generateDocWalkthroughSummary TTS + optional draft video (video = member+)
    Docs AgentHeader Create / Agent → ensureLlmTextMinimized docs_article NODUS (llm-text) + clipboard
    Agent index/llms.txtMarkdown index linking each article's /nodus.json
    Background enrichRSC after(ensureDocsArticleEnrichmentBackground)Audible + Agent warmed on first article load when missing
    Scripted mediaMediaConductor.generateScript / generateClipPer-clip video from a ScriptedVideoGenerationRequest

    Why this matters for your clone

    • Docs that talk — the article header Audible button plays a warm radio-host script (cold open, gist, pitfalls, next step) — not a robotic dump of every heading and table. Expand Show transcript beside the player when you want the spoken text.
    • Pay once, reuse forever — first generation stores audible-text + MP3 keyed by a full content SHA-256. Later visits reuse the file. Editing the MDX changes the SHA, so narration regenerates (with an align pass that weaves new facts into the prior script).
    • Ready while you read — on first open, the server schedules background enrichment. Buttons show Generating… and the client polls every 2s until Audible and Agent are ready.
    • Agent-friendly — /llms.txt lists docs; each page exposes /nodus.json. The Create button builds the payload once; Agent (+ copy) copies JSON or the absolute NODUS URL when ready.
    • Cost-controlled Visual — Audible is public; Visual video requires a signed-in member+ role so heavy video spend stays bounded.
    • One media brain — the same conductor drives scripted marketing clips and docs walkthroughs via your configured image / video / audio / text providers.

    Wallet

    Member roles that unlock Visual video walkthroughs.

    Architecture

    lib/media/conductor/media-conductor.ts exports the MediaConductor object. Docs Audible / Agent prefer the enrichment SSOT in lib/docs/docs-article-enrichment.ts (TextConductor radio-host → AudioConductor TTS → Filebase). Walkthrough Visual still goes through MediaConductor.generateDocWalkthrough and mirrors into generated_docs_media.

    Modules

    ModulePathRole
    MediaConductorlib/media/conductor/media-conductor.tsgenerateClip, generateScript, generateDocWalkthrough
    Docs enrichment SSOTlib/docs/docs-article-enrichment.tsensureAudibleText, ensureTtsAudio, ensureLlmText, getDocsArticleMediaStatus, ensureDocsArticleEnrichmentBackground
    Docs media actionsapp/_actions/docs-media.tsgetDocMediaStatus, ensureDocMediaBackground, , ,

    Related documentation

    Related documentation

    Doc System

    Prerequisite: MDX docs chrome and audience-curated sidebar that host the Audible / Visual / Agent header.

    VideoConductor

    Depends-on: VideoConductor is the draft walkthrough engine MediaConductor calls for Visual.

    Generative Gallery

    See-also: Generative Gallery Upload \| Generate — sibling media surface, not docs walkthrough.

    News Module

    Same-workflow: NewsConductor enriches news articles with TTS and images using the same conductor family.

    MediaConductor

    MediaConductor is Ring Platform's domain facade for multi-step media generation. It does not reimplement providers — it compiles prompts and delegates to VideoConductor, ImageConductor, AudioConductor, and TextConductor. Its most visible surface is docs article media: every docs page can offer Audible (radio-host narration → TTS), Visual (optional member+ walkthrough video), and Agent (minimized NODUS at /docs/.../nodus.json, indexed from /llms.txt).

    Use Founder / Developer tabs in the docs sidebar to filter this page. Founders see the article-header buttons and cost controls; developers see enrichment modules, SHA cache contracts, after() background work, and verified routes.

    What it powers

    SurfaceEntryOutput
    Docs AudibleHeader Audible → generateDocNarration → ensureTtsAudioRadio-host audible-text → TTS (tts-audio), public, SHA-cached
    Docs VisualHeader Visual → generateDocWalkthroughSummary TTS + optional draft video (video = member+)
    Docs AgentHeader Create / Agent → ensureLlmTextMinimized docs_article NODUS (llm-text) + clipboard
    Agent index/llms.txtMarkdown index linking each article's /nodus.json
    Background enrichRSC after(ensureDocsArticleEnrichmentBackground)Audible + Agent warmed on first article load when missing
    Scripted mediaMediaConductor.generateScript / generateClipPer-clip video from a ScriptedVideoGenerationRequest

    Why this matters for your clone

    • Docs that talk — the article header Audible button plays a warm radio-host script (cold open, gist, pitfalls, next step) — not a robotic dump of every heading and table. Expand Show transcript beside the player when you want the spoken text.
    • Pay once, reuse forever — first generation stores audible-text + MP3 keyed by a full content SHA-256. Later visits reuse the file. Editing the MDX changes the SHA, so narration regenerates (with an align pass that weaves new facts into the prior script).
    • Ready while you read — on first open, the server schedules background enrichment. Buttons show Generating… and the client polls every 2s until Audible and Agent are ready.
    • Agent-friendly — /llms.txt lists docs; each page exposes /nodus.json. The Create button builds the payload once; Agent (+ copy) copies JSON or the absolute NODUS URL when ready.
    • Cost-controlled Visual — Audible is public; Visual video requires a signed-in member+ role so heavy video spend stays bounded.
    • One media brain — the same conductor drives scripted marketing clips and docs walkthroughs via your configured image / video / audio / text providers.

    Wallet

    Member roles that unlock Visual video walkthroughs.

    Architecture

    lib/media/conductor/media-conductor.ts exports the MediaConductor object. Docs Audible / Agent prefer the enrichment SSOT in lib/docs/docs-article-enrichment.ts (TextConductor radio-host → AudioConductor TTS → Filebase). Walkthrough Visual still goes through MediaConductor.generateDocWalkthrough and mirrors into generated_docs_media.

    Modules

    ModulePathRole
    MediaConductorlib/media/conductor/media-conductor.tsgenerateClip, generateScript, generateDocWalkthrough
    Docs enrichment SSOTlib/docs/docs-article-enrichment.tsensureAudibleText, ensureTtsAudio, ensureLlmText, getDocsArticleMediaStatus, ensureDocsArticleEnrichmentBackground
    Docs media actionsapp/_actions/docs-media.tsgetDocMediaStatus, ensureDocMediaBackground, , ,

    Related documentation

    Related documentation

    Doc System

    Prerequisite: MDX docs chrome and audience-curated sidebar that host the Audible / Visual / Agent header.

    VideoConductor

    Depends-on: VideoConductor is the draft walkthrough engine MediaConductor calls for Visual.

    Generative Gallery

    See-also: Generative Gallery Upload \| Generate — sibling media surface, not docs walkthrough.

    News Module

    Same-workflow: NewsConductor enriches news articles with TTS and images using the same conductor family.

    VideoConductor

    The scripted-video engine MediaConductor delegates to.

    News

    NewsConductor — sibling facade for article media enrichment.

    Look at the top-right of any docs article: Audible · Visual · Create / Agent. If you just opened a page for the first time, wait for Generating… to finish — Play will then hit the cache.

    generateDocNarration
    createOrGetDocAgentNodus
    generateDocWalkthrough
    Article chromecomponents/docs/docs-article-shell.tsxLoads status; after() schedules background enrich when shouldEnrich
    Header buttonscomponents/docs/docs-article-media-actions.tsxAudible / Visual / Agent UI; 2s poll while generating
    Legacy URL mirrorlib/docs/docs-media-cache.tsgenerated_docs_media rows (short hash mirror for walkthrough / narration URLs)
    Agent NODUS APIapp/api/docs/nodus/[locale]/[[...slug]]/route.tsPublic JSON via next.config.mjs rewrites
    LLM indexapp/llms.txt/route.ts/llms.txt curated Markdown index
    Schemadata/migrations/045_docs_media_and_enrichment.sqlgenerated_docs_media + docs_article_enrichment (applied local + prod)
    Delegateslib/video, lib/images, lib/audio, lib/textVideo / Image / Audio / Text conductors

    Docs media flow

    Audible enrichment + after() background

    SHA-256 cache contract

    • Collections: docs_article_enrichment (audible-text / tts-audio / llm-text + history) and generated_docs_media (URL mirror for narration/walkthrough) via db() — registered in BackendSelector + PostgreSQLAdapter.
    • Content SHA: hashArticleContentSha256(locale, slug, plain) = full sha256(\$:$:$`). Ready state requires contentSha256match on enrichment +ttsAudio.contentSha256`.
    • Row id: docs-enrich-{locale}-{sha256(slug).slice(0,24)} (stable per locale/slug; content SHA lives in the document body).
    • TTS objectKey: {AUDIO_STORAGE_PREFIX||generated/audio}/docs/{fullSha256}.mp3 — reuse only when URL, objectKey, and SHA all match; otherwise regenerate.
    • SHA change: prior ttsAudio / audibleText / llmText pushed to history.audibles / history.llmTexts with status: 'invalidated'. New audible uses TextConductor TASK_MODE: ALIGN_EXISTING_AUDIBLE when a prior script exists.
    • Agent path: ensureLlmText builds minimized NODUS (object_type: docs_article, source_content_hash). Public URLs: /docs/<slug>/nodus.json and /:locale/docs/.../nodus.json → rewrite → API route.
    • Index: GET /llms.txt lists absolute /nodus.json links (DEFAULT_LOCALE scan).

    Article header UX (verified)

    ControlMissingGeneratingReady
    AudibleTriggers generateDocNarrationSpinner labelPlays [data-docs-audible-player]; optional show/hide transcript
    VisualgenerateDocWalkthrough({ enableVideo: true })SpinnerShows video when returned; member+ gated
    AgentLabel Create (agentCreate) → createOrGetDocAgentNodus then clipboardSpinnerLabel Agent + copy icon — copies NODUS JSON or absolute URL

    Client fallback: if shouldEnrich and RSC after() did not finish, ensureDocMediaBackground runs from the client; poll interval is 2000 ms.

    Access rules (verified)

    1. 1

      Audible is public

      generateDocNarration has no auth gate — any visitor may trigger it; cost is amortized via the SHA cache / background enrich.

    2. 2

      Visual video requires member+

      In generateDocWalkthrough, enableVideo: true requires a session (AUTH_REQUIRED) and hasMemberPrivileges(session.user.role) (MEMBER_REQUIRED). Audio-only walkthroughs have no role gate.

    3. 3

      Draft quality for docs video

      MediaConductor.generateDocWalkthrough requests qualityMode: 'draft', aspectRatio: '16:9', purpose: 'docs-walkthrough', and persists to Filebase.

    Conductor family

    MediaConductor is one of several thin domain facades that reuse the shared media conductors without duplicating provider logic:

    ConductorPathRole
    MediaConductorlib/media/conductor/media-conductor.tsScripted clips + docs walkthroughs
    NewsConductorfeatures/news/conductor/news-conductor.tsArticle generation, translation, publish-time media enrichment (TL;DR + TTS + featured image)
    WalletConductorfeatures/wallet/conductor/wallet-conductor.tsMulti-step wallet ops facade over wallet server actions

    Wallet & Credit System

    Next-step: member roles that unlock Visual video generation.

    Scripted Media Pipeline

    Deep-dive: scripted clip pipeline behind MediaConductor.generateScript / generateClip.

    VideoConductor

    The scripted-video engine MediaConductor delegates to.

    News

    NewsConductor — sibling facade for article media enrichment.

    Look at the top-right of any docs article: Audible · Visual · Create / Agent. If you just opened a page for the first time, wait for Generating… to finish — Play will then hit the cache.

    generateDocNarration
    createOrGetDocAgentNodus
    generateDocWalkthrough
    Article chromecomponents/docs/docs-article-shell.tsxLoads status; after() schedules background enrich when shouldEnrich
    Header buttonscomponents/docs/docs-article-media-actions.tsxAudible / Visual / Agent UI; 2s poll while generating
    Legacy URL mirrorlib/docs/docs-media-cache.tsgenerated_docs_media rows (short hash mirror for walkthrough / narration URLs)
    Agent NODUS APIapp/api/docs/nodus/[locale]/[[...slug]]/route.tsPublic JSON via next.config.mjs rewrites
    LLM indexapp/llms.txt/route.ts/llms.txt curated Markdown index
    Schemadata/migrations/045_docs_media_and_enrichment.sqlgenerated_docs_media + docs_article_enrichment (applied local + prod)
    Delegateslib/video, lib/images, lib/audio, lib/textVideo / Image / Audio / Text conductors

    Docs media flow

    Audible enrichment + after() background

    SHA-256 cache contract

    • Collections: docs_article_enrichment (audible-text / tts-audio / llm-text + history) and generated_docs_media (URL mirror for narration/walkthrough) via db() — registered in BackendSelector + PostgreSQLAdapter.
    • Content SHA: hashArticleContentSha256(locale, slug, plain) = full sha256(\$:$:$`). Ready state requires contentSha256match on enrichment +ttsAudio.contentSha256`.
    • Row id: docs-enrich-{locale}-{sha256(slug).slice(0,24)} (stable per locale/slug; content SHA lives in the document body).
    • TTS objectKey: {AUDIO_STORAGE_PREFIX||generated/audio}/docs/{fullSha256}.mp3 — reuse only when URL, objectKey, and SHA all match; otherwise regenerate.
    • SHA change: prior ttsAudio / audibleText / llmText pushed to history.audibles / history.llmTexts with status: 'invalidated'. New audible uses TextConductor TASK_MODE: ALIGN_EXISTING_AUDIBLE when a prior script exists.
    • Agent path: ensureLlmText builds minimized NODUS (object_type: docs_article, source_content_hash). Public URLs: /docs/<slug>/nodus.json and /:locale/docs/.../nodus.json → rewrite → API route.
    • Index: GET /llms.txt lists absolute /nodus.json links (DEFAULT_LOCALE scan).

    Article header UX (verified)

    ControlMissingGeneratingReady
    AudibleTriggers generateDocNarrationSpinner labelPlays [data-docs-audible-player]; optional show/hide transcript
    VisualgenerateDocWalkthrough({ enableVideo: true })SpinnerShows video when returned; member+ gated
    AgentLabel Create (agentCreate) → createOrGetDocAgentNodus then clipboardSpinnerLabel Agent + copy icon — copies NODUS JSON or absolute URL

    Client fallback: if shouldEnrich and RSC after() did not finish, ensureDocMediaBackground runs from the client; poll interval is 2000 ms.

    Access rules (verified)

    1. 1

      Audible is public

      generateDocNarration has no auth gate — any visitor may trigger it; cost is amortized via the SHA cache / background enrich.

    2. 2

      Visual video requires member+

      In generateDocWalkthrough, enableVideo: true requires a session (AUTH_REQUIRED) and hasMemberPrivileges(session.user.role) (MEMBER_REQUIRED). Audio-only walkthroughs have no role gate.

    3. 3

      Draft quality for docs video

      MediaConductor.generateDocWalkthrough requests qualityMode: 'draft', aspectRatio: '16:9', purpose: 'docs-walkthrough', and persists to Filebase.

    Conductor family

    MediaConductor is one of several thin domain facades that reuse the shared media conductors without duplicating provider logic:

    ConductorPathRole
    MediaConductorlib/media/conductor/media-conductor.tsScripted clips + docs walkthroughs
    NewsConductorfeatures/news/conductor/news-conductor.tsArticle generation, translation, publish-time media enrichment (TL;DR + TTS + featured image)
    WalletConductorfeatures/wallet/conductor/wallet-conductor.tsMulti-step wallet ops facade over wallet server actions

    Wallet & Credit System

    Next-step: member roles that unlock Visual video generation.

    Scripted Media Pipeline

    Deep-dive: scripted clip pipeline behind MediaConductor.generateScript / generateClip.

    VideoConductor

    The scripted-video engine MediaConductor delegates to.

    News

    NewsConductor — sibling facade for article media enrichment.

    Look at the top-right of any docs article: Audible · Visual · Create / Agent. If you just opened a page for the first time, wait for Generating… to finish — Play will then hit the cache.

    generateDocNarration
    createOrGetDocAgentNodus
    generateDocWalkthrough
    Article chromecomponents/docs/docs-article-shell.tsxLoads status; after() schedules background enrich when shouldEnrich
    Header buttonscomponents/docs/docs-article-media-actions.tsxAudible / Visual / Agent UI; 2s poll while generating
    Legacy URL mirrorlib/docs/docs-media-cache.tsgenerated_docs_media rows (short hash mirror for walkthrough / narration URLs)
    Agent NODUS APIapp/api/docs/nodus/[locale]/[[...slug]]/route.tsPublic JSON via next.config.mjs rewrites
    LLM indexapp/llms.txt/route.ts/llms.txt curated Markdown index
    Schemadata/migrations/045_docs_media_and_enrichment.sqlgenerated_docs_media + docs_article_enrichment (applied local + prod)
    Delegateslib/video, lib/images, lib/audio, lib/textVideo / Image / Audio / Text conductors

    Docs media flow

    Audible enrichment + after() background

    SHA-256 cache contract

    • Collections: docs_article_enrichment (audible-text / tts-audio / llm-text + history) and generated_docs_media (URL mirror for narration/walkthrough) via db() — registered in BackendSelector + PostgreSQLAdapter.
    • Content SHA: hashArticleContentSha256(locale, slug, plain) = full sha256(\$:$:$`). Ready state requires contentSha256match on enrichment +ttsAudio.contentSha256`.
    • Row id: docs-enrich-{locale}-{sha256(slug).slice(0,24)} (stable per locale/slug; content SHA lives in the document body).
    • TTS objectKey: {AUDIO_STORAGE_PREFIX||generated/audio}/docs/{fullSha256}.mp3 — reuse only when URL, objectKey, and SHA all match; otherwise regenerate.
    • SHA change: prior ttsAudio / audibleText / llmText pushed to history.audibles / history.llmTexts with status: 'invalidated'. New audible uses TextConductor TASK_MODE: ALIGN_EXISTING_AUDIBLE when a prior script exists.
    • Agent path: ensureLlmText builds minimized NODUS (object_type: docs_article, source_content_hash). Public URLs: /docs/<slug>/nodus.json and /:locale/docs/.../nodus.json → rewrite → API route.
    • Index: GET /llms.txt lists absolute /nodus.json links (DEFAULT_LOCALE scan).

    Article header UX (verified)

    ControlMissingGeneratingReady
    AudibleTriggers generateDocNarrationSpinner labelPlays [data-docs-audible-player]; optional show/hide transcript
    VisualgenerateDocWalkthrough({ enableVideo: true })SpinnerShows video when returned; member+ gated
    AgentLabel Create (agentCreate) → createOrGetDocAgentNodus then clipboardSpinnerLabel Agent + copy icon — copies NODUS JSON or absolute URL

    Client fallback: if shouldEnrich and RSC after() did not finish, ensureDocMediaBackground runs from the client; poll interval is 2000 ms.

    Access rules (verified)

    1. 1

      Audible is public

      generateDocNarration has no auth gate — any visitor may trigger it; cost is amortized via the SHA cache / background enrich.

    2. 2

      Visual video requires member+

      In generateDocWalkthrough, enableVideo: true requires a session (AUTH_REQUIRED) and hasMemberPrivileges(session.user.role) (MEMBER_REQUIRED). Audio-only walkthroughs have no role gate.

    3. 3

      Draft quality for docs video

      MediaConductor.generateDocWalkthrough requests qualityMode: 'draft', aspectRatio: '16:9', purpose: 'docs-walkthrough', and persists to Filebase.

    Conductor family

    MediaConductor is one of several thin domain facades that reuse the shared media conductors without duplicating provider logic:

    ConductorPathRole
    MediaConductorlib/media/conductor/media-conductor.tsScripted clips + docs walkthroughs
    NewsConductorfeatures/news/conductor/news-conductor.tsArticle generation, translation, publish-time media enrichment (TL;DR + TTS + featured image)
    WalletConductorfeatures/wallet/conductor/wallet-conductor.tsMulti-step wallet ops facade over wallet server actions

    Wallet & Credit System

    Next-step: member roles that unlock Visual video generation.

    Scripted Media Pipeline

    Deep-dive: scripted clip pipeline behind MediaConductor.generateScript / generateClip.

    1. Docs
    2. /Features
    3. /MediaConductor

    Updated Aug 4, 20266 min listen

    1. Docs
    2. /Features
    3. /MediaConductor

    Updated Aug 4, 20266 min listen

    1. Docs
    2. /Features
    3. /MediaConductor

    Updated Aug 4, 20266 min listen