Bigcapital

Self-hostable double-entry accounting platform with invoicing, inventory, multi-currency, and real-time financial reporting for small and medium businesses.

3.8Kstars
473forks
GNU AGPLv3
TypeScript

Bigcapital is an open-source financial accounting and inventory management system built for small and medium businesses that need complete control over their financial data without vendor lock-in. It automates the full double-entry bookkeeping workflow — from journal entries and ledger reconciliation to trial balance generation — replacing proprietary tools like QuickBooks and Xero with a transparent, auditable platform.

The system handles the complete financial operations lifecycle: create and track invoices, bills, expenses, and purchase orders; manage inventory across multiple warehouses; reconcile bank accounts via Plaid integration; and generate real-time financial statements including profit and loss, balance sheets, cash flow statements, and aging summaries. Multi-currency support with live exchange rate conversion means businesses operating across borders can manage all accounts in one place.

Bigcapital is deployed as a set of Docker containers — a NestJS API server, a React webapp, MariaDB, Redis, and Gotenberg for PDF generation — and can be self-hosted on any VPS or cloud provider. A managed cloud version is available at bigcapital.app for teams that prefer to skip the operational work. The headless REST API with Postman collections lets developers embed Bigcapital’s accounting engine directly into their own applications.

What You Get

  • Double-Entry Accounting Engine - Fully automated double-entry bookkeeping with journal entries, general ledger, trial balance, and automatic reconciliation built into every transaction.
  • Real-Time Financial Statements - Generate profit and loss, balance sheets, cash flow statements, AP/AR aging summaries, and inventory valuation reports without waiting for period close.
  • Automated Bank Import via Plaid - Connect bank accounts through Plaid to automatically import, categorize, and match transactions, eliminating manual data entry.
  • Multi-Currency Support - Process transactions in any currency with real-time exchange rate conversions, currency reconciliation, and multi-currency financial reporting.
  • Inventory Management - Track stock levels automatically when items are purchased or sold, with inventory valuation sheets and turnover reports across multiple warehouses.
  • Multi-Branch & Warehouse Tracking - Segregate financials and inventory across multiple physical locations with dedicated branch and warehouse management modules.
  • Role-Based Access Control - Invite accountants or team members with granular permissions controlling which financial data each role can view or modify.
  • Headless REST API - Integrate Bigcapital’s accounting engine into third-party applications via a documented REST API with Postman collections and a TypeScript SDK.
  • Recurring Invoices and Bills - Automate recurring sales invoices and purchase bills with customizable templates, payment links, and Stripe payment collection.
  • Tax Rate Management - Define and apply GST/VAT and other tax rates per item or transaction, with tax liability summary reports for compliance.

Common Use Cases

  • Small retail business owner - A shop owner tracks real-time inventory levels, generates sales invoices, reconciles bank transactions via Plaid, and produces monthly P&L reports without paying QuickBooks licensing fees.
  • Multi-currency e-commerce seller - An online seller operating in USD, EUR, and GBP uses Bigcapital’s live exchange rate conversion to manage all accounts in a single system and produce consolidated financial statements.
  • Accounting firm managing SME clients - A CPA firm self-hosts Bigcapital and creates separate tenant environments for each client, giving clients role-based access to review their own books and run reports without data exports.
  • Franchise operator with multiple locations - A business with five branches uses Bigcapital’s multi-branch and multi-warehouse features to track sales, inventory, and expenses per location with consolidated reporting.
  • SaaS developer embedding accounting - A software founder integrates Bigcapital’s REST API to power the accounting backend of their business application, avoiding the need to build double-entry logic from scratch.
  • Growing business replacing spreadsheets - A 10-person company migrates from spreadsheets to Bigcapital, using its import tools to bring in historical data, set up chart of accounts, and automate recurring billing.

Under The Hood

