Description
Dots Desktop can connect the same renderer to three deployment choices: Dots-hosted service, a user-operated self-hosted server, or the full Dots instance bundled on the current machine. The selection is resolved at launch from an explicit support override, the user’s persisted choice, or the distribution default. Buyer builds default to bundled local operation, while internal builds default to hosted operation.
Changing the backend is a controlled lifecycle action. The main process validates self-hosted URLs, persists the chosen mode, starts or stops the embedded daemon when the bundled choice changes, and relaunches the shell against the selected API. Switching away from the bundled backend never deletes its data, so returning later resumes the same local instance.
Selling Points
- One desktop client serves cloud, private-server, and fully local deployment preferences, reducing lock-in without fragmenting the product.
- Backend selection happens at runtime, so one installer remains useful as infrastructure and privacy requirements change.
- Local data survives a temporary move to hosted or self-hosted service, making evaluation and migration less risky.
- Remote self-hosted endpoints require HTTPS, while plaintext HTTP is accepted only for loopback development, preventing accidental insecure configuration.
- Distribution defaults fit the audience while still preserving an explicit user choice.
User Story
A buyer installs Dots Desktop and begins with the bundled instance because their work must stay on the laptop. Later, their company deploys a shared private server. They enter its HTTPS URL in Backend settings, relaunch, and sign in to that server. Months later they can switch back to bundled mode and find the original local workspace intact.
Extension Surface
This feature is configurable. apps/desktop/src/main/desktop-backend.ts defines the supported selections and their precedence, while apps/desktop/src/main/backend-selection-ipc.ts exposes a narrow settings bridge for reading and persisting a validated choice. There is no external registration point for inventing a fourth backend kind; users configure one of the shipped modes.
Capabilities & Limits
- Supports hosted, arbitrary HTTPS self-hosted, and bundled loopback backends.
- Preserves the bundled data directory across mode switches and handles daemon start/stop automatically.
- Allows environment overrides for support and controlled deployment scenarios.
- Limit: a selection takes effect after relaunch rather than hot-swapping an active renderer session.
- Limit: buyer builds do not offer the internal hosted backend as a selectable product choice.
Implementation Map
apps/desktop/src/main/desktop-backend.tsapps/desktop/src/main/desktop-mode-store.tsapps/desktop/src/main/backend-selection-ipc.tsapps/desktop/src/main/daemon.ts