跳到正文
DEV Community· Snehal Ghadge·· 2026-10-19AI 評分37

FreelanceFlow AI:本地 AI 發票及開支管理工具

FreelanceFlow AI

AI 導讀

FreelanceFlow AI 是面向自由工作者、個人創業者及獨立承包商的本地發票與開支管理工具,使用經 Ollama 在本機執行的 Google Gemma,將文件整理成結構化、分類的税務開支記錄。

正文

Snehal Ghadge

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

What I Built

FreelanceFlow AI is a 100% local, privacy-first invoice and expense manager designed specifically for freelancers, solopreneurs, and independent contractors.

The Problem

At the end of every month or tax season, freelancers face a painful chore: hunting down dozens of digital receipts and PDF invoices scattered across email inboxes and downloads folders (GitHub Copilot, Figma, AWS, Vercel, WeWork, Zoom, client dinners, and hardware purchases). Today, they have two frustrating choices:

  1. The Manual Spreadsheet Grind: Manually typing invoice numbers, dates, tax amounts, and vendors into Excel or Google Sheets. It takes hours, leads to typos, and frequently causes missed tax write-offs.
  2. Expensive Cloud SaaS Apps: Paying $20–$50/month for tools like Expensify, Dext, or QuickBooks that upload confidential financial documents, client names, and bank statements to proprietary cloud LLM APIs.

Who Would Use & Pay for It?

Freelancers and solopreneurs running lean side hustles who care deeply about:

  • Financial Data Confidentiality: Keeping client billing records, NDAs, and receipts strictly on their own machines.
  • Eliminating Recurring SaaS Fees: Paying zero monthly AI token or subscription fees.
  • Tax Readiness: Getting clean, categorized summaries and 1-click CSV exports ready for tax deductions and accountant handoffs.

Demo

The app features a modern, responsive SaaS-style interface powered by Streamlit and Plotly:

  • 📊 Financial Health Dashboard: 4 real-time KPI metric cards (Total Spend, Invoices Logged, Average Expense, and Top Category), plus interactive Plotly visualizations for monthly spending trends and category distribution.
  • 📄 Smart Document Ingestion: Drag-and-drop support for PDF invoices and receipt images (PNG, JPG, WEBP).
  • 🛡️ Instant Duplicate Detection: Computes a cryptographic SHA-256 hash on upload and alerts you immediately if a document was already entered, preventing double deductions.
  • 🤖 Gemma AI Extraction with Human-in-the-Loop: Automatically parses Vendor, Invoice #, Date, Currency, Subtotal, Tax, Total, and Category into an editable confirmation form.
  • 💼 Full Expense Manager: Filter by category, search by vendor/notes, adjust records in-place, and export clean CSVs.
  • 🧪 1-Click Demo Mode: Includes 12 pre-loaded fictional freelance expenses (Figma, GitHub, AWS, WeWork, Zoom, etc.) so judges can test every feature instantly without needing an active Ollama instance.

A ready-to-test sample invoice (sample_invoice.pdf) is included in the repository.


Code

💼 FreelanceFlow AI — Private AI Expense & Invoice Copilot

Built for the Hacktoberfest 2026 Week 2 Side Hustle challenge (#devchallenge, #hf26challenge).

FreelanceFlow AI is a 100% local, privacy-first invoice and expense manager designed specifically for freelancers, solopreneurs, and contractors. It turns messy PDF invoices and receipt images into structured, categorized tax-ready expense records using a locally running Google Gemma model served through Ollama and a local SQLite database.


🌟 Why FreelanceFlow AI?

As a freelancer, keeping track of deductible business expenses usually means juggling PDF receipts, taking screenshots of SaaS invoices, and spending hours each quarter manually typing numbers into spreadsheets.

Cloud AI alternatives exist, but they have major drawbacks:

  1. Financial Privacy Risks: Uploading bank statements, NDA-bound invoices, and personal receipts to third-party cloud LLM APIs poses severe confidentiality issues.
  2. Recurring Token Costs: Monthly SaaS fees and API bills eat away at freelance margins.
  3. Vendor Lock-In: Your expense history…

The repository includes the full source code, test suite, and Windows setup instructions:

  • app.py: Modern SaaS UI, interactive charts, and review forms
  • database.py: Parameterized SQLite queries, duplicate hash checks, and demo data generator
  • ai_service.py: Local Ollama REST client, Gemma prompt engineer, and Pydantic validation
  • invoice_parser.py: PyMuPDF native PDF text extraction, Tesseract OCR wrapper, and SHA-256 hashing
  • tests/: 13 passing unit tests verifying ACID compliance, Pydantic normalization, and document parsing

How I Built It

FreelanceFlow AI is built entirely on open-source technologies and local-first architecture:

來源:DEV Community · dev.to