DraggyDocs
English
draggy.org Download

DocsReference

Building and architecture

Running from source, the layout of the code, and the two boundaries.

Running from source#

cd win
npm install
npm run electron:dev

Vite and Electron together with hot reload, on port 5173. If a stale Vite process holds the port, the next launch fails, so stop it first.

npm run check

Typecheck, lint and the tests. CI runs the same command. npm run electron:build writes an installer into dist-electron/.

How it is laid out#

Folder Holds
core/ Shared Rust core: session state, URL policy, MCP routing, providers and document parser
win/ Windows Electron app (electron/ for main process and src/ for React frontend)
macos/ Native macOS SwiftUI application
linux/ Native Linux GTK 4 and libadwaita application
shared/ Shared fixtures, host lists and app icons

The two boundaries#

electron/preload.cjs is the security one. The renderer has no Node access and reaches the filesystem, network and database only through what is exposed there. Adding a function is a deliberate act.

The session split is the other. Draggy's own window runs under a strict CSP; every external page runs on a separate partition with no policy of ours imposed on it. Merging them would apply our policy to other people's sites and break them.

Logging and diagnostics#

Draggy keeps two rotating logs in the application data folder (logs/):

  • app.log: Lifecycle events, model management and errors. Prompts and replies are reduced to hashes and lengths, and secrets are scrubbed.
  • debug.log: A more detailed trace. Streaming output is recorded by length, not by text.

Logs rotate at 5 MiB and keep three archives. To see them, open Settings → Diagnostics → Open log folder, or set LOG_LEVEL=DEBUG or DEBUG_LOG_LEVEL=DEBUG for the most detail. For a bug report, use Settings → Diagnostics → Export diagnostics.

Inference engine#

Draggy runs local models with an embedded engine:

  • GGUF (llama.cpp): Runs .gguf model files in a hidden llama-server child process on port 11435. It uses Metal on macOS. On Windows, it tries CUDA for NVIDIA cards, then Vulkan, then the CPU. On Linux the order is the same. AMD cards use Vulkan unless you switch on the ROCm build under Settings → Models.

CONTRIBUTING.md has the rest, and SECURITY.md covers reporting a vulnerability.

Suggest an edit