SoloBooks AI: How a Local-First Financial Assistant Solves Freelancers' Privacy Pain Points

SoloBooks AI uses local open-source models and SQLite to deliver a privacy-first, zero-marginal-cost bookkeeping tool for independent developers.
SoloBooks AI is an open-source financial tool for freelancers and independent developers that keeps all AI inference and financial data local, avoiding uploading invoices, tax IDs, and bank statements to third-party clouds while sidestepping $30–60 monthly SaaS fees. The frontend uses Next.js 16 and React 19; SQLite stores amounts as integer minor units to eliminate floating-point errors. Document processing runs Tesseract.js OCR and PDF-Parse in parallel, with AI extraction via local Ollama (llama3 or qwen2.5:3b). Zod schemas strictly validate model output, and users must review each item before database writes. The AI assistant executes deterministic SQL queries first, with the model only explaining results. The author honestly discloses limitations including VRAM, latency, and initial online deployment.
Title
SoloBooks AI: How a Local-First Financial Assistant Solves Freelancers' Privacy Pain Points
Meta Description
SoloBooks AI is a local-first financial assistant for freelancers, using Ollama local models, Tesseract.js OCR, and SQLite to protect financial document privacy—zero API cost for invoice and receipt extraction plus deterministic bookkeeping. This article examines its architecture and technical trade-offs.
Article Content
Freelancers and independent developers have long faced a dilemma: either track expenses manually in Excel and endure the inefficiency, or subscribe to accounting SaaS costing $30–60 per month and upload sensitive client invoices, tax rates, and bank statements to third-party clouds. SoloBooks AI attempts to break this deadlock with local open-source models—no financial document ever leaves the user's own hard drive.

