Dev Build Log
DevPeek Architecture: Dropping Electron for Tauri
The shell is the last place a debugging proxy should bloat
DevPeek's core is a local proxy: HTTPS decryption, Mock, param transform, breakpoints, and page debugging. That already eats CPU, holds ports, and runs for hours—the previous dev log covered storage changes we made specifically so the proxy could stay up all day.
Early desktop builds carried extra weight: a full Electron stack (another Chromium) just to host the main window, tray, and a few system dialogs. The proxy was working; the shell was always resident too—Task Manager often showed "the tool" and "the shell" stacked on memory.
Fine for a browser extension or something you open once in a while. For a proxy you turn on in the morning and leave until evening, a heavy shell becomes daily overhead.
Split business logic first, swap the shell second
We didn't "delete Electron" overnight. The migration came in three steps:
- Business into Core: proxy, rules, certs, config, and capture storage moved into a dedicated Core process (Gateway + engine). The UI talks to it over HTTP and WebSocket.
- Tray split into Launcher (around v1.1.7): system tray, mode switching, starting and watching Core—no longer tied to Electron's main process. Close the main window and the proxy in Core keeps running.
- Thin desktop shell: the main window only loads Core-hosted Web UI, plus window chrome, external links, file dialogs, and other OS-facing bits.
By step three, Electron felt like overkill: business logic was already out of the shell, yet we still packaged a full Chromium for windows—and kept fighting native module ABI, antivirus false positives, and install size.
From v1.2.1, the desktop shell is Tauri 2: system WebView for the same UI, no bundled Chromium.
What it looks like now
Launcher manages processes, Core runs the business, and the UI has two entry points—Standard mode through the Tauri shell, Lite mode through the system browser:
| Layer | Role |
|---|---|
| Launcher | Tray, start/stop Core, switch Lite / Standard mode |
| Core | Proxy and all business capabilities |
| Tauri Shell (Standard) | Thin desktop window: load Core URL, frameless controls, replay window, system dialogs, etc. |
| Browser Lite | System browser opens the same Core URL—no desktop shell; for when you only want the Web UI or prefer not to keep another desktop window open |
Both modes load the same Web UI. The difference is who opens the window—Tauri shell or a browser tab—not two product stacks. After Tauri, that split is clearer: Shell serves Standard mode only; Lite never needed embedded Chromium in the first place.
Engineering-wise, the Shell tree stays small—no business logic in Rust, just windows and a few OS bridges. Capture, Mock, and cert trust still follow the paths you already know: Install & preferences and Proxy & SSL certificates.
Pitfalls while swapping shells
This wasn't a one-line packaging change. Window behavior and OS integration had to be rebuilt—otherwise the "desktop app" parts break first:
- Maximize / minimize / close: frameless controls re-wired for the new shell; after closing the main window, you should still reopen and focus from the tray.
- External links & save file: links open in the default browser; saving text uses system dialogs, not the old IPC path.
- Recording replay: local recording files must open and import into the replay window—offline review can't break because the shell changed.
- Install & update (Windows): detect running processes before install, bundle required runtimes, in-app updates pull full installers—the release path had to stay solid after the shell swap.
See changelog 1.2.1 for the full list. If window behavior looks off after upgrading, check that release first.
What you should notice after the change
- Lighter shell: the main window no longer bundles Chromium; same "DevPeek running all day" use, leaner background footprint.
- Closing the window doesn't stop the proxy: Launcher owns Core; closing the main window just hides the UI—open it again from the tray when you need it, closer to "proxy in the background."
- Lite and Standard feel aligned: Lite is still the same UI in a browser; Standard just uses a thinner desktop shell.
- Install and update steadier: same familiar Windows installer name and update flow, with shell size and dependencies rebuilt around Tauri.
In short: we want DevPeek heavy where it matters (proxy, rules, history, debugging)—not heavy just to show a local web page.
Same thread as the last dev log
Why we moved capture history from sql.js to native SQLite tackled memory and lag over long sessions.
This shell swap tackles carrying a full browser just to open a window—both aim at the same goal: during long debugging days, the tool stays out of your way.
If you've upgraded from an Electron-era build, try a long session and watch memory plus close-window / tray behavior. Something off? GitHub Discussions—OS version, Lite vs Standard, roughly how long you leave it on helps us compare notes.
Related docs
Download the latest DevPeek and try Standard mode with tray residency; or open the same UI in Lite / browser mode first if you want to explore before committing to the desktop shell.