Pocket Ledger: Private Receipt Sorting with Local AI
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle.
What I Built
Pocket Ledger is a local-first receipt and invoice organizer built for freelancers and small businesses.
Freelancers often waste time manually copying expense details from receipts into spreadsheets. Pocket Ledger helps simplify that workflow by extracting vendor names, dates, amounts, and expense categories from receipt text, allowing users to review the results and export bookkeeping records as CSV.
The workflow is straightforward:
- Paste receipt text or upload a text file.
- Extract and normalize expense information.
- Review the extracted fields and correct mistakes.
- Optionally use a local Ollama model to suggest missing information.
- Export the reviewed records to CSV.
The goal is to reduce repetitive bookkeeping without requiring users to send sensitive financial information to a cloud AI provider.
Demo
Run Pocket Ledger locally:
git clone https://github.com/Tswetabh/Husltr.git
cd Husltr
pip install -r requirements.txt
ollama pull gemma3:4b
streamlit run app.py
Ollama is optional. Deterministic parsing and CSV export work without it.
The application is designed to run locally rather than requiring a hosted AI backend.
Code
GitHub repository: https://github.com/Tswetabh/Husltr
The repository includes:
-
app.pyβ Streamlit user interface. -
receipt_sorter.pyβ Receipt parsing, normalization, and CSV export. -
ollama_client.pyβ Integration with a locally running Ollama model. -
tests/β Automated tests for parsing and model-fallback behavior. -
requirements.txtβ Python dependencies.
How I Built It
Pocket Ledger combines Python, Streamlit, pytest, and local AI inference.
The core parsing and export pipeline uses Python's standard library. For optional AI enrichment, the application uses Ollama with the open-weight gemma3:4b model by default.
The model receives receipt text and returns structured JSON suggestions. Those suggestions are normalized before being presented for review. Incomplete records are flagged for human review rather than being silently treated as complete.
A key design decision was to keep AI optional. If Ollama is unavailable, the application falls back to deterministic extraction, allowing the basic workflow to continue without a running model.
This gives users a practical balance between predictable processing and AI-assisted enrichment.
Why Does Open Innovation Matter?
Receipt data can contain sensitive financial information, vendor details, addresses, and purchasing habits. Sending that information to a third-party AI service may be unnecessary for a relatively simple bookkeeping workflow.
Using an open-weight model locally makes several things possible:
- Privacy: Receipt text can remain on the user's machine when the application and model run locally.
- Cost control: There are no per-document AI API charges.
- Flexibility: Users can experiment with compatible local models.
- Independence: The core workflow does not depend on a single AI provider's API or pricing.
- Customization: The extraction process can evolve to support different bookkeeping conventions and expense categories.
Local AI is not just an alternative implementation. It helps make privacy and predictable operating costs part of the product itself.
The application still requires a machine capable of running the selected model. Local inference is not automatically faster or more accurate than every hosted alternative, but it gives users greater control over the trade-offs.
My First User
I haven't tested Pocket Ledger with a paying user yet.
My first validation target is a freelancer who spends time each month cleaning up receipt exports and manually organizing expenses.
I'd start with redacted sample receipts and ask them to try the workflow. I'd specifically measure:
- How much manual work the application eliminates.
- How often extracted fields need correction.
- Which CSV format their accountant or bookkeeping tool requires.
- Whether local processing and privacy would influence their decision to use or pay for it.
The next step is to validate the workflow with a real user before making stronger claims about time savings or willingness to pay.
Prize Categories
- Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle
Top comments (0)