Architecture Bigcapital follows a modular monorepo structure managed with Lerna and pnpm, separating concerns into a NestJS server package, a React webapp, shared utility libraries, PDF template rendering, and an email components package. The backend is organized into over fifty domain modules — Ledger, SaleInvoices, BankingPlaid, FinancialStatements, Tenancy, Subscription, and more — each encapsulating its own controllers, services, repositories, DTOs, and domain events. Multi-tenancy is implemented at the database level: each tenant organization gets its own isolated MariaDB database managed by the TenancyDB module, while the system database tracks organizations and users. Cross-cutting concerns like authentication, caching, job queuing, and PDF generation are handled through NestJS module injection rather than shared globals, keeping the dependency graph clean and testable.

Tech Stack The server runs on NestJS with TypeScript, using Objection.js (a Knex wrapper) for model definitions and query building against MariaDB. BullMQ backed by Redis handles background job processing for bank feed imports, PDF generation, and email notifications, while ioredis manages session caching. The frontend is a React SPA built with Vite, using Blueprint.js for the data-heavy accounting UI with a custom extensible cell-based data grid. PDF documents are generated by Gotenberg (a Chromium-based PDF service). Plaid handles bank feed connectivity, Stripe powers in-app payment collection for client invoices, and LemonSqueezy manages the cloud subscription billing. An Envoy proxy fronts the production stack and routes traffic between the webapp and API containers.

Code Quality The server test suite is extensive, with end-to-end API specs covering every major domain: accounts, invoices, bills, expenses, bank rules, banking categorization, financial statements, inventory, and more. Tests use a shared initialization helper and custom NestJS test context utilities to standardize tenant setup and authorization across suites. The codebase applies consistent TypeScript typing throughout, with explicit DTOs for all API inputs and typed event payloads. Naming follows NestJS conventions with clear command/query separation within each module. Husky enforces commitlint on every commit. Unit test coverage is limited relative to the comprehensive E2E suite, meaning internal service logic is primarily covered through integration paths rather than isolated unit tests.

What Makes It Unique Bigcapital’s defining characteristic is that the double-entry accounting constraint is enforced at the domain model layer rather than delegated to the database or an external library. Every financial transaction — invoice, bill, expense, bank match, or manual journal — flows through the Ledger module, which generates balanced debit/credit entries and writes them atomically. The multi-tenant database-per-tenant architecture is paired with a feature flag system that gates capabilities like branch tracking, warehouse management, and bank syncing at the tenant level, enabling the same codebase to power both a minimal self-hosted instance and the feature-rich cloud offering. The Plaid-powered bank transaction recognition engine includes an ML-style rule system (BankRules module) that auto-categorizes imported transactions based on user-defined conditions, reducing manual reconciliation work.

Self-Hosting

Bigcapital is released under the GNU Affero General Public License v3.0 (AGPL-3.0). This is a copyleft license: you can use, modify, and distribute the software freely, including for commercial purposes, but any modifications you deploy over a network must be released under the same AGPL terms. For most self-hosting organizations using Bigcapital internally for their own accounting, the AGPL imposes no practical restriction. For developers building a product on top of Bigcapital’s code that they intend to offer as a network service to others, the AGPL requires them to open-source their modifications. The project also maintains a commercial license option (contact via cal.com) for organizations that need AGPL exemption.

Self-hosting Bigcapital is a real operational commitment. The production stack requires running six containers (API server, React webapp, MariaDB, Redis, Gotenberg, and Envoy proxy), plus a separate database migration container on upgrades. You are responsible for MariaDB backups, Redis persistence, TLS termination, and keeping the containers updated as new releases ship — the project averages multiple releases per month. The Plaid bank feed integration requires a Plaid account and API keys, and S3-compatible storage is needed if you want attachment support. For small teams, a minimal VPS with 2GB RAM can run the stack, but database and Redis sizing will grow with transaction volume.

The managed cloud at bigcapital.app offloads all of the above: zero infrastructure management, automatic upgrades, managed backups, and direct support from the core team. Self-hosters also miss out on the LemonSqueezy-powered subscription billing features that are gated to cloud deployments, and there is no SLA or guaranteed uptime for self-hosted instances. The project has a Discord community for community support, and paid support arrangements are available through the sales contact page.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search