Getting Started
This chapter gets a new contributor from a fresh clone to a running development build.
Prerequisites
Section titled “Prerequisites”| Tool | Why | Notes |
|---|---|---|
| Rust (stable) | Backend, all workspace crates | Install via rustup. The pinned toolchain is set in the workspace Cargo.toml (rust-version). |
| Node.js (LTS) + npm | Frontend (Vite, React, TypeScript) | Any current LTS works. |
| Tauri CLI | Build/run the desktop app | cargo install tauri-cli (or use npm run tauri). |
| System WebView | Tauri’s renderer | WebView2 on Windows, WebKitGTK on Linux, WKWebView on macOS. See the Tauri prerequisites. |
Clone and set up
Section titled “Clone and set up”git clone https://github.com/Timtam/aperiocd aperio
# Frontend dependenciesnpm install
# Rust dependencies are fetched on first build.Run a development build
Section titled “Run a development build”# Starts Vite + the Tauri shell with hot-reload.npm run tauri dev# (equivalent to `cargo tauri dev`)The first build compiles the whole Rust workspace and can take a while; subsequent builds are incremental.
Commands you’ll use daily
Section titled “Commands you’ll use daily”Frontend (package.json scripts):
npm run dev # Vite dev server only (no Tauri shell)npx tsc --noEmit # TypeScript type-checknpm run lint # ESLint (.ts/.tsx)npm run test # Vitest (unit tests)npm run build # tsc --noEmit && vite build (what CI runs)Backend / workspace:
cargo test --workspacecargo clippy --workspace --all-targets -- -D warnings # exactly what CI runscargo fmt --all -- --check # CI's first gateMatch CI locally. CI runs
clippy --workspace --all-targets -D warnings, which lints test code too and fails on any warning. A plaincargo clippyskips test targets and can pass while CI fails. Always run the full command above (andcargo fmt --all -- --check) before pushing.
Where do I start?
Section titled “Where do I start?”Pick the layer that matches your interest:
| You want to work on… | Start in… |
|---|---|
| Domain types & traits shared by everything | crates/cal-core |
| The host: Tauri commands, DB, sync, plugin host | src-tauri/src |
| The UI | src/ (React/TS) |
| A specific provider (Google, iCloud, …) | crates/adapter-* — see Adapters |
| The sync engine (event log, CRDT-ish merge) | crates/sync-core, src-tauri/src/event_log, src-tauri/src/sync |
| Writing a new provider as a plugin | the Plugin Developer docs |
The Architecture chapter explains how these pieces talk to each other.