// Parking System desktop shell — entry point. // // Intentionally minimal: build the default Tauri app and run it. The window // config (kiosk, fullscreen, which URL/assets to load) lives in tauri.conf.json. // No custom commands are registered — the renderer (the @parking/web SPA) reaches // the backend over HTTP to a Fastify server (address operator-configured at // runtime, not baked in — see apps/web/src/lib/backend-config.ts), NOT through // Tauri IPC. This keeps the shell a thin presentation wrapper with a // deny-by-default native surface (see wiki/decisions/desktop-shell-tauri.md). #[cfg_attr(mobile, tauri::mobile_entry_point)] pub fn run() { tauri::Builder::default() // Auto-update: the JS side (apps/web) checks on launch, prompts the // operator, and installs + relaunches on confirm. These plugins expose // the update check/install and the relaunch to that flow. The updater // endpoint + signing pubkey live in tauri.conf.json. .plugin(tauri_plugin_updater::Builder::new().build()) .plugin(tauri_plugin_process::init()) // Routes the SPA's fetch()/WS calls to the operator-configured Fastify // server through Tauri's native HTTP client — see the Cargo.toml // comment on why the webview's own fetch() can't reach it directly. .plugin(tauri_plugin_http::init()) // Live-feed WebSocket — same mixed-content reason as the HTTP plugin // above, but WS needs its own plugin (separate browser check). .plugin(tauri_plugin_websocket::init()) // Persists the operator-configured backend URL across restarts (JSON // file in the app's config dir) — see backend-config.ts. .plugin(tauri_plugin_store::Builder::new().build()) .run(tauri::generate_context!()) .expect("error while running the Parking System desktop shell"); }