A Neglected Privacy Gap
The author of SoloBooks AI, participating in the Hacktoberfest open-source AI challenge, identified two core problems with traditional accounting tools. First, data security: commercial tools mandate uploading private bank invoices, tax IDs, and confidential client rates to third-party servers and proprietary AI APIs. Second, an unreasonable cost structure: monolithic accounting suites charge $30–60 per month, and many enterprise features are simply irrelevant to solo operators.
This pain point is not niche. Freelance developers, creative studios, tutors, and small business owners form a vast long-tail market. Their financial documents come in fragmented formats—PDF invoices, PNG receipts, JPEG photos mixed together—yet the data sensitivity is extremely high.
Technical Architecture: Locking AI in a Local Box
The architecture of SoloBooks AI revolves around one principle: inference and storage stay local. The frontend uses Next.js 16 App Router with React 19 and TypeScript strict mode; Tailwind CSS v4 customizes a design system in forest green (#059669) and deep emerald (#10b981). Charts are rendered by Recharts, with monthly cash-flow bar charts and categorized spending pie charts computed client-side.
The data layer uses SQLite, managed via @libsql/client, providing a cross-platform embedded database with zero native builds. One notable engineering detail: all monetary amounts are stored as integer minor units (e.g., ₹45,000.00 stored as 4500000 paise, $49.99 stored as 4999 cents), fundamentally eliminating floating-point precision drift. Uploaded receipts pass through a 15MB size limit, MIME-type whitelist, and path-traversal stripping validation before being stored with random UUID names in the ./data/documents/ directory, with only relative paths recorded in the database.
Document processing uses a dual-track strategy: Tesseract.js v7 handles OCR for scans and photos, implemented in pure JavaScript and WebAssembly, running in a background worker without C++ system binaries; PDF-Parse extracts the native text stream of digital invoices directly, skipping OCR latency.
The Significance of Zod and Runtime Schema Validation
TypeScript's type system only operates at compile time; the compiled output carries no type information at runtime, so data from external sources (here, the language model) is completely untrustworthy at runtime. Zod is a runtime validation library: developers declare a schema with a chained API, and at runtime parse can be executed on any input, throwing structured errors on mismatch.
In LLM extraction scenarios, this validation layer is especially critical. Models may return extra fields, write numbers as strings with currency symbols, or omit dates. Zod, combined with .nullable() and .catch(), can normalize anomalous input to null rather than letting dirty data into the database. Compared to hand-written if checks, schemas can also automatically derive TypeScript types from definitions, ensuring validation logic and type declarations never diverge.
Local Model Integration and Anti-Hallucination Design
The AI extraction stage is handled via the local Ollama API (127.0.0.1:11434). The author validated two models: llama3:latest (8.03B parameters, Meta Llama 3 community license) and qwen2.5:3b (3.09B parameters, Apache 2.0 license, targeting 8GB-memory laptops).
Several engineering decisions here are worth learning from. The extraction prompt enforces JSON format; raw responses are validated through a strict Zod schema (ExtractedLlmSchema), with missing fields kept as null rather than letting the model fabricate dates or invoice numbers. Document text is wrapped in <document_text> delimiter blocks, accompanied by explicit system instructions to ignore prompt-injection attempts embedded in invoices. AI communication is abstracted behind a generic ModelAdapter interface (src/lib/ai/adapter.ts), allowing seamless model swapping and automatic mocking in tests.
Most critically, the "human-in-the-loop" design: AI extraction results are strictly treated as draft proposals, and users must review, edit, and confirm each item before it is written to SQLite. The correctness of financial figures is ultimately guaranteed by a deterministic computation engine, not the language model.
How Ollama and Local Inference Work
Ollama is an open-source framework for running large models locally. It packages model weight downloading, quantization, loading, and inference serving into a single daemon, exposing an HTTP interface similar to OpenAI's style on the default port 11434. Applications only need to send requests to 127.0.0.1:11434 to invoke models—no cloud credentials, no per-token billing.
Its key mechanism is model quantization: weights are compressed from 16-bit floating point to 4-bit integers (the Q4 series), reducing a 3B-parameter model to roughly 1.9GB so it can load in ordinary laptop memory. The trade-off is a slight drop in precision, but for tasks like structured information extraction this is usually sufficient. Note that Ollama itself does not handle data persistence or security boundaries; it trusts the local caller—so the application layer must still perform its own input sanitization, prompt-injection isolation, and output validation, which is exactly where the Zod schemas and <
A Grounded AI Financial Assistant
When SoloBooks AI's built-in Q&A assistant answers questions like "How much did I spend on software this month?", it does not let the model generate numbers out of thin air. The system executes deterministic SQL queries, then presents verified transaction cards alongside a narrative summary. This "grounded" approach confines the language model to the explanation layer, leaving amount computation to the database.
The test suite runs on Vitest, with all 17 tests passing, covering minor-unit arithmetic, document security, schema validation, duplicate detection, invoice status transitions, and real Ollama connectivity.
The Triple Value of Open-Source Innovation and Honest Limitations
The author's case for open innovation focuses on three points. Data sovereignty: with models running locally, client lists, hourly rates, and tax deductions never leave the device. Zero marginal inference cost: once weights are downloaded, the API cost of analyzing 10 or 10,000 receipts is zero. Freedom from vendor lock-in: open-weight models under Apache 2.0 are immune to arbitrary price hikes, deprecation notices, or sudden API terms changes.
But the article does not shy away from the costs. Model weights occupy 1.9GB (3B) to 4.7GB (8B) of disk space; the 3B model needs at least 8GB of memory, and the 8B model needs 16GB of memory or dedicated VRAM. On pure-CPU hardware, OCR plus inference may take 5–15 seconds per document. Initial deployment still requires internet access to download Ollama and model weights, though the author personally verified that after going offline, the dashboard service, PDF text processing, SQLite queries, deterministic total calculations, and RFC 4180 CSV export all work normally.
Business Model and a Pragmatic Trade-off
The current open-source core includes unlimited local OCR and PDF extraction, Ollama integration with schema validation, expense and invoice tracking, a grounded AI assistant, and CSV/JSON export. The planned Pro tier includes intelligent bank statement CSV mapping, batch queue processing of up to 50 documents, password-encrypted local backup snapshots, and Tauri-based single-binary desktop packaging, targeting a price of ₹499 (about $6) per month. The author explicitly marks payment and subscription features as proposals only, not falsely implemented—a rare honesty in hackathon submissions.
The significance of SoloBooks AI is not how comprehensive its features are, but that it demonstrates a path: local open-weight models are sufficient to support privacy-first, zero-marginal-cost financial tools. For independent practitioners handling sensitive client data, keeping AI inference on their own machine may be more compelling than any cloud feature.
One-line Summary
SoloBooks AI uses local open-source models and SQLite to deliver a privacy-first, zero-marginal-cost bookkeeping tool for independent developers.
Paragraph Summary
SoloBooks AI is an open-source financial tool for freelancers and independent developers, with the core proposition of keeping all AI inference and financial data local—avoiding uploading invoices, tax IDs, and bank statements to third-party clouds while sidestepping $30–60 monthly SaaS subscription costs. Technically, the frontend uses Next.js 16 and React 19, the data layer uses SQLite with amounts stored in integer minor units to eliminate floating-point errors; document processing runs Tesseract.js OCR and PDF-Parse in parallel, and AI extraction calls llama3 or qwen2.5:3b via local Ollama. To prevent hallucination, the system strictly validates model output with Zod schemas and forces users to review each item before database writes. The AI assistant executes deterministic SQL queries before answering, with the model only responsible for explanation. The author also honestly discloses limitations including VRAM, latency, and initial online deployment.
Related articles

Chain of Thought Isn't Just for AI: How Humans Can Use CoT to Improve Thinking Quality
Chain of Thought isn't just a prompt trick for large models. Starting from a Hacker News discussion, this article analyzes why CoT works for human thinking too, breaks down actionable ways to transfer it, and highlights the key differences between human CoT and machine CoT.
Cloudflare Teams Up with OpenAI: Closi…
Cloudflare Teams Up with OpenAI: Closing the Loop from Vulnerability Discovery to Defense with AI
Cloudflare uses OpenAI Daybreak to investigate security vulnerabilities and generate reviewable remediation plans, while developers use Codex to boost coding efficiency and quality.

Orca Multi-Agent Orchestration in Practice: A Guide to Parallel Collaboration with Claude and Codex
Orca is Stable AI's free open-source agent workbench supporting 34 agents like Claude Code and Codex in parallel. Learn its Git worktree isolation, multi-model orchestration, and mobile management.