Overview
Discover what makes LedgerSMB powerful
LedgerSMB is a full‑stack, web‑based double‑entry accounting and ERP platform written in **Perl 5**. It exposes a rich set of business processes—quotations, orders, invoicing, inventory, timecards, and project accounting—through a single, browser‑driven interface while persisting all data in an enterprise‑grade **PostgreSQL** database. The application is architected as a classic MVC stack: the front end renders dynamic HTML via CGI scripts, while business logic is encapsulated in a Perl library layer that interacts with the database through `DBIx::Class`. This separation keeps the core logic testable and enables developers to replace or extend individual modules without touching the UI.
Language & Runtime
Web Server
Database
Templating
Overview
LedgerSMB is a full‑stack, web‑based double‑entry accounting and ERP platform written in Perl 5. It exposes a rich set of business processes—quotations, orders, invoicing, inventory, timecards, and project accounting—through a single, browser‑driven interface while persisting all data in an enterprise‑grade PostgreSQL database. The application is architected as a classic MVC stack: the front end renders dynamic HTML via CGI scripts, while business logic is encapsulated in a Perl library layer that interacts with the database through DBIx::Class. This separation keeps the core logic testable and enables developers to replace or extend individual modules without touching the UI.
Technical Stack
- Language & Runtime: Perl 5.36+, with strict typing and modern syntax (
use warnings,use feature). - Web Server: Any CGI‑capable server (Apache, nginx via
fcgiwrap, lighttpd). The core does not depend on a specific framework, making it easy to integrate into existing web stacks. - Database: PostgreSQL 13+, leveraged for its ACID compliance, advanced indexing, and support for multi‑currency accounting. The schema is versioned through a lightweight migration system embedded in the Perl codebase.
- Templating:
Template Toolkitdrives PDF, CSV, HTML, and ODF output. Templates are fully customizable, allowing developers to ship bespoke branding or data layouts without modifying the core logic.
Core Capabilities & APIs
- REST‑like Endpoints: While LedgerSMB is primarily a web UI, it exposes a set of XML/JSON endpoints for CRUD operations on entities such as invoices and customers. These can be consumed by external services or custom scripts.
- Webhooks & Email Hooks: Out‑of‑the‑box support for sending documents via SMTP, including PDF attachments generated on the fly.
- Plugin System: Developers can add new modules by creating a Perl package that hooks into the existing
LedgerSMB::Hooksframework. This allows for custom report generators, integration adapters (e.g., to a shipping carrier), or entirely new business objects. - Internationalization: The application ships with 45 language packs and uses
Locale::gettextfor runtime translation, enabling developers to localize both UI and report templates.
Deployment & Infrastructure
LedgerSMB is designed for self‑hosting but also embraces modern DevOps practices. A Docker image (ledgersmb/ledgersmb) is maintained, providing a reproducible environment that bundles Perl, PostgreSQL client libraries, and the web server configuration. For production, a typical deployment includes:
- A reverse‑proxy (nginx) forwarding
/to the CGI script. - PostgreSQL running as a separate container or on a dedicated database host, with encrypted connections (
SSL). - Optional load balancing across multiple CGI instances to handle high transaction volumes; the stateless nature of CGI scripts makes scaling straightforward.
The application scales horizontally by adding more web instances behind a load balancer, while the database layer can be tuned with connection pooling (e.g., DBIx::Connector) and read replicas for reporting workloads.
Integration & Extensibility
- API First: Developers can build custom integrations (e.g., syncing with a CRM or e‑commerce platform) by consuming the built‑in JSON endpoints.
- Event Bus: Internal events (e.g.,
invoice_created) are emitted to a simple pub/sub system, allowing external services to react asynchronously. - Custom Reports: Using the template engine and database views, developers can author complex analytical reports without modifying core code.
- Extensible Data Model: The schema is designed for extensibility; new tables can be added and linked via foreign keys, with minimal impact on existing modules.
Developer Experience
The codebase follows the CII Best Practices guidelines, with continuous integration, static analysis (CodeQL), and coverage checks. Documentation is split into a developer guide (API usage, plugin development) and a user manual (templates, configuration). Community support is active on GitHub Issues, mailing lists, and several social channels. The GPLv2 license ensures freedom to modify and redistribute while encouraging contributions back to the core.
Use Cases
- Small‑to‑Mid Size Enterprises: Companies with thousands of transactions weekly can run LedgerSMB on a single server, leveraging PostgreSQL’s robustness.
- Custom ERP Development: Organizations needing a tailored workflow can extend the plugin system to add domain‑specific modules (e.g., field service management).
- Data‑Driven Reporting: The rich reporting API and template engine make it ideal for building dashboards that pull directly from the accounting data.
- Compliance‑Heavy Environments: Multi‑currency and fixed‑asset depreciation features satisfy regulatory requirements in finance‑centric industries.
Advantages
- Performance & Reliability: Perl’s mature ecosystem and PostgreSQL’s transactional guarantees provide a fast, dependable foundation.
- Flexibility: The loosely coupled architecture allows developers to swap out components (e.g., replace CGI with FastCGI) without rewriting the application.
- Open Source & Free: GPLv2 licensing removes vendor lock‑in and permits full source inspection, critical for audit‑intensive sectors.
- Extensible UI & Output: The template system lets developers deliver branded PDFs or integrate with external document services without touching core code.
In summary, Ledger
Open SourceReady to get started?
Join the community and start self-hosting LedgerSMB today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Zero-K
Free, physics‑based RTS with vast units and maps
Meelo
Self-hosted music server for collectors with flexible browsing and playback
LubeLogger
Self‑hosted vehicle maintenance and fuel tracker
Bludit
Fast, Flat‑File CMS for quick sites and blogs
Databag
Federated, end‑to‑end encrypted messenger for self‑hosting
not3
Fast, self-hosted paste sharing for developers and teams