Privacy, Storage & In-Browser OCR
CatInvoice is engineered with a **local-first design architecture**. We believe your financial data, billing figures, client lists, and pricing numbers should remain confidential and isolated. This document details how your browser acts as the singular database vault and explains how our secure client-side OCR receipt scanner operates with absolute privacy.
The Local-First Storage Architecture
CatInvoice does not use centralized cloud databases to save your templates or document history. Instead, we use IndexedDB, a transactional database built directly into all modern web browsers (Chrome, Safari, Firefox, Edge, etc.).
Storage Engineering Details:
- `idb-keyval` Driver: We run a promise-wrapped lightweight IndexedDB abstraction (`idb-keyval` v6) to perform non-blocking asynchronous storage writes.
- Auto-Save Pipeline: Any edit you make to sender info, client profiles, or invoice item rates is auto-saved locally within milliseconds of typing. If your browser crashes or you refresh, your work is restored exactly where you left off.
- Zero Server Uploads: No billing drafts, itemized prices, addresses, or currencies are uploaded to our hosting servers. Our Cloudflare static shell simply loads the static app resources; the actual data processing occurs purely inside your browser sandbox.
Our database script (`src/lib/idb.js`) automatically handles older legacy storage schemas. If you used previous versions of our tool that saved draft parameters in `localStorage`, our startup script migrates those records smoothly into IndexedDB with zero risk of data loss.
Private Client-Side OCR Scanner
You can drag and drop physical receipts, scanned bills, or PDF agreements directly into the editor. CatInvoice's optical character recognition (OCR) scanner parses characters, detects prices, and extracts billing structures automatically.
How Private OCR Works:
- In-Browser Parsing: File parsing and image scanning are executed entirely inside your browser thread.
- No Document Transmission: Uploaded receipt images or PDF files are never sent over the network to external servers or APIs.
- Data Extraction: Once the OCR scans the text layers, our local script extracts monetary sums, item descriptions, and business dates, feeding them straight to Tabby or into your draft sheet.
Auto-Complete Memory Vault
As you use CatInvoice, the system accumulates a local **smart autocomplete memory**:
- Client Memory: When you input a client's billing information, CatInvoice logs the profile inside your local IndexedDB client store. The next time you type in the "Bill To" field, an autocomplete dropdown helps you select past profiles.
- Service Memory: Description entries and rate lists are logged locally so you can auto-fill repeated services (e.g. "Web Development Consulting" or "Content Copywriting") instantly.
- Manage / Clear Memory: You can wipe your autocomplete memory or delete specific records anytime under More options → Clear local storage.
If you use CatInvoice inside your browser's Incognito or Private Browsing window, IndexedDB files are deleted as soon as you close the tab or browser. Be sure to export your invoice as a JSON backup if you wish to edit it later!