How igrisundead-ops/prometheus-core-backend works
1. This is a multi-package media-generation platform, not a single app. The repository centers on a cinematic video/audio system built around TypeScript, React/Remotion, a Node backend, and a Python render worker. The codebase is organized to plan creative decisions, render preview/final outputs, and manage media/font/music catalogs.
2. The main runtime boundary is between backend/ and remotion-app/. The backend is a Node/TypeScript API and orchestration service. The Remotion app is a Vite/React front end plus composition/runtime layer that turns manifests and timelines into previewable or renderable scenes.
3. backend/src/ is the control plane. It exposes routes for edit sessions, music, uploads, thumbnails, diagnostics, and “god”/creative decision workflows. It also contains execution routing, queueing, render authority, and pipeline modules that decide which executor or rendering path should run.
4. The backend’s core domain is split into specialized subsystems: cognitive-engine and related governors for decision-making and constraints; executors for running video jobs; music for cataloging, planning, rendering, and validating audio; render for adapter-based render execution; and typography, motion, and assets services for asset resolution and layout decisions. These are the main architectural seams you’d diagram.
5. The creative decision layer is especially prominent. The repo includes “governor,” “critic,” “ocular,” “temporal,” and “timeline” concepts in the backend, plus a large remotion-app/src/creative-orchestration/ area with agents, judgment engines, governance, deviation control, and planning. This indicates a layered system where candidate creative treatments are generated, critiqued, constrained, and then approved for rendering.
6. The Remotion app is the presentation and composition engine. src/compositions/ holds renderable scenes, while src/components/ and src/web-preview/ provide live preview UIs, audio preview players, and hyperframes/native preview stages. src/lib/render-graph/, src/webgl/, and src/lib/motion-3d/ suggest a pipeline that can augment or simulate visual effects before final composition.
7. There is a strong typography/font subsystem. Font data lives in remotion-app/public/fonts/, font-intelligence/, and backend typography modules. The system includes font registries, runtime font selection, compatibility graphs, hydration/ingestion scripts, and audit outputs. In an architecture diagram, this should be treated as a distinct content-intelligence service feeding preview/render decisions.
8. Music is its own first-class pipeline. In backend/src/music/ and remotion-app/src/lib/music/, the code covers catalog import, license guarding, track analysis, beat-grid/section detection, planning, overrides, preflight validation, rehearsal runs, and audio preview rendering. That means music is not just an asset; it is planned against video timelines and governed by its own validation and artifact store.
9. Asset and retrieval infrastructure is vector-aware. The repo references Milvus, R2, embedding builders, retrieval rankers, and catalog normalization in both backend and app code. External storage/search services materially shape the architecture: R2 is used for media/font/music artifacts, Milvus for embedding retrieval, and AssemblyAI/ffprobe for transcription and media metadata.
10. Rendering is adapter-based. The backend render/adapters/ folder contains local, legacy Remotion, and “vast” render adapters, with render-authority and preview-render-service coordinating which renderer is allowed to run. The separate runpod-video-worker/ package is the compute boundary for heavier rendering jobs, packaged as a Dockerized Python worker.
11. Data flows are artifact-driven rather than purely request/response. Many modules read and write JSON artifacts under remotion-app/src/data/ and backend persistence layers. This suggests a pipeline where ingestion, cataloging, planning, and rendering each produce durable manifests that later stages consume.
12. Operationally, the repository includes extensive tests and audit documentation. Backend and app tests cover contracts, integrations, and governance behavior, while docs and generated reports capture render audits, typography diagnostics, and architecture notes. The .github/workflows/ and scripts directories indicate CI/CD and batch tooling around those pipelines.
13. The .agents/ and docs/ folders are important for human/process workflow, but they are not runtime architecture. They encode domain guidance, triage, planning, and architectural notes that support the engineering process around the system’s creative and media pipelines.
14. If you draw this repository, the clearest top-level shape is: content ingestion and catalogs on the left, governance/planning in the middle, rendering/preview on the right, and external services below or alongside for embeddings, storage, transcription, and compute. The dominant theme is a governed cinematic production system with separate planes for decisioning, assets, music, typography, and execution.
Main entry points: creative-orchestration/index.ts Creative orchestration · cognitive-engine/index.ts Creative gov · r2.ts R2 storage · execution-router.ts Execution routing
Components 20
Backend
Node/TypeScript control plane and orchestration
- API surface · HTTP server, routes, sessions, uploads, thumbnails, diagnostics
backend/src/app.ts - Creative gov · God workflows, cognitive governance, critics, temporal/timeline integrity
backend/src/cognitive-engine/index.ts - Execution routing · Queueing, execution context, router, and pipeline selection
backend/src/execution-router.ts - Render authority · Adapter-based render approval and preview render service
backend/src/render/render-authority.ts - Music pipeline · Catalog import, analysis, planning, rehearsal, validation, and rendering
backend/src/music/index.ts - Typography · Font registry, selection, delivery, and Zilliz-backed resolution
backend/src/typography/typography-decision-engine.ts - Assets · Asset routes, vector service, and media/catalog resolution
backend/src/assets/service.ts - Integrations · R2, ffprobe, and AssemblyAI integration layer
backend/src/integrations/r2.ts - Thumbnails · Thumbnail extraction and generation services
backend/src/thumbnail/index.ts
Remotion App
React/Vite composition and preview runtime
- Preview UI · Web preview app, native/hyperframes stages, and preview controls
remotion-app/src/web-preview/PreviewApp.tsx - Compositions · Renderable scenes and project-scoped compositions
remotion-app/src/compositions/ProjectScopedPreviewComposition.tsx - Creative orchestration · Agents, governance, judgment, and creative decision plumbing
remotion-app/src/creative-orchestration/index.ts - Motion engine · Render graph, motion platform, webgl, and 3D augmentation
remotion-app/src/lib/render-graph/index.ts - Music tools · Client-side music API, preview player, and video-aware state
remotion-app/src/lib/music/music-api.ts - Font system · Font intelligence, runtime registry, compatibility graphs, and selection
remotion-app/src/lib/font-intelligence/index.ts - Asset search · Cataloging, embeddings, Milvus retrieval, and asset ranking
remotion-app/src/lib/assets/retrieval.ts
Render Worker
Python compute boundary for heavy renders
- Video worker · Dockerized Runpod worker for heavyweight rendering jobs
runpod-video-worker/handler.py
External Services
Storage, search, transcription, and model backends
- R2 storage · Durable media, font, and music artifact storage
backend/src/integrations/r2.ts - Milvus · Embedding retrieval and ranking backend
remotion-app/src/lib/vector/milvus-client.ts - AssemblyAI · Media transcription and metadata extraction service
backend/src/integrations/assemblyai.ts
Connections 24
- API surface → Creative gov: creative decisions · Routes feed governed treatment and edit-session workflows
- API surface → Execution routing: dispatch jobs · API requests enter execution routing and queueing
- Execution routing → Render authority: select renderer · Execution chooses the allowed render path
- Execution routing → Video worker: heavy renders · Large jobs can be delegated to the Python worker
- Creative gov → Music pipeline: constrain audio · Governance shapes music planning and validation
- Creative gov → Typography: font rules · Decisioning constrains typography and layout choices
- Creative gov → Assets: resolve assets · Creative control consumes curated asset catalogs
- Assets → Milvus: retrieve · Vector-aware ranking and catalog search
- Assets → R2 storage: store media · Media and artifacts are persisted in object storage
- Music pipeline → R2 storage: catalog artifacts · Plans, rehearsals, and previews are stored durably
- Music pipeline → AssemblyAI: analyze audio · Transcription and media metadata support music planning
- Typography → Milvus: font search · Font intelligence uses embedding-backed lookup
- Typography → R2 storage: font assets · Runtime font artifacts are delivered from storage
- Preview UI → Compositions: mount scenes · Preview surfaces render composition entry points
- Preview UI → Creative orchestration: preview governance · Live preview is steered by creative orchestration
- Creative orchestration → Motion engine: plan motion · Judgment and planning produce motion/render graphs
- Creative orchestration → Music tools: audio cues · Creative orchestration coordinates music preview state
- Creative orchestration → Font system: choose fonts · Typography policy and runtime selection are governed here
- Creative orchestration → Asset search: rank assets · Agents search and rank assets for a scene
- Motion engine → Video worker: render pipeline · The motion stack ultimately feeds render execution
- Render authority → Preview UI: preview output · Backend render control serves preview-render flows to the app
- Render authority → Video worker: approved jobs · Render authority may release jobs to external compute
- Integrations → R2 storage: media fetch · Backend integrations read and write artifacts in storage
- Integrations → AssemblyAI: probe/transcribe · ffprobe and transcription are part of media ingestion