Files
Toju/electron
myxelium e49b3ec112 chore: dev-stack switches, shared e2e harness, and desktop shell rules
- `LIVE_RELOAD=false npm run dev` keeps the renderer alive across a machine
  suspend; the reload client otherwise destroys the session under test.
- `dev-peer.sh` plus a separate userdata dir runs a second local peer.
- `tools/voice-probe.js` samples peer state and RTP counters from a live
  window, persisting to localStorage so a renderer reload cannot erase it.
- e2e helpers for voice pairs, peer-role election, and a TURN relay.
- Electron single-instance and dev-client-load decisions move into rules
  files with colocated specs.
2026-08-14 03:19:29 +02:00
..
2026-06-09 17:59:54 +02:00
2026-06-05 18:34:01 +02:00
2026-06-05 18:34:01 +02:00
2026-06-05 18:34:01 +02:00
2026-06-05 18:34:01 +02:00
2026-05-23 15:28:40 +02:00
2026-06-12 01:22:01 +02:00
2026-04-29 01:14:14 +02:00
2026-04-29 01:14:14 +02:00
2026-05-17 17:47:40 +02:00
2026-04-02 03:18:37 +02:00

Electron Shell

Electron main-process package for MetoYou / Toju. This directory owns desktop bootstrap, the preload bridge, IPC handlers, desktop persistence glue, updater integration, and window-level behavior.

Commands

  • npm run build:electron builds the Electron TypeScript output to dist/electron.
  • npm run electron builds the product client and Electron, then launches the desktop app.
  • npm run electron:dev starts the Angular client and Electron together.
  • npm run dev starts the full desktop stack: server, Angular client, and Electron.
  • npm run electron:build, npm run electron:build:win, npm run electron:build:mac, and npm run electron:build:linux create packaged desktop builds.

Structure

Path Description
main.ts Electron app bootstrap and process entry point
preload.ts Typed renderer-facing preload bridge
process-list.ts Linux/Windows process-name scan used as a fallback when foreground detection is unavailable
game-detection/ Foreground-window detection (get-windows + Hyprland/Sway fallbacks) plus pure heuristics scoring and ignore-list filtering
app/ App lifecycle and startup composition
ipc/ Renderer-invoked IPC handlers
cqrs/ Local database command/query handlers and mappings
db/, entities/, migrations/ Desktop persistence and schema evolution
audio/ Desktop audio integrations
update/ Desktop updater flow
window/ Window creation and window-level behavior

Notes

  • When adding a renderer-facing capability, update the Electron implementation, preload.ts, and the renderer bridge in toju-app/ together.
  • Plugin client data is stored in the local Electron SQLite database in the dedicated user-scoped plugin_data table. Renderer plugins reach it through CQRS commands/queries exposed by the preload bridge; the signal server must not be used for arbitrary plugin data persistence.
  • Treat dist/electron/ and dist-electron/ as generated output.
  • See AGENTS.md for package-level editing rules.