C4 Model - Level 2: Container Level
Container Diagram
Container Descriptions
- Technology: Python, Typer, Rich
- Responsibility: User interface for submitting URLs and monitoring progress
- Deployment: Local executable
Video Downloader (yt-dlp)
- Technology: yt-dlp Python library
- Responsibility: Download videos from platforms, extract metadata
- Deployment: Local process
- Technology: FFmpeg subprocess
- Responsibility: Extract audio stream, convert to MP3
- Deployment: Local subprocess
Transcription Engine (Whisper)
- Technology: OpenAI Whisper API client
- Responsibility: Convert audio to timestamped text
- Deployment: External API call
- Technology: FFmpeg subprocess
- Responsibility: Sample video frames at configurable rate
- Deployment: Local subprocess
Deduplication Engine (pHash)
- Technology: Python, imagehash, Pillow
- Responsibility: Remove perceptually similar frames
- Deployment: Local process
Vision Analyzer (Claude Vision)
- Technology: Anthropic Claude API client
- Responsibility: Analyze image content, extract text/diagrams
- Deployment: External API call
Content Aligner
- Technology: Python, binary search
- Responsibility: Match transcript segments with frame timestamps
- Deployment: Local process
Semantic Chunker
- Technology: Python, sentence-transformers
- Responsibility: Split content into coherent topic chunks
- Deployment: Local process
Artifact Generators
- Technology: Python, Jinja2 templates, LLM APIs
- Responsibility: Generate SDD, TDD, ADR, C4, Glossary documents
- Deployment: Local process with API calls
Search Expander (Serper)
- Technology: Serper API client
- Responsibility: Web search for context enrichment
- Deployment: External API call
- Technology: SQLite / PostgreSQL
- Responsibility: Store metadata, transcripts, analyses, relationships
- Deployment: Local file or external server
File Storage (Local FS)
- Technology: Local filesystem
- Responsibility: Store video, audio, frames, artifacts
- Deployment: Local directory
Container Interactions
| From | To | Protocol | Purpose |
|---|
| CLI | Downloader | Function call | Submit download request |
| Downloader | YouTube | HTTPS | Download video |
| AudioEx | FileStore | File I/O | Write MP3 |
| Transcriber | Whisper | HTTPS/JSON | API request |
| FrameEx | FileStore | File I/O | Write PNGs |
| Vision | Claude | HTTPS/JSON | Vision API |
| Generators | FileStore | File I/O | Write artifacts |
| All DB clients | VideoDB | SQL | CRUD operations |
Technology Stack per Container
| Container | Language | Key Libraries |
|---|
| CLI | Python | typer, rich, asyncio |
| Downloader | Python | yt-dlp, pydantic |
| AudioEx | Python | ffmpeg-python |
| Transcriber | Python | openai |
| FrameEx | Python | opencv-python |
| Dedup | Python | imagehash, Pillow |
| Vision | Python | anthropic |
| Aligner | Python | numpy, bisect |
| Chunker | Python | sentence-transformers |
| Generators | Python | jinja2, anthropic |
| SearchExp | Python | aiohttp |
| VideoDB | SQL | aiosqlite |