跳到正文
DEV Community· Sumeet Choudhary·· 2026-10-19AI 評分45

LocalLedger:你的私隱 AI 開支助手

LocalLedger - Your private AI expense copilot.

AI 導讀

LocalLedger 為印度自由工作者提供本機優先的 AI 開支管理工具,把收據及發票整理成可搜尋、經驗證的開支帳簿。工具透過 Ollama 在本機運行 Gemma 3 4B,結合本機 OCR、SQLite 和確定性財務驗證。財務文件留在本機,無須使用雲端 AI 服務。

正文

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle

LocalLedger — Your Private AI Expense Copilot for Indian Freelancers

Your private AI expense copilot.

LocalLedger is a local-first AI expense intelligence tool built for Indian freelancers, solo developers, creators, consultants, and small businesses.

It turns receipts and invoices into a structured, searchable, validated expense ledger using local OCR, deterministic financial validation, SQLite, and an open-weight Gemma model running locally through Ollama.

The core idea is simple:

AI understands the document. Code protects the numbers.


🚀 What I Built

Managing invoices and business expenses can quickly become messy, especially for freelancers and small businesses.

LocalLedger provides a privacy-focused workflow for turning financial documents into useful structured information:

IMPORT → EXTRACT → UNDERSTAND → VALIDATE → CLASSIFY → REVIEW → ANALYZE → EXPORT

Users can upload:

  • PDF invoices
  • Scanned PDFs
  • JPG/JPEG images
  • PNG images
  • WEBP images

LocalLedger then processes the document locally and extracts information such as:

  • Vendor name
  • Invoice number
  • Invoice date
  • Subtotal
  • Discount
  • Taxable amount
  • CGST
  • SGST
  • IGST
  • GST total
  • Total amount
  • GSTIN
  • Expense category
  • Description
  • Business-expense classification
  • Extraction confidence

The extracted information is then validated using deterministic rules before being stored in the expense ledger.


💡 Why LocalLedger?

Financial documents contain sensitive information.

Instead of sending invoices and receipts to a cloud AI service, LocalLedger is designed around a local-first architecture.

The goal is to keep financial documents and AI processing under the user's control.

Local-first by design

  • 🤖 Gemma 3 4B runs locally through Ollama
  • 🔍 Local OCR
  • 🗄️ SQLite local database
  • 🔒 No cloud AI required
  • 📄 Documents remain local
  • 🧮 Financial calculations are handled by deterministic code
  • 🧠 AI is used for interpretation rather than blindly calculating financial values

This makes LocalLedger particularly useful for people who don't want their financial documents uploaded to third-party AI services.


🏗️ How It Works

                    ┌──────────────────────┐
                    │      User Upload     │
                    │ PDF / JPG / PNG etc. │
                    └──────────┬───────────┘
                               │
                               ▼
                    ┌──────────────────────┐
                    │   Document Ingestion │
                    └──────────┬───────────┘
                               │
                    ┌──────────┴───────────┐
                    │                      │
                    ▼                      ▼
          ┌─────────────────┐    ┌─────────────────┐
          │ Native PDF Text │    │   Local OCR     │
          │   Extraction    │    │   for Scans     │
          └────────┬────────┘    └────────┬────────┘
                   │                      │
                   └──────────┬───────────┘
                              ▼
                    ┌──────────────────────┐
                    │ Structured Extraction│
                    │       Pipeline       │
                    └──────────┬───────────┘
                               ▼
                    ┌──────────────────────┐
                    │    Gemma 3 4B        │
                    │  Local AI Reasoning  │
                    └──────────┬───────────┘
                               ▼
                    ┌──────────────────────┐
                    │ Pydantic Validation  │
                    └──────────┬───────────┘
                               ▼
                    ┌──────────────────────┐
                    │ Financial Validation │
                    │    & Duplicate Check │
                    └──────────┬───────────┘
                               ▼
                    ┌──────────────────────┐
                    │     Expense Ledger   │
                    └──────────┬───────────┘
                               │
                 ┌─────────────┼─────────────┐
                 ▼             ▼             ▼
            Dashboard       Review        Export

🎥 Demo

GitHub Repository: https://github.com/sumeet156/LocalLedger

Video Demo: Watch the LocalLedger demo

🌍 Why Open Innovation Matters

LocalLedger would not have been possible in the same way without open-source and open-weight technologies.

The project combines open technologies across multiple layers:

  • Open-weight Gemma model
  • Ollama for local model execution
  • FastAPI
  • React
  • Python
  • SQLite
  • Pydantic
  • Local OCR tooling The open ecosystem makes it possible to build a useful AI application without depending entirely on proprietary cloud AI APIs.

More importantly, it allows developers to experiment with privacy-preserving AI applications.

For financial documents, this is especially important.

Instead of asking:
"How can I send this document to an AI?"

LocalLedger asks:
"How much intelligence can we bring to the user's machine?"

🏅 Prize Categories & Tools

  • 🏆 Hacktoberfest — Side Hustle
  • 🤖 Google / Gemma
  • 🌍 Open-Weight AI
  • 🛠️ AI-powered Productivity / Developer Tools
  • 🎙️ *ElevenLabs for creating demo video

來源:DEV Community · dev.to