originv0.2.1

CASOON Open Source

Desktop apps that stop reinventing the platform.

Origin is a starting point for desktop applications in Rust and Tauri. Sign-in, storage, sync, background jobs, notifications, permissions and the project structure are already there, tested and shared, so a new product starts with its own features instead of the plumbing.

git clone https://github.com/casoon/origin
cargo add origin-app origin-tauri
pnpm add @casoon/origin-client @casoon/origin-ui
MITv0.2.1Rust 1.88+Tauri 2
Terminal: cargo xtask new my-app --into .. prints 'generated files for app.toml' and 'created ../my-app', then the next steps cd ../my-app, pnpm install and cargo tauri dev, and a reminder to replace the placeholder icons in src-tauri/icons before shipping.

Who it is for

crates on crates.io, all at 0.2.1
29
binding rules in ARCHITECTURE.md
15
architecture decision records
31
named security profiles instead of permission lists
4

What you get

How it works

Tauri is only the host. Your application is a set of Rust modules, put together in one function, the composition root. The desktop window, an AI client and your tests all drive that same application.

Below it, the Origin crates provide sign-in, sync, jobs and storage against small traits. Adapters fill those traits with SQLite, the system keychain and native notifications, and each one can be swapped without touching your features.

How an Origin application is put togetherThe Svelte views talk to the Tauri host only through the typed client @casoon/origin-client. The host, an MCP adapter for AI clients and headless tests all drive the same application: your modules, assembled in one composition root. The application uses the Origin platform crates, which depend only on the platform contracts. Adapters implement those contracts with SQLite, the OS credential store, reqwest and native notifications.How an Origin application is put togetherSvelte views → Tauri host: typed IPCAI client → MCP adapterTauri host → Your applicationMCP adapter → Your applicationTests → Your applicationYour application → Origin platformOrigin platform → Platform contractsPlatform contracts → Adapters: implemented bytyped IPCimplemented bySvelte views – @casoon/origin-clientSvelte views@casoon/origin-clientAI client – the user's ownAI clientthe user's ownTests – in_memory(), no TauriTestsin_memory(), no TauriTauri host – origin-tauriTauri hostorigin-tauriMCP adapter – stdio or loopback HTTPMCP adapterstdio or loopback HTTPYour application – composition root, modulesYour applicationcomposition root, modulesOrigin platform – auth, sync, jobs, storageOrigin platformauth, sync, jobs, storagePlatform contracts – traits, no TauriPlatform contractstraits, no TauriAdapters – SQLite, keychain, HTTPAdaptersSQLite, keychain, HTTP
How an Origin application is put togetherThe Svelte views talk to the Tauri host only through the typed client @casoon/origin-client. The host, an MCP adapter for AI clients and headless tests all drive the same application: your modules, assembled in one composition root. The application uses the Origin platform crates, which depend only on the platform contracts. Adapters implement those contracts with SQLite, the OS credential store, reqwest and native notifications.How an Origin application is put togetherSvelte views → Tauri host: typed IPCAI client → MCP adapterTauri host → Your applicationMCP adapter → Your applicationTests → Your applicationYour application → Origin platformOrigin platform → Platform contractsPlatform contracts → Adapters: implemented bytyped IPCimplemented bySvelte views – @casoon/origin-clientSvelte views@casoon/origin-clientAI client – the user's ownAI clientthe user's ownTests – in_memory(), no TauriTestsin_memory(), no TauriTauri host – origin-tauriTauri hostorigin-tauriMCP adapter – stdio or loopback HTTPMCP adapterstdio or loopback HTTPYour application – composition root, modulesYour applicationcomposition root, modulesOrigin platform – auth, sync, jobs, storageOrigin platformauth, sync, jobs, storagePlatform contracts – traits, no TauriPlatform contractstraits, no TauriAdapters – SQLite, keychain, HTTPAdaptersSQLite, keychain, HTTP
How an Origin application is put togetherThe Svelte views talk to the Tauri host only through the typed client @casoon/origin-client. The host, an MCP adapter for AI clients and headless tests all drive the same application: your modules, assembled in one composition root. The application uses the Origin platform crates, which depend only on the platform contracts. Adapters implement those contracts with SQLite, the OS credential store, reqwest and native notifications.How an Origin application is put togetherSvelte views → Tauri host: typed IPCAI client → MCP adapterTauri host → Your applicationMCP adapter → Your applicationTests → Your applicationYour application → Origin platformOrigin platform → Platform contractsPlatform contracts → Adapters: implemented bytyped IPCimplemented bySvelte views – @casoon/origin-clientSvelte views@casoon/origin-clientAI client – the user's ownAI clientthe user's ownTests – in_memory(), no TauriTestsin_memory(), no TauriTauri host – origin-tauriTauri hostorigin-tauriMCP adapter – stdio or loopback HTTPMCP adapterstdio or loopback HTTPYour application – composition root, modulesYour applicationcomposition root, modulesOrigin platform – auth, sync, jobs, storageOrigin platformauth, sync, jobs, storagePlatform contracts – traits, no TauriPlatform contractstraits, no TauriAdapters – SQLite, keychain, HTTPAdaptersSQLite, keychain, HTTP
How an Origin application is put togetherThe Svelte views talk to the Tauri host only through the typed client @casoon/origin-client. The host, an MCP adapter for AI clients and headless tests all drive the same application: your modules, assembled in one composition root. The application uses the Origin platform crates, which depend only on the platform contracts. Adapters implement those contracts with SQLite, the OS credential store, reqwest and native notifications.How an Origin application is put togetherSvelte views → Tauri host: typed IPCAI client → MCP adapterTauri host → Your applicationMCP adapter → Your applicationTests → Your applicationYour application → Origin platformOrigin platform → Platform contractsPlatform contracts → Adapters: implemented bytyped IPCimplemented bySvelte views – @casoon/origin-clientSvelte views@casoon/origin-clientAI client – the user's ownAI clientthe user's ownTests – in_memory(), no TauriTestsin_memory(), no TauriTauri host – origin-tauriTauri hostorigin-tauriMCP adapter – stdio or loopback HTTPMCP adapterstdio or loopback HTTPYour application – composition root, modulesYour applicationcomposition root, modulesOrigin platform – auth, sync, jobs, storageOrigin platformauth, sync, jobs, storagePlatform contracts – traits, no TauriPlatform contractstraits, no TauriAdapters – SQLite, keychain, HTTPAdaptersSQLite, keychain, HTTP

