Repository navigation
Desktop Architecture
VisualMark Studio is designed as a native Code + Visual desktop IDE (modeled after VS Code and modern desktop developer tools) using Electron, React 18, and an embedded Python FastAPI sidecar daemon.
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β VisualMark Studio Desktop Window β
β β
β [β¦ VisualMark Studio] [File βΎ] [βK Search] [β] [β‘] [β] β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€ β
β β β β
β β React + Vite UI (Frameless Custom Titlebar & Studios) β β
β β - Direct Disk Read/Write (Ctrl+S, Ctrl+O) β β
β β - Local Folder Workspace Browser (Ctrl+Shift+O) β β
β β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β β
β IPC Bridge β
β β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β Electron Main Process (Node.js) β β
β β - Native file dialogs & disk streaming β β
β β - Window minimize / maximize / close β β
β β - Sidecar process manager & lifecycle hooks β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
ββββββββββββββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββ
β HTTP (http://127.0.0.1:8000..8030)
β Dynamic port negotiation & fallback
ββββββββββββββββββββββββββββββββββ΄ββββββββββββββββββββββββββββββββββ
β Standalone Python FastAPI Daemon (server.exe) β
β - Frozen via PyInstaller (runs without Python pre-installed) β
β - Conflict-resilient port binding (--port <activePort>) β
β - Deep AST scanning, multi-file suites & documentation AI β
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Because modern web security restricts browser windows from arbitrarily reading and writing files to local disk, the Electron Main Process serves as a secure bridge exposing safe APIs via contextBridge in preload.js:
| IPC Channel | Purpose | Direction |
|---|---|---|
read-file |
Reads file content directly from local filesystem | Renderer |
write-file |
Saves active document to local filesystem | Renderer |
select-file |
Opens native OS file picker dialog | Renderer |
select-folder |
Opens native OS directory picker dialog | Renderer |
get-backend-url |
Returns the negotiated Python sidecar URL | Renderer |
window-minimize |
Minimizes desktop window | Renderer |
window-maximize |
Toggles maximized / restored state | Renderer |
window-close |
Gracefully closes application and stops sidecar | Renderer |
In developer workstations, port 8000 is frequently occupied by other local servers (e.g. Docker, Django, or other microservices).
To prevent startup crashes:
- When Electron initializes, it probes ports sequentially from
8000through8030. - If it discovers an active VisualMark backend (by checking
/health), it binds to it immediately. - If no backend is running, Electron selects the first available free port and spawns the Python sidecar daemon passing
--port <port>. - The negotiated URL is pushed to the React UI via
get-backend-url, ensuring zero connection errors.
When packaged for distribution:
- The Python backend is frozen into a self-contained executable (
server.exe) using PyInstaller. - End users do not need Python installed on their machines.
- Electron manages the sidecar's lifecycle: spawning it silently on launch and terminating the process when the window closes.
VisualMark Studio does not transmit your source code, documentation, or file paths to external servers:
- All AST parsing, Markdown linting, and diagram generation execute locally on your hardware.
- External network requests are restricted to public badge fetching (Shields.io) and optional SSRF-sanitized image previews.
- No telemetry, analytics, or behavioral trackers are included in the binaries.
Return to Home or continue to 12 Visual Studios Guide.
VisualMark Studio β’ The Code + Visual Desktop IDE for Technical Documentation
Built with React, Electron & FastAPI β’ GitHub Project