Scaffold Aurora Dockside with electron-vite + React + TypeScript

Base template for a from-scratch DDEV desktop manager (Electron instead
of Tauri), built incrementally per the approved project plan.
This commit is contained in:
R3ap3R
2026-08-02 23:16:26 -05:00
commit 5a3315eff6
34 changed files with 6307 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
import { contextBridge } from 'electron'
import { electronAPI } from '@electron-toolkit/preload'
// Custom APIs for renderer
const api = {}
// Use `contextBridge` APIs to expose Electron APIs to
// renderer only if context isolation is enabled, otherwise
// just add to the DOM global.
if (process.contextIsolated) {
try {
contextBridge.exposeInMainWorld('electron', electronAPI)
contextBridge.exposeInMainWorld('api', api)
} catch (error) {
console.error(error)
}
} else {
// @ts-ignore (define in dts)
window.electron = electronAPI
// @ts-ignore (define in dts)
window.api = api
}