Quickstart

Run the reference application: a tray app with a background loop, cached readings, typed events, native notifications and a Svelte 5 frontend.

  1. Install Rust 1.88+, Node 22+, pnpm 10+ and the Tauri CLI.
  2. Clone the repository and run pnpm install.
  3. Start the demo with cargo xtask demo, then read its composition root.
terminalShell
git clone https://github.com/casoon/origin
cd origin
pnpm install
cargo xtask demo

New in v0.2.1

Changelog →

Frequently asked questions

Is Origin a framework that replaces Tauri?

No. Tauri stays the desktop host; Origin is a set of architecture rules, reusable platform crates and security conventions on top of it, plus a reference application that shows how they fit together.

Can I test my application without starting the desktop app?

Yes — domain code never depends on an AppHandle, only on traits. ApplicationBuilder::in_memory() lets the whole application run in a unit test with a fake clock and a recording notification service.

How can an AI client interact with an app built on Origin?

Through MCP, over stdio or authenticated loopback HTTP, with a permission level of its own that defaults to read/propose only. Commit and delete calls need both an explicit grant and a human confirmation.

Is Origin ready for production use?

It is pre-1.0, so a minor release may still change the public API. The architecture contract, platform contracts, OAuth, sync engine and reference application are implemented; the signed release pipeline exists but hasn't been exercised end to end for a real product yet.