Paisa · Developers
Documentation

It is a library before it is an app.

The engines are pure TypeScript with no runtime dependencies. You can import them, drive them from tests, and get the same answers the product does.

Shape

How it fits together.

The core

Money as branded bigint paise, a chart of accounts whose types fix normal balance sides, an append-only journal, and a ledger that projects over it. Statements, cash flow, health scoring, invoicing, tax and bank feeds build on those.

The ERP layer

attachErp(org, options) layers periods, contracts, revenue recognition, payables, schedules, FX, reconciliation, metrics, close management, agents and connectors onto an organization — additively, without changing the core.

The command registry

Every mutation that can reach the engines is enumerated. A command not in the registry is refused rather than executed, so the surface that survives a restart is a list you can read rather than a property you have to trust.

The AI layer

A provider interface, an orchestrator that routes every tool call through the engines, and verifyNarration, which rejects any answer containing a figure no tool produced.

Run it

Three commands.

The demo

npm install && npm run build && node demo/server.js — the site, the assistant dashboard and the ERP console, on a seeded company.

The full quarter

node demo/erp-close.js — CRM sync through contract, billing, recognition, subledgers, agents, close and lock, printed as it happens.

Persistence

node demo/persistence.js — records one month per invocation into an on-disk Postgres and rebuilds the books from the log each time. Run it repeatedly; the books grow across processes and nothing is ever written out as state.

The tests

npm test — the whole suite, including replay-identity against real Postgres compiled to WASM rather than a mock.

Read the specs next.

Every decision, with its reasoning and the bugs the tests caught.