ArthLedger — Smart Accounting. Stronger Businesses. A developer built ArthLedger, a local-first AI accounting and business management web application for Indian freelancers, retailers, and small businesses. The platform uses Python's Decimal arithmetic for multi-currency bookkeeping, extracts structured JSON from receipts and invoices locally via PyPDF and Ollama, and answers natural-language accounting questions through controlled, validated SQLite queries rather than arbitrary AI-generated SQL. All accounting workflows remain functional offline, with extracted document data requiring explicit human confirmation before any record is saved. This is a submission for the Hacktoberfest Open-Source AI Challenge Week 2: Side Hustle https://dev.to/challenges/hacktoberfest-week2-2026-10-12 ArthLedger — Smart Accounting. Stronger Businesses. A private, local-first AI accounting and business management platform designed for Indian freelancers, independent professionals, local retail shops, wholesalers, and small businesses. What I Built ArthLedger from the Sanskrit Arth , meaning wealth, purpose, and finance is a full-featured, local-first web application that bridges the gap between traditional double-entry bookkeeping and local artificial intelligence. The Problem It Solves Small business owners and freelancers face three major problems with existing accounting software: 1. Predatory Recurring Subscriptions: Cloud SaaS platforms QuickBooks, Zoho, FreshBooks charge escalating monthly fees that disproportionately hurt early-stage side hustles, local merchants, and independent consultants. 2. Financial Privacy & Data Exposure: Most "AI-powered" accounting tools silently transmit bank statements, vendor receipts, customer lists, and proprietary revenue numbers to third-party cloud AI APIs. 3. Flawed Multi-Currency Support: Many tools either lack genuine multi-currency support, use inaccurate binary floating-point calculations, or silently overwrite historical transactions when exchange rates fluctuate. Who Would Pay For It? - Indian Freelancers & Remote Contractors: Exporting software, design, or writing services to global clients in USD, EUR, or GBP while filing taxes in INR. - Local Retailers & Shop Owners: Managing physical inventory, tracking low-stock thresholds, and recording domestic GST invoices with lakh/crore Indian number formatting. - Independent Consultants & Agencies: Wanting an automated receipt scanner and intelligent assistant that runs 100% on their own laptop , without an internet dependency or ongoing API bills. Key Capabilities - Genuine Multi-Currency Engine: Built on Python's exact Decimal arithmetic no float rounding errors , with an ISO 4217 registry INR, USD, EUR, GBP, AED, CAD, JPY with 0 decimals, etc. , manual exchange-rate history, and cross-currency settlement. - Local AI Document Scanner: Extracts structured JSON merchant, document number, date, currency, line items, tax, total from receipts and invoices locally using PyPDF and Ollama. - Human-in-the-Loop Verification: Extracted data is presented in an editable review screen; no financial record is ever saved automatically without explicit user confirmation. - Conversational Accounting Assistant: Answers natural language questions "What were my largest expenses this month?" , "Which invoices are still unpaid?" , "Compare this month's sales with last month" by executing controlled, validated SQLite queries rather than letting AI execute arbitrary SQL. - Professional PDF Generation: Generates clean, print-ready A4 Tax Invoices and Monthly Financial Performance Reports with bank details, terms, and authorized signature boxes using ReportLab. - 100% Offline Usability: If the AI model or internet is unavailable, every accounting workflow—invoicing, expenses, inventory, reports, and CSV exports—remains completely functional. Demo Web Application Interface - Dashboard: Real-time KPI cards Invoiced Sales, Money Received, Outstanding Receivables, Total Expenses, Net Margin , monthly cash inflow vs expense SVG chart, pending invoice alerts, and recent transactions ledger. - Sales & Invoices: Interactive line-item editor with auto-calculating quantities, unit prices, discounts, GST/VAT rates, status lifecycle DRAFT , ISSUED , PARTIALLY PAID , PAID , OVERDUE , CANCELLED , and one-click PDF generation. - Purchases & Expenses: Category-based expense tracking, receipt attachment previews, and CSV exports. - Customer & Supplier Portals: Real-time calculated balances derived strictly from actual invoices, payments, and expenses, with safe archiving to protect financial history. - Inventory Management: Product catalog with SKU tracking, stock adjustments, low-stock reorder alerts, and inventory valuation. - AI Assistant: Local chat interface with instant query chips, connection status indicators, and deterministic fallbacks. Running the Demo Locally Open http://127.0.0.1:5000 http://127.0.0.1:5000 in any modern browser. Demo Video link: https://drive.google.com/file/d/129opE3qH3 B9pQ9SaElSag3a fKFgV04/view?usp=sharing https://drive.google.com/file/d/129opE3qH3 B9pQ9SaElSag3a fKFgV04/view?usp=sharing Code My github Repository Link: https://github.com/Kashyap-Patel115/ArthLedger-Local-AI-Accounting.git https://github.com/Kashyap-Patel115/ArthLedger-Local-AI-Accounting.git The code is designed to be modular, readable, beginner-friendly, and free of heavy front-end build pipelines or proprietary dependencies. Automated Test Suite ArthLedger comes with a 26-test automated suite covering financial calculations, security, and offline resilience: How I Built It 1. Technology Stack - Backend: Python 3.12 with Flask. - Database: SQLite with Write-Ahead Logging WAL , strict foreign keys PRAGMA foreign keys = ON , parameterized queries, and an immutable audit trail. - Frontend: Vanilla HTML5, CSS3, and Vanilla JavaScript. No React, Next.js, or complex bundlers. - Visual Design: Forest green 1b4332 , 2d6a4f and emerald accents paired with warm neutral backgrounds f9f8f5 and crisp charcoal typography. - Document Processing: pypdf for local offline text extraction; reportlab for generating A4 Tax Invoices and Financial Reports. - Financial Arithmetic: Python Decimal with ROUND HALF UP precision to prevent binary floating-point discrepancies. 2. Local Open-Source AI Architecture - Model: Evaluated and tested with smollm2:latest 1.7B parameters, Q8 0, Apache 2.0 license by Hugging Face and qwen2.5:1.5b . - Inference: Communicates locally via Ollama's HTTP API http://127.0.0.1:11434/api/generate . - Prompt Isolation & Security: Uploaded document text is treated strictly as untrusted user data enclosed in delimited text blocks, preventing prompt injection. - Controlled Assistant Queries: The AI model is never permitted to execute arbitrary SQL or directly mutate the database. Instead, user queries are routed through controlled, validated Python functions that pull verified data from SQLite, perform calculations with Decimal , and ask the model to explain the results in clear business terms. - Graceful Offline Fallback: If Ollama is not installed or offline, the application automatically falls back to deterministic structured summaries and manual document entry without crashing or hanging. Why Does Open Innovation Matter? 1. Financial Privacy & Data Sovereignty: Small businesses handle sensitive data: supplier pricing, client billing, personal phone numbers, and profit margins. Open innovation allows small businesses to deploy AI locally on their own hardware, ensuring their data is never harvested to train closed commercial models. 2. True Affordability: Closed AI APIs charge on a per-token basis. For a small Indian retailer or freelance consultant, unpredictable API bills make AI inaccessible. Small open-weight models smollm2 , qwen2.5 democratize intelligent software by running free of charge on everyday consumer PCs. 3. No Vendor Lock-In: Standardized local inference means the application is not married to any single proprietary provider. If a faster or more capable open-weight model is released, users can change the model name in Settings with zero code changes. 4. Offline Resilience: In developing markets and regional hubs, internet connectivity can be intermittent. Open, self-contained software ensures that core accounting, invoicing, and inventory tracking never grind to a halt when the network drops. My Agent Session As a second-year IT engineering student, I built ArthLedger through pair programming with Google DeepMind's Antigravity AI Agent . The project was constructed across 8 structured milestones: 1. Foundation & Environment Verification: Inspected the workspace, verified Python 3.12 and Ollama, and configured an isolated database architecture. 2. Core Accounting Logic: Implemented currency.py and accounting.py using Decimal arithmetic, avoiding floating-point rounding pitfalls and supporting Indian number grouping 12,34,567.89 . 3. Multi-Currency System: Constructed an ISO 4217 currency registry and exchange-rate tracking table that preserves historical conversion rates across invoice creation and cross-currency payments. 4. Professional UI System: Designed a forest green aesthetic with a collapsible sidebar, modal dialogs, status badges, and an SVG comparison chart. 5. Document Processing & ReportLab PDFs: Integrated pypdf for text extraction and built A4 Tax Invoices and Financial Performance PDF generators. 6. Local AI Integration & Fallback: Connected Ollama for structured receipt parsing, added an editable review screen with Human-in-the-Loop confirmation, and built controlled query handlers for the conversational assistant. 7. Inventory & Ledger Reporting: Implemented stock movements, reorder alerts, inventory valuation, cash flow statements, and accounts receivable aging schedules. 8. Automated Testing & Data Zeroing: Authored 26 automated pytest tests verifying every financial rule, path traversal protection, and persistence across reconnects, concluding with a clean zeroed database ready for real-world use. My First User My first user is my maternal uncle , who runs a shop and manages its daily transactions. I shared an early build of ArthLedger with him to help simplify his shop's financial record-keeping. The Challenge: He was managing his shop's daily sales, purchases, and other transactions manually, making it difficult to maintain organized financial records and track his business income and expenses efficiently. He needed a simple, reliable, and affordable solution to manage his shop's transactions in one place. - Their Feedback: "ArthLedger makes it easier for me to record my shop's daily transactions and keep track of my income and expenses. Having all my financial records organized in one place saves time and makes managing my shop's accounts much simpler." - Outcome: My maternal uncle started using ArthLedger to record and manage his shop's transactions. His experience as my first user helped me understand the practical needs of small shop owners and identify ways to make ArthLedger more useful, simple, and accessible for everyday business accounting. Future Development This is my first time developing and managing a project of this scale, and I have worked on ArthLedger within a limited time frame. Although the current version includes the core features, I understand that there is still room for improvement. As a student, I also need to balance my project work with my academic responsibilities. ArthLedger is an ongoing project, not the final version. Whenever I get more time, I will continue improving the software, fixing bugs, adding useful features, and making it more reliable and user-friendly based on real-world feedback. My goal is to keep learning through this project and gradually develop ArthLedger into a more complete accounting solution for small businesses. Prize Categories - Hacktoberfest Open-Source AI Challenge — Week 2: Side Hustle - Local AI & Edge Computing - Privacy-First & Open-Source Developer Tools Smart Accounting. Stronger Businesses. • Built with ❤️ for open-source innovation during Hacktoberfest 2026.