www/docs/development/architecture.md
This guide explains how Wox is split across the repository and how data moves through the app at runtime.
Wox is a desktop launcher with a Go core and a Flutter desktop UI. Third-party plugins do not run inside the Go process directly. They run inside dedicated language hosts and communicate with the core over WebSocket-based JSON-RPC.
At a high level:
Flutter UI <-> wox.core <-> plugin hosts <-> plugins
wox.corewox.core is the runtime center of Wox. It is responsible for:
Areas worth knowing early:
wox.core/plugin/: plugin contracts, manager, query/result models, host bridgewox.core/common/: shared UI payloads and common runtime typeswox.core/setting/: setting definitions and persistencewox.core/resource/: embedded UI, host binaries, translations, other runtime resourceswox.ui.flutter/woxThis is the desktop UI that users see. It renders:
The UI talks to wox.core over WebSocket and HTTP. It does not own plugin execution. Its job is to render state, send user intent back to the core, and host platform-specific presentation logic.
wox.plugin.host.nodejs and wox.plugin.host.pythonThese are long-lived host processes for full-featured plugins. They:
~/.wox/pluginswox.coreThis host layer is where SDK/runtime compatibility matters. If a plugin API shape changes, the core, host, and SDK types need to stay aligned.
wox.plugin.nodejs and wox.plugin.pythonThese are the SDKs used by third-party plugin authors. They provide:
When a user types in Wox:
wox.corewox.core decides which built-in plugins and third-party plugins should runWhen a user triggers a result action:
wox.corewox.core resolves whether the action belongs to a built-in plugin or a hosted pluginUpdateResult, PushResults, RefreshQuery, Notify, or HideAppSome flows start from a plugin instead of the launcher UI. For example:
The plugin calls the SDK API, the host forwards the request to wox.core, and the core coordinates the UI or native platform behavior.
Understanding the ownership boundary saves a lot of debugging time:
wox.core.wox.ui.flutter/wox.The top-level Makefile is the entrypoint for cross-project development:
make dev: prepare shared resources and build plugin hostsmake test: run the Go test suite under wox.core/testmake smoke: run desktop smoke tests from wox.testmake build: build the full application and packaging outputsFor changes that touch shared contracts, make build is the verification step that matters most.
Wox stores runtime data under the user's home directory:
~/.woxC:\Users\<username>\.woxUseful locations:
~/.wox/plugins/: local third-party plugins~/.wox/log/: runtime logsWhen debugging plugin or UI issues, start from the logs and the exact boundary where the failure happens rather than guessing which layer is wrong.