How katkurigopi05/photo-editor works
Project Director and photo-editor are parallel non-destructive editor tracks: a TypeScript/Rust web-and-desktop-oriented editor and a Python GUI/CLI editor. In the browser workflow, users edit a project through the web app, which dispatches validated commands into replayable editor state and supports media import, playback, and export. The Python workflow opens media as a document, applies serializable operations, and exports images or frame-based media. The README documents additional AI, CV, video, and MCP capabilities. Some TypeScript and Rust links reflect documented capabilities rather than inspected runtime wiring.
Main entry points: main.ts Browser editor · engine.ts Operation engine · app.py Python CLI · operations.py Image operations
Components 31
Web editor
- Browser editor
apps/web/src/main.ts - Timeline UI
packages/ui-kit/src/drag.ts - Playback
packages/playback-controller/src - Motion tracking
packages/motion-tracking/src
Project core
- Project schema
packages/project-schema/src - Command validation
packages/command-schema/src/public-commands.ts - Operation engine
packages/editor-state/src/engine.ts - Project reducers
packages/editor-state/src/reducers.ts - Canonical serialization
packages/canonical-json/src/index.ts - Project persistence
crates/project-store/src/lib.rs
Media capabilities
- Media decoding
crates/media-core/src/decode.rs - RAW decoding
packages/raw-decode/src/route.ts - Raster effects
packages/raster-tools/src/adjust.ts - Background segmentation
packages/bg-segmentation/src/inference.ts - Export jobs
packages/export-engine/src/plan.ts - Audio engine
crates/audio-engine/src/lib.rs - Timeline engine
crates/timeline-engine/src/lib.rs
Python editor
- Python CLI
app.py - Python GUI
photo_editor.py - Edit document
core/document.py - Image operations
core/operations.py - Frame builder
core/builder.py - Video processing
video_tools/processing.py - AI operations
ai_tools/operations.py - CV operations
cv_tools/operations.py
Automation
- MCP tools
packages/mcp-server/src/tools/edit.ts - MCP project session
packages/mcp-server/src/session.ts - MCP project files
packages/mcp-server/src/project-store.ts
Other components
- Editor user
- Photo editor user
- MCP client
Connections 33
- Editor user → Browser editor: edits in
README.md - Browser editor → Timeline UI: uses timeline gestures
apps/web/src/main.ts - Browser editor → Playback: resolves playback
apps/web/src/main.ts - Browser editor → Motion tracking: uses tracking
apps/web/src/main.ts - Browser editor → Operation engine: dispatches commands
- Timeline UI → Command validation: builds command payloads
packages/ui-kit/src/drag.ts - Operation engine → Command validation: validates commands
packages/editor-state/src/engine.ts - Operation engine → Project reducers: applies commands
packages/editor-state/src/engine.ts - Operation engine → Canonical serialization: serializes operations
packages/editor-state/src/engine.ts - Project reducers → Project schema: uses project types
packages/editor-state/src/reducers.ts - Browser editor → RAW decoding: routes RAW imports
- Browser editor → Export jobs: starts exports
- Browser editor → Media decoding: decodes media
- Browser editor → Raster effects: applies image effects
- Browser editor → Background segmentation: offers segmentation
- Browser editor → Audio engine: supports audio
- Browser editor → Timeline engine: uses timeline core
- Operation engine → Project persistence: persists project state
- Photo editor user → Python GUI: edits media
README.md - Photo editor user → Python CLI: runs recipes
README.md - Python CLI → Edit document: applies image recipe
app.py - Python CLI → Frame builder: builds GIF or video
app.py - Python CLI → Video processing: dispatches video edits
app.py - Python GUI → Edit document: edits document
- Edit document → Image operations: renders operations
core/document.py - Frame builder → Image operations: applies recipe operations
- Video processing → Frame builder: uses frame builder
video_tools/processing.py - AI operations → Image operations: extends operations
ai_tools/operations.py - CV operations → Image operations: extends operations
cv_tools/operations.py - MCP client → MCP tools: requests edits
- MCP tools → MCP project session: dispatches tool actions
- MCP project session → Operation engine: dispatches commands
packages/mcp-server/src/session.ts - MCP project session → MCP project files: loads and saves
packages/mcp-server/src/session.ts