Source: https://github.com/zarishsphere/zs-note
Blueprint specs: docs/ (39 Markdown files, read-only reference)
| Command | What it does |
|---|---|
pnpm dev |
Vite dev server only (port 1420) — no Tauri window |
pnpm tauri dev |
Full Tauri dev (Vite + native window) |
pnpm build |
vite build && tauri build — produces installer bundles |
pnpm typecheck |
tsc --noEmit |
pnpm lint |
tsc --noEmit && eslint src/ (no ESLint config exists yet) |
cargo test |
Rust unit + integration tests (from src-tauri/) |
cargo test --test integration |
Integration tests only |
cargo test --test integration <module> |
Single module: test_config, test_editor, test_git_engine, test_mcp_protocol, test_sandbox_executor, test_vector_store |
pip install -e ".[all]" |
Install Python ingestion CLI (from ingestion/) |
zarishnote-ingest |
Python CLI entry point |
pytest -v --tb=short |
Python tests (from ingestion/) |
ruff check src/ |
Python lint (from ingestion/) |
CI gate (run before push): cargo fmt --check && cargo clippy && cargo test && pnpm typecheck
Three disconnected sub-projects (no cross-building):
src/— Svelte 5 + TypeScript 6 frontendsrc-tauri/— Rust backend (Tauri v2, Wasmtime 45, LanceDB)ingestion/— Python CLI (MarkItDown + custom converters)
Each has its own test/lint config. CI runs all three as parallel jobs.
- Svelte 5 runes mode — stores use
.svelte.tsextension with$state,$derived,$effectrunes. Do not import fromsvelte/store. - Mount API:
import { mount } from 'svelte'— nonew App()orcreateApp. compilerOptions.runes: trueinsvelte.config.js— Svelte 4 legacy syntax will fail.- TypeScript 6 strictness:
noUncheckedIndexedAccess(array access returnsT | undefined),noImplicitOverride(must useoverridekeyword),noPropertyAccessFromIndexSignature,verbatimModuleSyntax(requiresimport typefor type-only imports). - Alias:
$lib/*→src/lib/*. - Svelte files included in tsconfig:
src/**/*.svelteandsrc/**/*.svelte.ts.
- Crate types:
["lib", "cdylib", "staticlib"]— needed for mobile (iOS/Android) targets. - Lib entry:
src-tauri/src/lib.rsexportspub fn run();main.rscalls it. - Devtools feature:
tauri = { features = ["devtools"] }— enables Tauri devtools in dev mode. - CSP:
nullintauri.conf.json— wide open for dev; restrict before release. - Voice feature gate:
#[cfg(feature = "voice")]on all voice commands. Cargo featurevoiceenablescpal,hound,rodio. Not in default set.whisper-rsis also optional but not gated behindvoice. - All Tauri commands registered manually in
invoke_handler!(generate_handler![...])atlib.rs:44-135. Adding a new command requires adding to this list. - Shared state via
AppStatestruct managed withArc<RwLock<...>>; injected via.manage(state). - Capabilities in
src-tauri/capabilities/default.jsoncontrol filesystem scope ($APPDATA,$RESOURCE,$HOME,$TEMP). - Tests never start Tauri, never make network calls, use
tempfile::TempDirfor filesystem ops. Unit tests co-located with source as#[cfg(test)].
- Install for dev:
pip install -e ".[all]"fromingestion/. - Test/lint from
ingestion/directory:pytest,ruff check src/. - Entry:
zarishnote_ingest.cli:main→ CLI binaryzarishnote-ingest.
cargo fmt --check # from src-tauri/
cargo clippy # from src-tauri/ (warnings allowed)
cargo test # from src-tauri/
pnpm typecheck # from repo root (frozen lockfile in CI)
ruff check src/ # from ingestion/ (warnings allowed)
pytest -v --tb=short # from ingestion/
- Active GH user: codeandbrain. Use
gh auth statusto verify. - Org: zarishsphere — repo origin is
git@github.com:zarishsphere/zs-note.git. - All org members (arwazarish, devopsariful, healthbgd, bgd-cpms) are the same person's aliases.
opencode.jsonand.agent/are gitignored — agent config is local-only, never committed.
- All AI tools, MCP servers, and plugins execute in Wasmtime sandbox with capability-based permissions. Never bypass.
- API keys go in OS Keychain (via
keyringcrate), never in config files or.env. - The editor core is Milkdown 7 (ProseMirror) — custom plugins use Milkdown's API, not ProseMirror directly.
.znrcis the workspace config file — parsed byserde_yamlin Rust; every setting has both GUI and.znrcequivalent.