docs/architecture/overview.md
AionUi is an Electron app with three types of processes:
src/process/, src/index.ts) — application logic, database, IPC handling. No DOM APIs available.src/renderer/) — React UI. No Node.js APIs available.src/process/worker/) — background AI tasks (gemini, codex, acp workers).Cross-process communication must go through the IPC bridge.
src/preload.ts — exposes a secure contextBridge API to the renderersrc/renderer/messages/Located in src/process/webserver/.
AionUi can run in four modes. The WebSocket channel is the browser-side equivalent of Electron IPC — both transports reach the same bridge handlers and services.
start / cli (Electron desktop)
┌─────────────────────────────────────────────────────┐
│ Electron window Browser (optional WebUI) │
│ │ │ │
│ │ IPC │ WebSocket │
│ ▼ ▼ │
│ bridge handlers / services / DB │
└─────────────────────────────────────────────────────┘
webui (Electron, no window)
┌─────────────────────────────────────────────────────┐
│ (no Electron window) Browser │
│ │ │
│ │ WebSocket │
│ ▼ │
│ bridge handlers / services / DB │
│ + full Electron API (fsBridge, cronBridge, │
│ mcpBridge, notificationBridge …) │
└─────────────────────────────────────────────────────┘
server (pure Node.js, no Electron)
┌─────────────────────────────────────────────────────┐
│ (no Electron window) Browser │
│ │ │
│ │ WebSocket │
│ ▼ │
│ bridge handlers / services / DB │
│ (10 Electron-only bridges unavailable: │
│ fsBridge, cronBridge, mcpBridge, │
│ dialogBridge, shellBridge, applicationBridge,│
│ windowControlsBridge, updateBridge, │
│ webuiBridge, notificationBridge) │
└─────────────────────────────────────────────────────┘
Authentication flow (WebUI / server modes):
POST /login → JWT tokenLocated in src/process/services/cron/.
croner libraryCronService: task scheduling engineCronBusyGuard: prevents concurrent execution of the same job