How gx-capture/capture-workbench works
Capture Workbench is a local-first platform that turns PDF, image, and audio inputs into validated structured documents. In the desktop workflow, a user imports a source through the Angular UI; the native host manages the local runtime and credentials, the runtime ingests and extracts content, then structures and validates the result before the host persists it for review or export. The README also documents embeddable UI and TypeScript, Python, and Java SDK integrations. Runtime internals and several README-described subsystems are unsampled, so their links below are limited to documented relationships.
Main entry points: runtime.py Runtime API · streaming_capture_service.py Capture service · app.ts Desktop UI · desktop-workspace-capture.service.ts Capture workflow
Components 23
User experience
- Desktop UI
apps/capture-workbench/src/app/app.ts - Capture workflow
apps/capture-workbench/src/app/services/desktop-workspace-capture.service.ts - Embeddable UI
packages/capture-workbench-ui/src/lib/capture-angular/components/capture-angular/capture-angular.ts
Desktop host
- Workspace state
apps/capture-workbench/src/app/services/desktop-workspace.store.ts - Native commands
apps/capture-workbench-desktop/src-tauri/src/commands.rs - Desktop runtime client
apps/capture-workbench-desktop/src-tauri/src/runtime_client.rs - Local library
apps/capture-workbench-desktop/src-tauri/src/library.rs - Sidecar lifecycle
packages/capture-sidecar-launcher/src/launcher.rs
Capture runtime
- Runtime API
packages/capture-runtime/src/capture_runtime/routes/runtime.py - Streaming API
packages/capture-runtime/src/capture_runtime/routes/streaming.py - Capture service
packages/capture-runtime/src/capture_runtime/services/streaming_capture_service.py - Extraction engines
packages/capture-runtime/src/capture_runtime/engine_adapters.py - Engine setup
packages/capture-runtime/src/capture_runtime/engine_installation.py - Structuring
packages/capture-runtime/src/capture_runtime/structuring/structuring.py - Structuring sessions
packages/capture-runtime/src/capture_runtime/services/structuring_session_service.py - Contract discovery
packages/capture-runtime/src/capture_runtime/contract_set.py - Runtime contracts
packages/capture-runtime/src/capture_runtime/contracts/__init__.py
Host integrations
- TypeScript SDK
packages/capture-runtime-client/src/client.ts - Python SDK
packages/capture-runtime-client-python/src/capture_runtime_client/client.py - Java SDK
packages/capture-runtime-client-java/src/main/java/com/gx/capture/runtime/client/CaptureRuntimeClient.java
Other components
- User
- Host provider
- Ollama process
Connections 22
- User → Desktop UI: imports sources
README.md - Desktop UI → Capture workflow: starts capture
apps/capture-workbench/src/app/app.ts - Capture workflow → Desktop runtime client: requests runtime
README.md - Capture workflow → Local library: persists results
README.md - Desktop UI → Workspace state: initializes state
apps/capture-workbench/src/app/app.ts - Native commands → Sidecar lifecycle: manages lifecycle
- Desktop runtime client → Runtime API: calls over loopback
README.md - Runtime API → Capture service: dispatches capture
- Streaming API → Capture service: dispatches streaming
- Capture service → Extraction engines: extracts content
README.md - Engine setup → Extraction engines: activates engines
packages/capture-runtime/src/capture_runtime/engine_installation.py - Capture service → Structuring: structures content
README.md - Capture service → Structuring sessions: supports sessions
- Structuring → Runtime contracts: validates result
README.md - Runtime API → Contract discovery: serves discovery
README.md - Desktop runtime client → Local library: copies host data
README.md - Embeddable UI → Host provider: accepts provider
README.md - TypeScript SDK → Runtime API: calls runtime
README.md - Python SDK → Runtime API: calls runtime
README.md - Java SDK → Runtime API: calls runtime
README.md - Host provider → Runtime API: may structure
README.md - Structuring → Ollama process: may use
README.md