Complete Documentation
Comprehensive guides covering architecture, integration, and API reference
Production-Ready Double-Entry Bookkeeping for Fintech
A complete double-entry bookkeeping system built for the Keshless fintech application. Every financial transaction creates balanced journal entries with immutable audit trails, ensuring regulatory compliance and accurate financial records.
// 1. Initialize the system
import { initializeAccountingSystem } from './utils/initializeAccounting';
await initializeAccountingSystem();
// 2. Create a P2P transfer
import { ledgerService, transactionTemplatesService } from './services/accounting';
const template = transactionTemplatesService.getUserTransferTemplate(
senderId, // User sending money
recipientId, // User receiving money
100, // Amount (E100)
'REF-12345' // Optional reference
);
// 3. Create journal entry (ACID transaction - POSTED immediately by default)
const { journal, ledgerEntries } = await ledgerService.createJournalEntry(template, {
walletTransactionId: walletTxn._id,
actorId: senderId,
// autoPost defaults to true (industry standard)
// Users receive money instantly, ledger entry is POSTED immediately
});
console.log(`✅ Journal ${journal.journalId} created with ${ledgerEntries.length} entries`);The system consists of:
All amounts are in E (Emalageni) - the system is locked to this currency only.
New to the system? Start with the Getting Started Guide to learn how to initialize and use the accounting system.
Integrating with wallet operations? Check out the Integration Guide for step-by-step instructions.
Need API reference? Browse the API Documentation for detailed service methods and parameters.
Internal Documentation - Keshless Accounting System
Built with VitePress | Production Ready | Currency: E (Emalageni)