The Studio UI is the priority. When adding or changing functionality, surface it in the
Studio desktop UI (studio/edmg-studio/src/), not just as a backend API endpoint. New backend
capabilities should come with the corresponding UI controls (e.g. on the Render, Workspace,
Models, or Settings pages) so users can drive them without curl/API calls. Assume the user wants
every feature available in the UI unless they say otherwise.
EDMG Studio is a music-reactive AI video generation studio. The product lives under
studio/edmg-studio/ and has two services that matter for local development:
- Backend — FastAPI app in
studio/edmg-studio/python_backend/(port7863). - Frontend — React/Vite app in
studio/edmg-studio/(Vite dev server on port5173), normally wrapped by an Electron shell.
The update script already installs all dependencies (frontend pnpm install and a frozen
backend uv sync from studio/edmg-studio/python_backend/uv.lock).
The notes below are the non-obvious gotchas; standard commands live in the root README.md,
studio/edmg-studio/README.md, and the package.json scripts.
- Python is pinned to 3.12 in the repository
.python-version; use the pinneduv0.11.28 project environment rather than whichever interpreter or package installer is onPATH. - From the repo root, validate and synchronize the baseline with
uv lock --project studio/edmg-studio/python_backend --checkfollowed byuv sync --project studio/edmg-studio/python_backend --frozen --extra cpu --extra core --extra audio --group test --group lint. - Start the backend with
uv run --project studio/edmg-studio/python_backend --frozen --extra cpu --extra core --extra audio python -m edmg_studio_backend serve --host 127.0.0.1 --port 7863. - Ollama and ComfyUI are not installed here. Set
EDMG_AI_PROVIDER=rule_basedso planning uses the built-inRuleBasedPlanner(no LLM server needed). The create→upload→analyze→plan flow works fully with the rule-based provider; only actual model rendering needs GPU + model downloads that are not present.
- Always run
pnpmfrom insidestudio/edmg-studio. Run from the repo root and corepack picks a newer pnpm (v11) that fails the pinnedpackageManager(10.33.0) version check. pnpm run devruns Vite and Electron concurrently; Electron cannot launch headless in the cloud VM. To exercise the UI in a browser, run Vite alone:pnpm exec vite --host 127.0.0.1 --port 5173 --strictPort.- Backend CORS is open, so a browser can call the backend cross-origin without extra config.
- Browser-only backend selection: plain-browser Vite sessions default safely to
http://127.0.0.1:7863. Usehttp://127.0.0.1:5173/?backendUrl=https://...to override that default for a remote backend.src/components/api.tskeeps the browser fallback independent from the Electron bridge so URL resolution cannot recurse;src/test/api.test.tscarries the regression coverage.
- Backend:
uv run --project studio/edmg-studio/python_backend --frozen --extra cpu --extra core --extra audio --group test python -m pytestmust exit 0. Test counts intentionally are not pinned here because they drift as coverage is added. - Frontend:
pnpm run test:uimust exit 0. The Windows-onlysrc/test/directorRuntime.test.tsmay log a hardcodedC:\...ENOENT message to stderr on Linux while the test and runner still pass; treat the exit code and assertions as authoritative. - For a focused single-worker Vitest run, use
pnpm exec vitest run <test-file> --maxWorkers=1. Vitest 4.1 does not accept the older--minWorkersoption. pnpm run lintandpnpm run typecheckboth pass clean on this branch (exit 0).- Repo-level: the frozen uv project environment is the reliable green signal.
Some repo-root orchestration tests may still fail on branches with in-flight render-tier work.
Run both scopes with
uv run --project studio/edmg-studio/python_backend --frozen --extra cpu --extra core --extra audio --group test python scripts/run_pytest_scopes.py. Proxy fallback coverage:uv run --project studio/edmg-studio/python_backend --frozen --extra cpu --group test python -m pytest tests/test_studio_proxy_fallback.py.
- Backend project data is written to
studio/edmg-studio/python_backend/data/(gitignored) whenEDMG_STUDIO_HOMEis not set. SetEDMG_STUDIO_HOMEto relocate data/models/cache/logs.
- Canonical Linux packaging and Lightning setup:
studio/edmg-studio/packaging/linux/README.md - Lightning backend:
bash scripts/start_lightning_backend.shwithEDMG_BACKEND_ENV_MODE=active - HF bucket defaults ship in
launcher_env.defaults.json; runbash scripts/setup_linux_hf_bucket.sh - Remote backend switch:
bash scripts/set_studio_remote_backend.sh external https://... - Repo-level proxy-fallback tests in
tests/test_studio_proxy_fallback.pyshould pass when run from repo root