(01) Source repository.
Not a binary download.

Docs

Everything you need to run and read SAAR.

SAAR is a source repository, not a complete binary distribution. This page covers setup, how the pieces fit, how to verify a checkout, and where the project honestly stands.

Overview

SAAR is an offline desktop workspace for financial documents, exact calculations, reconciliation and local AI. It extracts and organises evidence from invoices, receipts and bank rows, matches related transactions, calculates totals in integer minor units, and lets you open the source behind a result.

  • Desktop first. Tauri 2, Rust, React and TypeScript.
  • Local intelligence. Qwen3 4B through llama.cpp, with GPU offload and a CPU fallback when the runtime is available.
  • Traceable answers. Verified figures are calculated from records. Generated prose is identified separately.
  • Exact money. Amounts are signed integer minor units, never binary floating point.
  • Private by design. The web view's content security policy sets connect-src to 'none'.

Prerequisites

  • Node.js and pnpm for the interface.
  • Rust and the platform's Tauri 2 build prerequisites for the desktop shell.
  • On Windows: the Visual Studio C++ build tools and WebView2.
  • A compatible local llama-cli binary and Qwen3 4B GGUF weights for chat and classification.
  • The OCR worker and its models for scanned documents.

Install and run

Clone the repository, install the frontend dependencies and launch the desktop shell in development mode. Without the model and sidecars the core workspace still starts, but local model features are unavailable.

Terminal · PowerShell or bash
git clone https://github.com/THE-SHRIKS/SAAR-LokiXPiyush.git
cd SAAR-LokiXPiyush
pnpm install --frozen-lockfile
cargo install tauri-cli --version '^2' --locked
cargo tauri dev

Model and sidecars

Model weights and native sidecars are not committed to Git. The app looks for them relative to the checkout.

  • Windows binary: bin/llama/llama-cli.exe
  • Unix binary: bin/llama/llama-cli
  • Model: models/weights/Qwen3-4B-Q4_K_M.gguf
  • Expected SHA-256: 7485fe6f11af29433bc51cab58009521f205840f5b4ae3a32fa7f92e8534fdf5

The active model path and hash are recorded in the Rust runtime source, which is the source of truth where older documents differ.

src-tauri/src/ai/llm_engine.rs

Using SAAR

  1. Create a workspace. Choose a passphrase. It derives the workspace key and is never written to disk.
  2. Import evidence. Add PDFs, images and statement CSVs. Files are de-duplicated by content hash.
  3. Inspect sources. Open the evidence inspector to read an extracted field beside its original document.
  4. Run reconciliation. Review proposed links and flagged anomalies. Approve, reject or correct each one.
  5. Ask questions. Answers are calculated from your records and cited. Model prose is labelled as not verified.
  6. Report and back up. Export CSV or PDF reports, and create encrypted backups you can restore into a fresh profile.

See the product page for how each step works.

Data and configuration

  • Each workspace is its own SQLCipher database, with encrypted document storage beside it.
  • SAAR_DATA_DIR relocates workspace data for portable or isolated runs.
  • Backups are authenticated archives. A wrong passphrase or a tampered archive is rejected.
  • Logs are scrubbed of credentials, card numbers and personal identifiers.

The security page links each mechanism to its implementing file.

Windows build

The Windows guide covers the native toolchain and packaging: building the llama.cpp and OCR sidecars, and producing the Tauri 2 offline installer. The project's ledger records an offline Windows acceptance run for its own release.

Docs/WINDOWS_BUILD_GUIDE.md scripts/windows_build_all.ps1

Verify a checkout

The repository includes fixtures and evidence under tests/ and Docs/evidence/. Some native and GUI checks need the model, the OCR sidecar and platform tooling.

Terminal · from the repository root
pnpm test
pnpm run build
pnpm run lint
cargo test --manifest-path src-tauri/Cargo.toml
cargo fmt --manifest-path src-tauri/Cargo.toml --check

A successful source build alone does not verify an installer or a disconnected target machine.

Repository map

Project status

The repository keeps a status ledger, last updated 2026-10-22. It records these eight gates as signed off, each with its own evidence there.

STATUS.md

  1. G0Feasibility and runtime baselineDesktop shell, local OCR on a real scan, offline model inference, threat model and test fixtures.Signed off
  2. G1Native shell and storageEncrypted workspace keys, SQLCipher migrations, no network.Signed off
  3. G2Document ingestionReal files to extracted records with page and field provenance.Signed off
  4. G3Financial coreExact currency math, reconciliation, duplicate detection, review lifecycle.Signed off
  5. G4Grounded local AIOffline llama.cpp, fact packets, source citations, injection defence.Signed off
  6. G5Editorial interfaceConversation, evidence inspector, import, review, reports, settings.Signed off
  7. G6Reliability and backupTraceable exports, encrypted backup and restore, offline egress denial.Signed off
  8. G7Native Windows releaseWindows sidecars, installer and an offline regression sign-off.Signed off
  • Phase 0Feasibility and toolchain: desktop shell, OCR on a real scan, offline inference, threat model.Completed
  • Phase 1Native shell and storage: encrypted workspace keys, SQLCipher, blob store, restrictive web view policy.Completed
  • Phase 2Ingestion: PDF and image pipeline, CSV mapper, normaliser, de-duplication.Completed
  • Phase 3Financial core: exact money, matching, anomalies, review lifecycle, aggregates.Completed
  • Phase 4Local AI: llama.cpp runtime, grounding, constrained classification, injection defence.Completed
  • Phase 5Interface: conversation, evidence inspector, review, reports, settings.Completed
  • Phase 6Reliability: traceable exports, encrypted backup, log scrubbing, offline audit.Completed
  • Phase 7Native Windows release: sidecars, installer, offline regression sign-off.Completed

Known limitations

Read these before relying on SAAR.

  • No project licenceThe repository has no root LICENSE file, so no project-wide open-source licence is asserted. Third-party notices are collected separately.
  • Source, not a downloadSAAR is a source repository. Model weights and native sidecars are excluded from Git and have to be provided separately.
  • Older documents differSome release and model-manifest documents describe earlier builds. The active model path and hash are in the Rust runtime source.
  • A helper is not wired inThe newly added runtime paths helper is not yet connected to application startup.
  • No independent auditThe security claims come from the project's own threat model, tests and egress audit. No external audit is cited.
  • Verify the target machineA successful source build does not by itself verify an installer or a disconnected target machine.

Licence and notices

The repository currently has no root licence file, so no project-wide open-source licence is asserted. Third-party component notices are collected in the attributions file. SAAR is built by THE SHRIKS.

Docs/ATTRIBUTION.md

Open the repository