Architecture
Duckling is a Tauri 2 desktop app: a Rust backend (src-tauri) with a connector crate for database dialects, and a React + TypeScript frontend.
Repository layout
- New Tauri commands: implement in
src-tauri, register inmain.rs, expose thin wrappers insrc/api.ts. - Keep IPC DTOs serializable and free of secrets unless going through
secret_store. connectorholds small, tested pure functions for dialect SQL/behavior.
Persistence & secrets
Durable app data lives under the Tauri app data dir (Windows: %APPDATA%\com.duckling.dev\).
Secrets are never stored in plain connection profiles or localStorage-only blobs; passwords live in the OS keyring.
SQL template variables
Templates are rendered on the backend (Rust + minijinja) with UndefinedBehavior::Strict and AutoEscape::None; the frontend provides pure helpers (src/lib/sql/macros.ts) for YAML block formatting and dialog merging. See SQL Templates.

