This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
What I Built
Meet LocalLedger AI — a local-first, open-source AI finance document assistant designed for freelancers, independent contractors, consultants, and small businesses.
Freelancers regularly deal with receipts, invoices, subscription bills, and expense records. Manually entering every transaction into a spreadsheet is tedious, and uploading sensitive financial documents to cloud services isn't always desirable.
I built LocalLedger AI to make that workflow easier.
With LocalLedger AI, users can:
- Upload invoices, receipts, and bills in PDF or image formats.
- Extract text using PDF parsing and local OCR.
- Use AI to turn extracted text into structured financial records.
- Review and correct extracted information before confirming records.
- Detect potential duplicate documents.
- Categorize expenses using configurable rules and AI.
- Track expenses across multiple currencies without combining unlike currencies.
- Export expenses to CSV and back up records as JSON.
The goal is simple: spend less time organizing financial paperwork and more time doing the work that generates income.
Who would pay for it?
The initial target customers are freelancers and independent consultants who manage their own paperwork, along with small businesses that need a lightweight expense-management workflow.
Potential paid features include batch processing, advanced reports, custom categorization rules, and bookkeeper-friendly exports.
These are monetization hypotheses, not validated sales. The next step is to put the application in front of real users and learn which features are valuable enough to pay for.
Demo
Local demo: Run the application locally and open http://localhost:5173.
The project includes a three-minute demonstration workflow:
- Upload an invoice or receipt.
- Extract and inspect the financial information.
- Review the extracted fields and any calculation discrepancies.
- Confirm the record.
- View it in the expense ledger.
- Export the expenses to CSV.
For setup instructions, see the project README.
Live deployment or video demo: Add your verified public demo link here.
Code
GitHub repository: LocalLedger AI
LocalLedger AI is released under the MIT License.
The project uses React, TypeScript, Vite, Tailwind CSS, Fastify, Prisma, SQLite, local OCR, and a modular AI provider architecture.
The codebase also includes automated tests covering financial calculations, extraction schemas, AI provider behavior, data backup, CSV safety, and API workflows.
How I Built It
I wanted to build something where open-source AI wasn't just an optional feature added to a conventional application. It needed to be a meaningful part of the product's value.
1. Local document processing
The application accepts PDF and image documents. It extracts native text from digital PDFs using pdf-parse and uses Tesseract.js for local OCR where supported.
This creates a structured text-processing pipeline before the document reaches the AI layer.
Scanned, image-only PDFs require additional rendering before OCR, which is documented as a limitation.
2. A pluggable AI architecture
I designed the application around multiple AI providers rather than tying the entire product to a single API.
The current architecture includes:
- Ollama: For locally running open-weight models.
- OpenAI-compatible endpoints: For compatible self-hosted inference services.
- OpenAI, Google Gemini, and Anthropic: Optional cloud provider integrations.
- Demo provider: For deterministic demonstrations and development without downloading model weights.
This approach makes it possible to select an inference setup based on available hardware, privacy requirements, cost, and model capabilities.
The documented Ollama examples include gemma2:2b, gemma2:9b, llama3.2:1b, and qwen2.5:1.5b. The application checks relevant model capabilities instead of assuming that every model supports vision or structured output.
3. Deterministic financial validation
An LLM can extract information, but it shouldn't be trusted to perform authoritative financial calculations.
I used decimal.js for precise monetary arithmetic and implemented deterministic checks for relationships such as:
Subtotal + Tax − Discount = Total
When values don't match, the application flags the discrepancy so the user can review it.
The system also checks for potential duplicates using SHA-256 file hashes and merchant/invoice-number combinations.
4. A review-first workflow
AI-extracted information is not automatically treated as a finalized financial record.
Users can inspect the original document alongside the extracted fields, correct values, review warnings, and confirm the record before it becomes part of the authoritative ledger.
This is important because financial documents may contain ambiguous dates, unreadable values, inconsistent totals, or missing information.
5. Practical safeguards
I also implemented CSV formula-injection defenses, validated JSON backup and import, and separate handling for different currencies.
The project currently has 27 documented passing tests across seven test files, covering core financial logic, provider behavior, imports and exports, and API workflows.
The test suite includes a live Ollama connectivity check that can skip when the local service is unavailable.
Why Does Open Innovation Matter?
For LocalLedger AI, open innovation is about control over both the technology and the data.
Privacy and local processing
When users select a compatible local model and enable Local-Only Mode, the application is designed to avoid sending financial documents to external AI providers.
Receipts and invoices can contain names, addresses, transaction details, and other sensitive information. Keeping AI inference local gives users an alternative to uploading these documents to a commercial AI API.
Freedom to choose models
Different users have different hardware and performance requirements. A user with limited resources might choose a small model, while someone with more capable hardware might prefer a larger one.
The provider abstraction also allows compatible self-hosted endpoints and optional cloud models without redesigning the entire application.
Cost control
Local inference can reduce per-document API charges when users already have suitable hardware. However, local inference still has hardware, electricity, and maintenance costs, and cloud APIs may be more practical for some workloads.
Less dependence on one provider
A financial document assistant shouldn't have its entire architecture determined by one vendor's API, pricing, or model availability.
A modular provider design makes it easier to experiment, switch models, and evaluate different inference options.
Open innovation doesn't automatically make a model more accurate or secure. Those properties still require testing. Its value here is that users and developers gain more control over how the system operates.
My First User
This section is intentionally omitted until a real person has tested the application.
My next step is to get LocalLedger AI into the hands of freelancers or independent consultants who regularly handle invoices and receipts.
I want to learn how accurately it extracts their documents, how much manual correction is required, and whether it saves enough time to justify paying for the workflow.
I'll add actual feedback and outcomes here after testing with a real user.
What's Next?
The current focus is making the core workflow reliable: document ingestion, extraction, validation, review, storage, and export.
Next, I want to test the application with real freelancers, measure how much manual work it eliminates, improve extraction quality on difficult receipts, and validate which features users would actually pay for.
If you work independently and spend too much time organizing receipts, I'd be interested in hearing how you currently handle that process and what you'd want a tool like this to do.
Repository: LocalLedger AI on GitHub
Built for the Hacktoberfest Open-Source AI Challenge — Week 2: Side Hustle.

Top comments (0)