DEV Community

Shivam Maurya
Shivam Maurya

Posted on

I Built a Private AI Bookkeeper for Freelancers — Without Paying Per API Call

Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle Submission 💸

What I Built
Freelancers spend too much time sorting receipts, categorizing expenses, and preparing records for tax season.

So I built PocketLedger AI, a local-first bookkeeping assistant that turns receipts and invoices into structured, searchable expense records.

The workflow is simple:

Upload a receipt, invoice, or bill.
Extract the merchant, date, total, currency, and line items.
Suggest an expense category.
Review and correct the result.
Export everything to CSV for a spreadsheet or accounting workflow.
The target customers are freelancers, independent consultants, designers, developers, and other solo business owners who want to spend less time on administration.

The business model is straightforward: a one-time purchase for the desktop app, with optional paid upgrades for advanced features and support.

The goal isn't to replace an accountant. It's to eliminate repetitive data entry before the records reach one.

Demo
Live demo: https://github.com/tribhu05/pocketledger-ai

The most useful demo would show the complete workflow: receipt upload, extracted fields, category suggestion, human correction, and CSV export.

Code
GitHub repository: https://github.com/tribhu05/pocketledger-ai

The project is designed around replaceable AI components rather than a proprietary API that controls the entire workflow.

How I Built It
The core idea is to use open-weight AI for document understanding and expense categorization while keeping ordinary application logic deterministic.

The proposed stack:

Python for document processing and the application backend.
Ollama for running an open-weight language model locally.
Qwen or another compatible open-weight model for structured field extraction and category suggestions.
Pydantic for validating the model's structured output.
SQLite for storing expense records locally.
Pandas for generating CSV exports.
A local OCR engine for reading scanned receipts and image-based PDFs.
The processing pipeline looks like this:

Receipt or invoice → OCR → open-weight model → schema validation → user review → SQLite → CSV export.

The model doesn't get to invent a final expense record without validation. Required fields are checked, amounts are normalized where possible, and uncertain values are presented for human review.

The model is also replaceable. A user can experiment with a smaller model for faster processing or a larger one for difficult receipts without rebuilding the entire application.

The intended deployment is local-first: once the required model and software dependencies have been downloaded, the core workflow can run without an internet connection.

Why Does Open Innovation Matter?
For this project, open innovation isn't just a technology preference. It's part of the business model.

  1. Privacy becomes a product feature.

Receipts can contain customer names, addresses, transaction details, and other sensitive information. Local inference lets users process those documents on their own computers instead of sending every receipt to an external AI provider.

  1. The economics work for a small side hustle.

A per-request AI API charge might look insignificant at first, but it creates an ongoing variable cost. With local inference, the user supplies the computing hardware, so there is no mandatory per-receipt model API fee.

There are still costs for development, support, distribution, and hardware, but the marginal inference cost can be substantially lower.

  1. I can change the model without rebuilding the product.

Different customers have different hardware and accuracy requirements. An open-weight approach lets me compare compatible models, tune prompts, and potentially fine-tune a model on representative receipt formats.

  1. Offline operation is possible.

After the model and dependencies are installed, receipt processing can work without a network connection. That makes the tool useful to people who don't want their bookkeeping workflow to depend on an external service being available.

  1. I control the product roadmap.

I'm not forced to redesign the core workflow around a proprietary API's pricing changes, model retirement, or rate limits.

A closed API might provide better performance on certain difficult documents or work on low-powered devices without requiring users to manage local models. Those are real trade-offs. The point is to give customers a useful alternative when privacy, predictable operating costs, and control matter more than outsourcing inference.

Open-weight models make this product possible as a small, independent business rather than requiring a paid AI backend for every transaction.

My First User
The first people I'd put this in front of are freelancers who currently track expenses manually in spreadsheets.

I'd ask one person to process a batch of real receipts and measure three things:

How many fields were extracted correctly?
How many receipts required manual correction?
How much time did the workflow save compared with manual entry?
I'd also ask whether they'd pay for a local-first tool and which export format they actually need.

I want the first validation to be a real workflow test, not just a successful model demo.

What's Next?
The next steps are better OCR for crumpled and faded receipts, duplicate detection, support for multiple currencies, and export templates for popular bookkeeping workflows.

I'd also like to explore an optional review screen that explains why the model suggested a particular expense category, making corrections easier and helping users catch mistakes.

The guiding principle is simple: use AI where it saves time, use deterministic code where correctness matters, and keep the user's financial data under their control.

A small tool doesn't need to automate an entire business to be worth paying for. Sometimes saving a freelancer an hour of tedious bookkeeping every month is enough.

Built for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.

Note: PocketLedger AI is the proposed project concept for this submission. Replace the implementation details with the components actually used, add the real repository and demo, and include user feedback only after testing with a real person.

Top comments (0)