Spaces:
Build error
Build error
|
Download docs/ARCHITECTURE.md from shiva0013/YT-AI-Automation: direct link, hf CLI and curl.
- Browser
- Download file 1.63 kB
-
https://huggingface.co/spaces/shiva0013/YT-AI-Automation/resolve/main/docs/ARCHITECTURE.md
- Command line
-
hf download hf://spaces/shiva0013/YT-AI-Automation/docs/ARCHITECTURE.md
-
curl -L -o ARCHITECTURE.md https://huggingface.co/spaces/shiva0013/YT-AI-Automation/resolve/main/docs/ARCHITECTURE.md
1.63 kB
Architecture
TextBro is a React/Vite client backed by the importable backend Python
package. Flask owns HTTP transport; queued workflows own generation; SQLite
owns metadata; generated media remains on disk.
Export flow
- A client posts text, HTML, YouTube metadata, or screenshots to
/runs/*. - The backend creates a persisted run and queues a
WorkflowContextjob. - AI, Playwright, and export stages publish one normalized event format.
/runs/<run_id>/eventsstreams those events. Polling/runs/<run_id>is a safe fallback after network interruption.- Linux selects direct FFmpeg. Static/cut-only slides use sparse VFR frames; transitions use FFmpeg filters. Voiceovers, narration, music, watermarks, and intro/outro clips stay in FFmpeg. MoviePy is compatibility-only.
- Windows retains the PowerPoint COM engine.
POST /generate-sse is a deprecated transport adapter. It submits to the same
tracked run pipeline and translates persisted events; it contains no active
generation orchestration.
Runtime boundaries
backend/src/settings.py: immutable typed environment settings.backend/src/core: queue, workflows, AI clients, and run lifecycle.backend/src/storage: SQLite schema, migration, and retention.backend/src/video_engine.py: engine selection and media composition.backend/routes: HTTP validation and response translation.frontend/src/api: the supported browser contract.
The contract is available at GET /openapi.json. Request logs are JSON and
carry request_id; workflow logs add run_id, operation_id, engine, stage,
progress, and ETA.