Quick start
Fastest path to a running ledger with both books available locally.
Prerequisites
- Docker Desktop
- Node 18+, pnpm 9+
- Python 3.12 (for the test suite / one-off scripts)
Bring up the stack
cd apps/ledger
powershell -File scripts/dev-up.ps1
That script:
- Starts Postgres on
:5433. - Runs
alembic upgrade headfor both books (ledger_uae,ledger_ind). - Seeds each book's chart of accounts.
- Starts the UAE backend on
:8077and India backend on:8078. - Starts the UI on
:3100(login token:localdev).
Verify
curl http://localhost:8077/health/ready # UAE → 200
curl http://localhost:8078/health/ready # India → 200
Open http://localhost:3100, sign in with localdev, toggle the India
book in the sidebar.
Hit an endpoint
curl -H "X-Ledger-Token: localdev" http://localhost:8077/v1/firm/summary
curl -H "X-Ledger-Token: localdev" http://localhost:8078/v1/india/nav
curl -H "X-Ledger-Token: localdev" http://localhost:8078/v1/india/lrs
Populate live data (India)
If the local DB is empty, sync from the real brokers:
curl -X POST -H "X-Ledger-Token: localdev" -H "Content-Type: application/json" \
http://localhost:8078/v1/jobs/provision-india -d '{}'
curl -X POST -H "X-Ledger-Token: localdev" -H "Content-Type: application/json" \
http://localhost:8078/v1/jobs/sync-viewtrade -d '{}'
curl -X POST -H "X-Ledger-Token: localdev" -H "Content-Type: application/json" \
http://localhost:8078/v1/jobs/sync-viewtrade-trades -d '{}'
curl -X POST -H "X-Ledger-Token: localdev" -H "Content-Type: application/json" \
http://localhost:8078/v1/jobs/sync-glomopay -d '{}'
curl -X POST -H "X-Ledger-Token: localdev" -H "Content-Type: application/json" \
http://localhost:8078/v1/jobs/sync-viewtrade-ledger \
-d '{"start":"2026-06-01","end":"2026-06-30"}'
Run the tests
cd apps/ledger
./.venv/Scripts/python.exe -m pytest tests/ -q