app/ is a thin shell. It serves ui/ from the app bundle, holds one Service, and exposes one command.
#[tauri::command]
async fn rpc(app, svc, cmd: String, args: Value) -> Result<Value, String>
- Native dialogs (
join_vault,set_sync,export_markdown) are opened in Rust; the chosen path goes straight to the service and is never visible to the page. - The vault lives under the OS app-data directory, derived from the identifier
app.ctrlaltnotes.desktop(macOS~/Library/Application Support/, Windows%APPDATA%\\, Linux~/.local/share/). - The window locks on close and on exit.
- Files in the app-data directory:
vault/(default vault),settings.json(its preferences and sync target),app.json(theme and the vault folder chosen on the lock screen),vaults/<sha256(path)[:16]>.json(preferences and sync target of each chosen vault). None of these is secret, and none is authenticated: everything read from them is re-validated (a stored vault folder must still be empty or holdvault.json, a stored sync target must be outside the vault), otherwise it is ignored. open_vault_folderis refused while a vault is unlocked, both in the shell (before the dialog opens) and in the service.- The async command keeps blocking dialogs off the UI thread.
Configuration highlights (tauri.conf.json)
| Key | Value |
|---|---|
productName |
CtrlAltNotes |
identifier |
app.ctrlaltnotes.desktop |
app.security.csp |
default-src 'none'; script-src 'self'; style-src 'self'; img-src 'self' data: blob:; connect-src ipc: http://ipc.localhost; base-uri 'none'; form-action 'none'; frame-ancestors 'none' |
bundle.icon |
generated by brand/make_brand.py |
Capabilities
capabilities/default.json grants core:default and a scoped opener:allow-open-url (http, https, mailto only). No file-system or shell permissions.
Building
See Building. Output:
- macOS:
target/release/bundle/macos/CtrlAltNotes.appanddmg/… - Windows:
bundle/nsis/…-setup.exeandbundle/msi/… - Linux:
bundle/deb/…_amd64.deb,bundle/rpm/…x86_64.rpmandbundle/appimage/…_amd64.AppImage
Signing
Unsigned builds trigger Gatekeeper (macOS) and SmartScreen (Windows). Signing and notarisation need an Apple Developer account and a code-signing certificate; follow the Tauri distribution guides.
Status
The macOS app is built and used on macOS 14+. The Windows and Linux bundles are configured but have not yet been built on those systems; the CI workflow builds the desktop crate on all three.