MCPcopy Index your code
hub / github.com/devaccuracy/ledgerforge

github.com/devaccuracy/ledgerforge @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
2,067 symbols 8,233 edges 162 files 918 documented · 44%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

LedgerForge

Build and Test Status Docker Build Status Linter Status Contributor Covenant

LedgerForge is a financial infrastructure platform building production-grade, open-source ledger systems for teams that move money.

LedgerForge Core is a high-performance double-entry ledger for developers building wallets, billing systems, reconciliation workflows, and money-movement infrastructure with correctness, traceability, and operational control.

Learn more at ledgerforge.io.

Links

Status

This repository contains LedgerForge Core, the open-source ledger engine for self-hosted deployments.

LedgerForge is built for teams evaluating ledger infrastructure locally, then moving toward production deployment when workload, security, and operating requirements are clear. Managed deployment and hosted operations workflows are handled through private onboarding.

The repository preserves upstream Git history and retains the required Apache License 2.0 attribution documented in NOTICE.md.

Installation

git clone https://github.com/devaccuracy/ledgerforge.git
cd ledgerforge
cp .env.example .env
cp ledgerforge.example.json ledgerforge.json

Example configuration

{
  "project_name": "LedgerForge",
  "data_source": {
    "dns": "postgres://postgres:password@postgres:5432/ledgerforge?sslmode=disable"
  },
  "redis": {
    "dns": "redis:6379"
  },
  "server": {
    "port": "5001"
  }
}

Running locally

Start the bundled services and LedgerForge containers:

docker compose up

Build and run the CLI directly:

go build -o ledgerforge ./cmd/*.go
./ledgerforge --help

Run database migrations:

./ledgerforge migrate up

What LedgerForge Core Provides

  • A double-entry ledger for balances, ledgers, transactions, inflight transactions, scheduled transactions, overdrafts, and historical balance snapshots.
  • Multi-currency balance tracking for accounts and wallets.
  • Transaction workflows including split transactions, bulk transactions, and two-phase commit-style inflight flows.
  • Reconciliation primitives for matching external records against internal ledger activity.
  • Identity and account models for linking financial entities to balances and transaction flows.
  • Webhook, queue, search, metrics, and operational hooks for production financial systems.
  • PostgreSQL-backed persistence with Redis-backed queues and operational workers.

Deployment Options

  • Self-hosted Core: run LedgerForge locally or on your own infrastructure with Docker, PostgreSQL, and Redis.
  • Managed production planning: request private onboarding for workload review, Kubernetes or private-cloud planning, observability, backups, and operating runbooks.

LedgerForge is API-first. Teams can run the open-source Core in their own environment and integrate through the HTTP API or wrap ledger workflows in their own services.

Development

go test -short ./...
make build
docker compose config

go test -short ./... covers the hermetic fast path. Service-backed integration tests expect local PostgreSQL and Redis, which you can start with docker compose up.

Origin And Attribution

LedgerForge is derived from an upstream Apache License 2.0 project.

Original Git history, commit authorship, and license notices are preserved for transparency, attribution, and continuity. Additional origin details are documented in NOTICE.md.

LedgerForge Core is maintained as the open-source foundation of LedgerForge's financial infrastructure platform.

Contributing

Contributions and feedback are welcome. Please read CONTRIBUTING.md and CODE_OF_CONDUCT.md before opening issues or pull requests.

Security

LedgerForge is financial infrastructure software. Please do not open public issues for suspected vulnerabilities. Report security concerns privately to security@ledgerforge.io. See SECURITY.md.

License

LedgerForge is distributed under the Apache License 2.0. Original upstream copyright and license notices are retained where applicable.

Extension points exported contracts — how you extend this code

Cache (Interface)
Cache interface provides the basic operations for a cache system. It includes methods for setting, getting, and deleting [3 …
internal/cache/cache.go
PairLaneCounter (Interface)
(no doc) [3 implementers]
internal/hotpairs/router.go
HookManager (Interface)
HookManager defines the interface for managing hooks. [1 implementers]
internal/hooks/types.go
IDataSource (Interface)
IDataSource defines the interface for data source operations, grouping related functionalities.
database/repository.go
WebhookSender (FuncType)
WebhookSender defines a function signature for sending webhooks.
internal/notification/notification.go
StoreFunc (FuncType)
StoreFunc defines the function signature for storing transactions.
internal/files/files.go

Core symbols most depended-on inside this repo

NewAPIError
called by 297
internal/apierror/apierror.go
Close
called by 289
database/db.go
GetBalanceByIDLite
called by 182
database/repository.go
Start
called by 154
lineage_worker.go
Get
called by 152
internal/cache/cache.go
CreateBalance
called by 119
database/repository.go
NewLedgerForge
called by 97
ledgerforge.go
GenerateUUIDWithSuffix
called by 82
model/model.go

Shape

Function 1,065
Method 843
Struct 129
Interface 13
TypeAlias 11
FuncType 5
Class 1

Languages

Go93%
TypeScript5%
Python2%

Modules by API surface

database/repository.go119 symbols
database/mocks/repo_mocks.go110 symbols
transaction.go95 symbols
tests/loadtest/tools/dashboard/app.js81 symbols
transaction_test.go71 symbols
database/transactions_test.go64 symbols
database/balance_test.go63 symbols
reconciliation.go54 symbols
database/reconciliation_test.go48 symbols
lineage.go41 symbols
internal/search/search.go35 symbols
database/transaction.go34 symbols

Datastores touched

ledgerforgeDatabase · 1 repos
nonexistentDatabase · 1 repos
testdbDatabase · 1 repos

For agents

$ claude mcp add ledgerforge \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact