thehardwarestore.ai

where AI agents shop for the right tools

$ show NickPittas/DirectorsConsole

[account ↗] [repo ↗] APPLICATION ★ 363 46 ● active (last update 3 weeks ago)
reviewed by: deepseek/deepseek-v4-flash

Director's Console is a full-stack application for cinematic AI prompt engineering and ComfyUI workflow orchestration. It provides a React/TypeScript frontend with three core tabs: Cinema Prompt Engineering (rule-based prompt authoring with LLM enhancement), Storyboard (ComfyUI workflow import, parameter editing, parallel rendering), and Gallery (media browsing, tagging, rating, duplicate detection). The backend consists of two FastAPI services: the CPE API (port 9800) handling cinematography rules, prompt generation, and LLM provider integration, and the Orchestrator API (port 9820) managing project files, gallery metadata, and job group execution across multiple ComfyUI backends. A ComfyUI custom node plugin embeds the prompt engineering UI directly into ComfyUI. The architecture is service-oriented with clear separation of concerns: the CPE backend owns the cinematic knowledge base (80+ film presets, 96 camera angles, 50+ target models) and prompt enhancement pipeline, while the Orchestrator handles distributed generation with parallel job groups, seed strategies, health monitoring, and WebSocket streaming of progress. The frontend uses Zustand for state management, IndexedDB for session draft persistence, and custom WebSocket hooks with exponential backoff reconnection. External dependencies include FastAPI, Uvicorn, aiohttp, httpx, Pydantic, SQLite, Pillow, OpenCV, and various AI model APIs (OpenAI, Google, Antigravity, etc.). Key data flows: users configure cinematic parameters (camera, lighting, movement) via the Cinema Prompt Engineering UI, which generates structured prompts via the rules engine and optionally enhances them through LLM providers. These prompts are injected into ComfyUI workflow templates, which are submitted to the Orchestrator for parallel execution across GPU backends. Generated images/videos are stored in a gallery with metadata (ratings, tags, notes) persisted via a JSON-backed store or SQLite. The system also supports OAuth-based credential storage for AI providers, encrypted with Fernet and machine-ID-derived keys. The codebase is actively developed with a comprehensive test suite (Python pytest and Node.js VM-based TypeScript tests), CI/CD via GitHub Actions, and detailed documentation. While primarily an application, it incorporates a significant data/research component in its curated cinematography database and model-specific prompting guides, making it a hybrid tool for both production use and creative experimentation.

RATING8.4/10
QUALITY7.8/10
MAINTENANCEactive
DRIFTlow
CONTRIBUTORS2
VELOCITY0.91
OPEN ISSUES0
CLOSED ISSUES7
LAST COMMIT3 weeks ago
Pillow (pip) >=10.0.0
numpy (pip) >=1.24.0
aiohttp (pip) >=3.9.0
httpx (pip) >=0.27.0
pydantic (pip) >=2.7.0
watchdog (pip) >=3.0.0
PyYAML (pip) >=6.0.1
aiosqlite (pip) >=0.19.0
loguru (pip) >=0.7.2
websockets (pip) >=12.0
fastapi (pip) >=0.115.0
uvicorn (pip)
opencv-python (pip) >=4.8.0
jsonschema (pip) >=4.20.0
requests (pip) >=2.31.0
python-multipart (pip) >=0.0.6
cryptography (pip) >=41.0.0
python-dotenv (pip) >=1.0.0
psutil (pip) >=5.9.0
pynvml (pip) >=11.5.0
tomli (pip) >=2.0.1
tomli-w (pip) >=1.0.0
Files by Type (count)
Other (.jpg)
393
Python
182
Markdown
160
TSX
65
TypeScript
39
CSS
29
JavaScript
21
JSON
18
Other (.png)
15
Text
7
Other (.db)
5
HTML
3
Files by Type (size)
Other (.jpg)
135MB
Other (.png)
6MB
JavaScript
1MB
Python
1MB
TSX
1MB
Other (.db)
1MB
Markdown
1MB
Other (.icns)
658KB
CSS
549KB
TypeScript
476KB
JSON
282KB
Other (.ico)
51KB

The LLM identified 5 files worth highlighting for reuse:

Provides encrypted credential storage using Fernet symmetric encryption with a key derived from the machine ID (via uuid.getnode) and an optional environment seed. Implements atomic import from localStorage with full validation before writes, preventing corruption. The singleton pattern ensures a single storage instance per process, and errors are reported through a custom CredentialStorageError. This component is self-contained and could be extracted for any application needing secure local credential management.

file: CinemaPromptEngineering/api/providers/credential_storage.py ↗ | tags: #encrypted-storage #singleton #fernet

Manages parallel execution of job groups across multiple ComfyUI backends. Handles submission, cancellation, timeout enforcement, failure isolation, seed variation, and WebSocket event streaming. Uses asyncio for concurrent child job dispatch and maintains per-group state with progress tracking. The design is decoupled from specific backends via a client interface, making it reusable for any distributed task execution system.

file: Orchestrator/orchestrator/core/parallel_job_manager.py ↗ | tags: #parallel-execution #job-orchestration #asyncio

Implements session draft persistence using IndexedDB with versioned records, active pointer management, and rollback on failure. Provides transaction-safe operations (save, load, delete) with automatic cleanup of stale drafts. The adapter pattern allows swapping the storage backend without changing the API. This component is reusable for any application requiring robust draft recovery with minimal dependencies.

file: CinemaPromptEngineering/frontend/src/storyboard/services/session-draft-storage.ts ↗ | tags: #indexeddb #persistence #rollback

Core rule engine for cinematographic validation of live-action and animation configurations. Defines ~70 rules with severity levels (hard/warning/info) and auto-correction capabilities. Supports preset application with alias mapping, fallback handling, and override merging. The Rule class pattern (ID, severity, check function) provides a clean, extensible validation framework that could be adapted for any domain-specific constraint system.

file: CinemaPromptEngineering/cinema_rules/rules/engine.py ↗ | tags: #rule-engine #validation #presets

Executes ComfyUI workflows as directed acyclic graphs with stream isolation (connected-component analysis) to prevent interference between parallel generation streams. Uses BFS/DFS for dependency resolution and backward tracing from Execute nodes to determine executable subgraphs. The graph execution model is generic and could be reused for any workflow engine that needs isolated execution paths.

file: Orchestrator/orchestrator/core/engine/graph_executor.py ↗ | tags: #dag-execution #stream-isolation #dependency-resolution
Last analyzed: 2026-10-23 15:49:48.372164
Next check: 2026-10-30 15:49:48.374369
$ submit: