A TRS quote tool for personal use only.
  • TypeScript 54.1%
  • Rust 39.9%
  • CSS 5.7%
  • HTML 0.3%
Find a file
2026-07-14 17:53:08 -04:00
docs/handoff docs: session handoff for MVP ship 2026-07-03 20:50:32 -04:00
reference feat: TRS Quote Tool — local-first Tauri desktop quote app 2026-07-03 20:13:24 -04:00
trs-quote-tool feat: TRS Quote Tool — local-first Tauri desktop quote app 2026-07-03 20:13:24 -04:00
.gitignore docs: end-user guide in README, ignore .claude cache 2026-07-03 20:25:30 -04:00
CLAUDE.md docs: add CLAUDE.md for Claude Code 2026-07-03 20:48:58 -04:00
README.md docs: add terminal + git clone steps to build instructions 2026-07-14 17:49:25 -04:00

TRS Quote Tool

Local-first desktop quote automation for Thermal Recovery Systems. Replaces the 03-TRS Write Up Tool.xlsx workflow: import the stock part list, build quotes, generate customer-facing PDFs, prepare emails — all data stays on your machine.

Stack

  • Tauri 2 desktop shell (Windows + macOS; Linux builds but is untested)
  • React + Vite + TypeScript (strict) frontend
  • Rust command layer with input validation
  • SQLite (bundled via rusqlite, WAL mode, versioned migrations)
  • calamine for Excel import, jsPDF for PDF generation
  • Money is integer cents everywhere — never floats, never in the DB as decimals

Key business rules enforced in code

  • Customer-facing PDFs show sale price only. Cost/margin/override data is stripped by a whitelisted DTO (src/lib/customerQuote.ts), verified by a runtime guard and unit tests — a leaked cost*/margin* key throws.
  • Blank / Call / CAll / non-numeric prices are never treated as zero; they import as call_vendor/unavailable and render as "Call" on the quote.
  • Generated PDFs are immutable: Quote-{number}-{customer}-{date}-v{n}.pdf, written with create_new (can never overwrite), version auto-increments.
  • Manual price overrides are normal — checkbox + reason, logged to the audit trail.

Layout

trs-quote-tool/
  src/                  React frontend
    lib/                money, calculations, customer DTO, pdf, api (+tests)
    pages/              Quotes, QuoteEditor, Customers, Pricebook, Audit, Settings
  src-tauri/
    migrations/         SQL migrations (user_version-based)
    src/
      db.rs             open/migrate/audit helpers
      money.rs          price-cell parsing (+tests)
      excel.rs          stock part list import (+tests incl. real workbook)
      commands/         settings, pricebook, customers, quotes, documents, email, backup
    tests/fixtures/     copy of the real TRS workbook used by tests
reference/              original Excel workbook

Data locations

  • Database: app data dir (~/Library/Application Support/com.trs.quote-tool/ on macOS, %APPDATA%\com.trs.quote-tool\ on Windows)
  • PDFs: Documents/TRS Quotes/Generated Quotes/ (configurable in Settings)
  • Backups: timestamped folder you pick (works with OneDrive/Dropbox/USB); restore from Settings

Install

There are two ways to get the app, depending on what you were handed.

  • Someone sent you an installer file (.dmg, .exe, .AppImage, .deb) → do Part 1. Takes two minutes, nothing to install beyond the app itself.
  • You have the source code and no installer → do Part 2, which walks through installing the build tools (Node and Rust) from scratch. Takes 2030 minutes, most of it waiting on downloads. You only ever do this once per computer.

The app is unsigned — we haven't paid Apple/Microsoft for a code-signing certificate. Both operating systems will warn you the first time you open it. That warning means "we can't verify who made this," not "this is malware." The steps below tell you how to get past it. It only happens on the first launch.

Part 1 — you have an installer file

Windows (TRS Quote Tool_0.1.0_x64-setup.exe)

  1. Double-click the .exe.
  2. A blue "Windows protected your PC" box appears. Click More info, then Run anyway.
  3. Click through the installer. The app lands in your Start menu as "TRS Quote Tool".

macOS (TRS Quote Tool_0.1.0_aarch64.dmg)

  1. Double-click the .dmg, then drag TRS Quote Tool onto the Applications folder shortcut in the window that opens.
  2. Open your Applications folder, right-click (or Control-click) TRS Quote Tool and choose Open — don't just double-click it, or macOS won't offer you the "Open anyway" button.
  3. Click Open in the dialog. From now on you can launch it normally.

If macOS says the app "is damaged and can't be opened," that's the quarantine flag on a downloaded unsigned app. Open Terminal and run:

xattr -dr com.apple.quarantine "/Applications/TRS Quote Tool.app"

Linux (.AppImage or .deb)

The AppImage runs anywhere; the .deb is for Debian/Ubuntu/Mint.

chmod +x "TRS Quote Tool_0.1.0_amd64.AppImage"   # then double-click it, or:
./"TRS Quote Tool_0.1.0_amd64.AppImage"

sudo apt install ./"TRS Quote Tool_0.1.0_amd64.deb"   # the .deb route instead

If it refuses to start with a WebKit error, install the web engine it renders in: sudo apt install libwebkit2gtk-4.1-0 (Fedora: sudo dnf install webkit2gtk4.1).

Part 2 — build the installer yourself

Everything here happens in a terminal — a window where you type commands instead of clicking. You copy each block below, paste it in, and press Enter. Never used one? That's fine; the steps are in order and nothing is destructive.

Step 1: open a terminal

  • Windows — press the Windows key, type powershell, and click Windows PowerShell. (If a command later says "access denied," close it and instead right-click it → Run as administrator.)
  • macOS — press Cmd + Space, type terminal, press Enter.
  • LinuxCtrl + Alt + T, or search your apps for "Terminal".

Two things to know: paste is Ctrl + V (Cmd + V on Mac, and in some Linux terminals it's Ctrl + Shift + V), and a command that prints nothing usually means it worked. If a command asks for your password, that's the OS, not us — type it (the characters won't appear as you type) and press Enter.

Step 2: install the build tools for your OS

Windows — in PowerShell, using winget (ships with Windows 10/11):

# Microsoft C++ Build Tools, with the "Desktop development with C++" workload
winget install --id Microsoft.VisualStudio.2022.BuildTools --override `
  "--wait --passive --add Microsoft.VisualStudio.Workload.VCTools --includeRecommended"

winget install --id Microsoft.EdgeWebView2Runtime   # already on Win 10 1803+/11; no-op if present
winget install --id OpenJS.NodeJS.LTS               # Node 20+
winget install --id Rustlang.Rustup                 # Rust
winget install --id Git.Git                         # git, to download the code in Step 3
rustup default stable-msvc                          # make sure Rust uses the MSVC toolchain

Then close and reopen PowerShell so it picks up the new tools. (Chocolatey users: choco install visualstudio2022buildtools visualstudio2022-workload-vctools nodejs-lts rustup.install git.)

No winget? Install by hand instead
  1. C++ Build Toolshttps://visualstudio.microsoft.com/visual-cpp-build-tools/, run it, tick Desktop development with C++ in the "Workloads" tab.
  2. WebView2 — Evergreen Bootstrapper from https://developer.microsoft.com/microsoft-edge/webview2/ (skip on Win 10 1803+/11).
  3. Node.js 20 LTShttps://nodejs.org, accept the defaults.
  4. Rustrustup-init.exe from https://rustup.rs, press Enter to accept the default.
  5. Githttps://git-scm.com/download/win, accept the defaults.

macOS — Terminal:

xcode-select --install                                            # Apple's compiler tools (includes git)
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh    # Rust; accept the defaults
brew install node                                                 # Node 20+ (Homebrew)

No Homebrew? Either install it (/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)") or grab the Node 20 LTS installer from https://nodejs.org. Restart your terminal afterwards either way.

Linux (Debian / Ubuntu / Mint)

sudo apt update
sudo apt install git libwebkit2gtk-4.1-dev build-essential curl wget file \
  libxdo-dev libssl-dev libayatana-appindicator3-dev librsvg2-dev

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh   # Rust; accept defaults
Fedora / Arch equivalents
# Fedora
sudo dnf install git webkit2gtk4.1-devel openssl-devel curl wget file \
  libappindicator-gtk3-devel librsvg2-devel libxdo-devel
sudo dnf group install "c-development"

# Arch
sudo pacman -S --needed git webkit2gtk-4.1 base-devel curl wget file openssl \
  appmenu-gtk-module libappindicator-gtk3 librsvg xdotool

For Node, distro packages are often too old, so use nvm:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
exec $SHELL          # reload the shell so nvm is on your PATH
nvm install 20       # Node 20 LTS

(sudo apt install nodejs npm works too if it gives you v20 or newer — check with node --version.) Restart your terminal when everything is installed.

Step 3: download the code

git clone copies the project from the server into a folder on your machine. This puts it in your home folder (C:\Users\you\TRS, /Users/you/TRS, or /home/you/TRS):

cd ~
git clone https://forgejo.owlburtoe.dev/owlburtoe/TRS.git
cd TRS

On Windows PowerShell, cd ~ also means "my home folder," so the same three lines work as-is.

You are now inside the project folder, and every later command assumes that. If you close the terminal and come back, run cd ~/TRS again to get back here. ls (Windows: dir) should list README.md and trs-quote-tool — if it doesn't, you're in the wrong folder.

Already downloaded it once? Don't clone again — cd ~/TRS then git pull to grab the latest changes.

No git, or you'd rather not use it — download a ZIP instead

Open https://forgejo.owlburtoe.dev/owlburtoe/TRS in a browser, click the Code button, and choose Download ZIP. Unzip it (Windows: right-click → Extract All), then in your terminal cd into the unzipped folder — the easiest way is to type cd (with the space), then drag the folder from your file manager onto the terminal window, which pastes its path, and press Enter.

The downside: to get later updates you have to download the ZIP again by hand, whereas git pull does it in one command.

Step 4: check the tools are there

node --version    # v20 or higher
cargo --version   # any version
git --version     # any version

All three must print a version. If one says "command not found," close the terminal and open a new one (installers only affect terminals opened afterwards); if it still fails, that tool didn't install — redo its line in Step 2.

Step 5: build

From inside the TRS folder you cloned in Step 3:

cd trs-quote-tool
npm install
npm run tauri build

The first build compiles the whole Rust dependency tree and takes 515 minutes — that's normal, and later builds are much faster. Lots of scrolling text is expected; what matters is whether it ends with an error. You must build on the OS you want the installer for: a Mac cannot produce a Windows .exe.

Step 6: collect the installer

npm run tauri build prints the exact paths at the end. They live under trs-quote-tool/src-tauri/target/release/bundle/:

OS File
Windows nsis/TRS Quote Tool_0.1.0_x64-setup.exe
macOS dmg/TRS Quote Tool_0.1.0_aarch64.dmg
Linux appimage/TRS Quote Tool_0.1.0_amd64.AppImage and deb/TRS Quote Tool_0.1.0_amd64.deb

That file is what you install (Part 1) and what you send to other people on the same OS. The architecture in the name follows the machine you built on — an Intel Mac produces …_x64.dmg instead of …_aarch64.dmg, and a dmg built on Apple Silicon will not run on an Intel Mac.

Only Windows and macOS are actively used and tested. Linux builds with the same commands and the app has no platform-specific code, but nobody runs it there day-to-day — treat it as unsupported-but-working.

Develop

cd trs-quote-tool
npm install
npm run tauri dev      # run locally with hot reload
npm test               # frontend tests (calculations, DTO leakage)
cargo test             # in src-tauri: money/excel/migration tests

Prereqs are the same as Part 2, Step 2.

Using it (no dev tools needed)

  1. Install the app — see Install above.
  2. One-time setup: Settings → put your name in "Rep / prepared by", check the company header, Save.
  3. Import prices: Pricebook → Import Excel Pricebook → pick 03-TRS Write Up Tool.xlsx. Re-import whenever prices change; every import is kept as a version.
  4. Quote: Quotes → New Quote → fill the header, search parts by number or description, adjust sale prices (type Call or leave blank if unpriced) → Generate PDF. The PDF opens ready to send and is saved under Documents/TRS Quotes/Generated Quotes — old PDFs are never overwritten.
  5. Email: Prepare Email opens a draft in your mail app and shows the PDF — drag it into the email.
  6. Backups: Settings → Backup Now… monthly (or after big quoting sessions), pointed at a USB stick or OneDrive/Dropbox folder. Restore from the same page.

If something looks wrong, the Audit Log page shows everything the app did.

Email

MVP flow: Generate PDF → Prepare Email (prefilled subject/body from the quote, customer contact email) → opens your default mail client via mailto: and reveals the PDF to drag in. Every prepared email is recorded. Direct Outlook/Gmail API send is a later phase — no credentials are stored today.

Assumptions made (flag anything wrong)

  • Stock part list has no cost column (confirmed in the workbook) — cost is entered per line while quoting; the importer picks up a "Cost" column if one ever appears.
  • Quantities are whole numbers; quote numbers are free text (workbook uses rep initials like "GF").
  • Customers store sold-to/ship-to as free-text address blocks matching the Excel layout (no separate contacts/addresses tables for a one-person tool).
  • Purchase orders, confirmations, and packing slips are Phase 5 (not in MVP).
  • "Duplicate" copies a quote as a new draft with the same number — edit the number/revision as needed.
  • Deleting a customer keeps existing quotes intact (address text is snapshotted onto each quote).