ledgerforge README

README проекта с github.com/devaccuracy/ledgerforge. Одним файлом markdown: README.md.

LedgerForge

The ledger for AI-native money movement

The system of record for fintech wallets, payouts, marketplaces and billing — with spending limits that keep AI agents in check and an audit trail you can prove.

Latest release Build and Test License: Apache 2.0 Go 1.26.9 or later Go Reference

Website · Docs · Cloud · Changelog · Roadmap

Open-source core (Apache 2.0) · Managed with LedgerForge Cloud · Enterprise

LedgerForge is an open-source double-entry ledger. It records wallet transfers, payouts, billing activity, reservations and refunds in exact integer units, backs that history with a verifiable audit chain, and enforces spending policies on every API key, including the keys your AI agents use. Use it through an HTTP API, a Go library or a local MCP server.

PostgreSQL stores the financial records and Redis runs queues and background workers; search and observability services are optional. LedgerForge records money movement. Connecting payment rails and defining your accounting model remain application responsibilities.

Use cases

Why LedgerForge

Accounting guarantees

See ledger concepts for amount handling, balance semantics and asynchronous transaction states.

Quickstart: a balanced transfer

Requires Docker with Compose and Python 3:

git clone https://github.com/devaccuracy/ledgerforge.git
cd ledgerforge
./examples/quickstart/start.sh
./examples/quickstart/transfer.sh

This local-only demo builds the current checkout, generates a random master key, runs migrations and binds the API to 127.0.0.1:5001. It creates two USD balances and posts 12.50 synchronously using integer units. The source gets a bounded demo overdraft of 12.50; the result is -1250 and 1250 units, with equal total debits and credits. A retry with the same reference must leave those balances unchanged.

source: -1250 units
destination: 1250 units
total debits = total credits = 1250 units
reference retry: balances unchanged

Stop it with docker compose -p ledgerforge-demo -f examples/quickstart/compose.yaml down. The example guide covers the API payload, credentials and cleanup. These credentials and database defaults are for local use only; read the deployment guide before exposing a service.

Install

Run ledgerforge version to confirm what you installed, then follow the deployment guide and run ledgerforge migrate up before starting the server. Before upgrading an existing database, read the integrity upgrade notes.

Run the published image locally

cp ledgerforge.example.json ledgerforge.json
# Replace server.secret_key with a random secret before starting.
# For example, generate one with: openssl rand -hex 32
docker compose up -d

The config explicitly enables authentication. API requests use the X-LedgerForge-Key header. Keep ledgerforge.json private and out of version control. The :main image tracks tested main-branch commits; pin a release tag or digest in production with LEDGERFORGE_IMAGE.

Open source and LedgerForge Cloud

Everything in this repository is free and open source under Apache 2.0: the ledger, verification and audit tooling, agent spending policies and approvals, the MCP server and the release artifacts. There are no license keys or feature gates, and you can run it in production yourself.

LedgerForge Cloud is a service, not different software: it operates the same open-source core for you.

Open source LedgerForge Cloud Enterprise
What it is The software in this repository Managed LedgerForge deployments, operated per customer Contracted deployment, support and review services
Ledger, verification, agent policies, MCP server Included Same open-source core Same open-source core
Who operates it You The LedgerForge team (dedicated infrastructure per customer) You or the LedgerForge team, per contract, including in-VPC deployments
Upgrades, backups and monitoring You Operated for you Agreed per contract, with migration and integration assistance
Verification and audit checkpoints You run ledgerforge verify and audit export Scheduled ledgerforge verify runs with audit checkpoints exported and anchored for each deployment Architecture and audit reviews
Support Community, through GitHub Onboarding and support SLA and support plan agreed per contract; priority security response
Hosted multi-tenant service with a dashboard — Planned (roadmap) —
Price Free Request access Contact sales
Get started Quickstart Request access Contact sales

Documentation

The documentation index lists every guide. Start with:

Online documentation is at ledgerforge.io/docs. The roadmap describes what is planned and the changelog records what has shipped.

Development

make verify
make test-integration
make vuln
make cover

CONTRIBUTING.md covers prerequisites, isolated integration tests and pull request expectations.

Community, support and license

Licensed under Apache 2.0. Required notices are in NOTICE.md.

ledgerforge (devaccuracy/ledgerforge)

Ищем в базе…

Что это такое?LedgerForge — это открытый леджер двойной записи, который фиксирует переводы между кошельками, выплаты, биллинговую активность, резервирования и возвраты в точных целых единицах для финтех-кошельков, маркетплейсов и ИИ-агентов, которые перемещают деньги.
Это система, которую я развёртываю сам, или облачный API-сервис?Это самостоятельно развёртываемая система учёта: сервер на Go, который работает с PostgreSQL (а для очередей — с Redis) и который вы разворачиваете сами. Использовать его можно через HTTP API, библиотеку на Go или локальный MCP-сервер. Также существует управляемый вариант LedgerForge Cloud.
Как попробовать перевод, прежде чем разворачивать это по-настоящему?Запустите локальную демонстрацию быстрого старта через Docker Compose и Python 3. Она соберёт текущую версию репозитория, выполнит миграции, привяжет API к 127.0.0.1:5001 и отправит сбалансированный перевод на 12,50 между двумя демо-балансами в USD.
Что нужно запустить помимо самого бинарника LedgerForge?PostgreSQL хранит финансовые записи, а Redis обслуживает очереди и фоновые воркеры. Сервисы поиска и мониторинга являются необязательными дополнениями.
LedgerForge сам проводит деньги через платёжные каналы?Нет, он только фиксирует движение денег. Подключение реальных платёжных каналов и определение собственной модели учёта остаются задачей вашего приложения.
Нужен ли тариф Enterprise или Cloud, чтобы использовать это в продакшене?Нет. Всё — леджер, инструменты проверки, политики расходов агентов и MCP-сервер — бесплатно по лицензии Apache 2.0, без лицензионных ключей и ограничений функций, и вы можете запускать это в продакшене самостоятельно. LedgerForge Cloud и Enterprise — необязательные управляемые или контрактные тарифы поверх того же ядра.
Для чего используется MCP-сервер?Он позволяет ИИ-агентам подключаться к леджеру по протоколу Model Context Protocol. Сервер привязан к конкретному API-ключу, поэтому расходы агента остаются в пределах лимитов этого ключа, которые проверяет сам сервер.
Как не дать ИИ-агентам перерасходовать деньги?Каждый агент получает собственный API-ключ с лимитами по валютам, белыми списками, дневными бюджетами и холдами на подтверждение. Эти ограничения проверяет сервер, а не клиент. Делегированные ключи наследуют бюджеты родительского ключа и делят их с ним.
Как убедиться, что леджер не подделан?Команда ledgerforge verify только для чтения повторно проверяет учётные данные по версионированным экспортируемым контрольным точкам аудита. Эти точки можно независимо зафиксировать командой audit verify --anchor.
Как хранятся деньги, чтобы не возникало ошибок округления?Все проводки и балансы хранятся в целых единицах с явно заданной точностью. Например, 1250 при точности 100 означает 12,50. Такой подход исключает потерю точности, которая возникает при вводе чисел с плавающей запятой.
Какие есть похожие проекты?QuantDinger, casdoor, omnara, sentio, labtether, halofy, goshen-email, lago
Автор
devaccuracy
Размер
3.9 MB
Звёзды
323
Возраст
6 мес
Коммиты · 90 дней