How xiaolai/vmark works
VMark is a local-first desktop workspace for editing plain-text artifacts and collaborating with AI. The principal workflow is to open a file or workspace, initialize its window state, render the artifact in an appropriate editor or preview, then save or act on it. The graph also preserves documented workflow execution, MCP integration, browser automation, content serving, and Genie assistance. Several subsystem paths come from the repository tree and README rather than inspected implementation; those links are marked unverified where needed.
Main entry points: Editor Editor surfaces · App.tsx Window application · WindowContext.tsx Window bootstrap · yamlEngineRenderer.tsx Workflow preview
Components 22
Desktop application
- Window application
src/App.tsx - Window bootstrap
src/contexts/WindowContext.tsx - Workspace setup
src/services/workspaces/openWorkspaceWithConfig.ts - Settings
src/stores/settingsStore.ts
Editing and formats
- Editor surfaces
src/components/Editor - Format adapters
src/lib/formats - Workflow preview
src/lib/formats/adapters/yamlEngineRenderer.tsx - Workflow parser
src/lib/workflow/parser.ts
AI and automation
- MCP server
server/mcp/src/server.ts - MCP tools
server/mcp/src/tools - Browser automation
src-tauri/src/browser/commands.rs - AI Genies
src-tauri/src/genies
Native runtime
- MCP bridge
src-tauri/src/mcp_bridge/server.rs - Content server
src-tauri/src/content_server/manager.rs - Content service
server/content/src/server/createServer.ts - Tauri runtime
src-tauri/src/lib.rs
Workspace state
- Workspace persistence
src/services/persistence/workspaceStorage.ts - Session recovery
src-tauri/src/hot_exit/storage.rs - Coherence tracking
src-tauri/src/coherence
Other components
- Workspace user
- Plain-text artifacts
- Rendered or saved work
Connections 25
- Workspace user → Window application: opens workspace
- Plain-text artifacts → Editor surfaces: opens artifact
- Window application → Editor surfaces: renders editor
src/App.tsx - Window application → Window bootstrap: bootstraps window
src/App.tsx - Window bootstrap → Workspace setup: opens workspace
src/contexts/WindowContext.tsx - Window bootstrap → Workspace persistence: prepares storage
- Window bootstrap → Editor surfaces: loads documents
- Editor surfaces → Format adapters: selects preview
src/components/Editor/SplitPaneEditor/usePreviewModel.ts - Format adapters → Workflow preview: renders workflow
src/lib/formats/adapters/yamlEngineRenderer.tsx - Workflow preview → Workflow parser: parses content
src/lib/formats/adapters/yamlEngineRenderer.tsx - Workflow preview → Settings: checks engine setting
src/lib/formats/adapters/yamlEngineRenderer.tsx - Workflow preview → Tauri runtime: runs workflow
- Settings → Workspace persistence: persists settings
- Editor surfaces → Rendered or saved work: edits artifacts
- Workspace user → MCP server: invokes assistant
- MCP server → MCP tools: dispatches tools
- MCP server → MCP bridge: bridges requests
- MCP bridge → Browser automation: routes browser actions
- MCP tools → Editor surfaces: works on artifacts
- Workspace user → AI Genies: requests assistance
- Workspace setup → Coherence tracking: tracks workspace claims
- Window application → Content server: manages content service
- Content server → Content service: starts service
- Tauri runtime → Session recovery: stores recovery session
- Workspace persistence → Rendered or saved work: saves workspace state