Desktop App Boundary
Boundary Summary
The MdWrk desktop app packages the same client workspace behind a native shell. The client remains the authoring surface, while the desktop shell owns host-only responsibilities such as native windows, file-open handoff, folder selection, and build targets.
The boundary is visible in the repository:
apps/clientowns the browser workspace experience.apps/desktopowns Electron and native shell packaging.apps/desktop/src/preload.tsexposes the narrow host bridge.apps/desktop/src/main.tsowns native process behavior.
What Belongs In The Client
The client owns Markdown editing, preview, settings, extension hosting, PWA version state, project selection, and browser-backed persistence. Code that can run in a normal web runtime should stay in the client or reusable packages.
What Belongs In The Desktop Shell
The desktop shell owns native capabilities that the web runtime cannot provide directly:
- opening Markdown files from the operating system
- mounting a desktop folder as a workspace source
- packaging Windows, Linux, macOS, and Android targets
- exposing host APIs through the preload bridge
Desktop features should cross into the client through explicit bridge methods instead of importing native modules into client code.
Operator Commands
npm run build:desktop
npm run build:desktop:dist
npm run build:desktop:win
npm run build:desktop:linux
npm run build:desktop:macThe release scripts under tools/ci select the desktop or Android build path from the same workspace package graph.