Simple Double Entry
Accounting in PHP

Simple. Intuitive. Accounting. Discover a modern bookkeeping solution that's completely free and modern using websites: PHP files for downloading, building finance, ERP, or analytics features.

GitHub Stars GitHub Forks GitHub Issues Last Commit

Everything You Need for Accounting

Get everything for accounting in a simple toolsuite, in one main class, the developers are new or advanced powering your next project.

Double-Entry Accounting

Implements proper double-entry bookkeeping principles for accurate financial tracking.

Framework Agnostic

Works with any PHP framework or can be used standalone. No heavy dependencies.

MySQL Integration

Optimized for MySQL with efficient queries and proper database design.

Testable & Reliable

Built with testing in mind, ensuring your financial data is always accurate.

Extensible

Modular design allows easy customization and extension for your specific needs.

Lightweight

Minimal footprint with maximum functionality. Perfect for performance-critical applications.

Launch with Ease

Simple download and start building finance-powered apps today!

Installation
git clone https://github.com/rmak78/phpledger.git
cd phpledger
Basic Usage
<?php
require_once 'config/database.php';
require_once 'classes/Ledger.php';

// Create a new ledger instance
$ledger = new Ledger($pdo);

// Create accounts
$assets = $ledger->createAccount('Assets', 'ASSET');
$revenue = $ledger->createAccount('Revenue', 'REVENUE');

// Record a transaction
$transaction = $ledger->createTransaction([
    ['account_id' => $assets, 'debit' => 1000, 'credit' => 0],
    ['account_id' => $revenue, 'debit' => 0, 'credit' => 1000]
], 'Sale of products');

echo 'Transaction recorded successfully!';
?>

Who Is It For?

PHP developers building finance, ERP, or analytics features who need a clear ledger model. Perfect for applications requiring accurate financial tracking and reporting.

Documentation & Resources

Everything you need to get started and contribute.

Frequently Asked Questions

PHP Ledger is actively maintained and used in production environments. However, as with any financial software, we recommend thorough testing in your specific use case before deployment.

No! PHP Ledger is framework-agnostic and can be used standalone or integrated with any PHP framework like Laravel, Symfony, or CodeIgniter.

PHP Ledger uses MySQL for data persistence. You'll need to set up the database schema and configure the connection. Sample SQL files are included in the repository.

PHP Ledger is open-source software. Please check the LICENSE file in the repository for specific licensing terms.

We welcome contributions! Please check out our GitHub repository for issues to work on, or submit bug reports and feature requests.