Skip to content

Module Overview

The application is built as a set of NestJS modules with clear dependency boundaries. All inter-service communication uses the Result pattern (neverthrow) — no exceptions are thrown across module boundaries.

Dependency Graph

Pipeline Flow

Classic Format

Reddit post → sanitizeText → TTS → Whisper alignment → Video composition → TikTok publish

Messages Format

Reddit post → LLM rewrite → Conversation → Narration script → TTS → Frame rendering → FFmpeg mux → TikTok publish

Design Patterns

  • Result-based errors — All service methods return Result<T, E> from neverthrow. No try-catch across boundaries.
  • Retry with backoff — Pipeline retries failed stages with configurable linear backoff. Non-retryable errors (CAPTCHA, daily limit) fail immediately.
  • Singleton services — NestJS default scope. Browser and TTS model are initialized once on startup.
  • Zod configuration — All env vars validated at bootstrap. Invalid config = immediate crash with descriptive error.

Built with VitePress