Skip to main content

Two books, one engine

Valura runs two legal entities. The ledger runs the same accounting logic against two databases, one per entity.

Why not one database

  • Different regulators. SCA (UAE) and IFSCA (India) each expect their own audit trail. Consolidating into one DB blurs the boundary.
  • Different custodians. UAE settles through GTN + Aldar; India settles through ViewTrade IFSC. Different reconciliation partners.
  • Different tax regimes. India has LRS caps, TCS, capital-gains, Schedule FA. UAE has VAT on fees. Mixing them creates false comparisons.
  • Different blast radius. A data-loss incident on India shouldn't touch UAE, and vice versa.

Why not two codebases

  • Same accounting engine. Double-entry is universal — the rules don't change per entity. Forking the code would create two versions of the same thing and guarantee they'd drift.
  • Cross-country learning. A recon improvement built for India benefits UAE, and vice versa.
  • Team. One team, one deploy pipeline, one skillset.

What's shared vs per-book

Shared:

  • The accounting engine — same debits, same credits, same posting rules.
  • The database schema — same tables, same migrations.
  • The reconciliation framework — same categories, same alert path.
  • The frontend — same UI, book toggle in the sidebar.

Per book:

  • The database instance — ledger_uae and ledger_ind.
  • The chart of accounts — UAE has AED, gold, private-markets accounts India doesn't need; India has FX-spread receivable and ViewTrade payable UAE doesn't need.
  • The sources — GTN + ZAG (UAE), ViewTrade + GlomoPay (India).
  • The tax / compliance reports — India has LRS, TCS, capital-gains, dividends, Schedule FA; UAE doesn't need them.

The "byte-identical UAE" rule

Every India feature is written so the UAE code path is UNCHANGED. India reports live in the same code repository but only fire against the India book. When they run against UAE, they degrade gracefully — the India-only tables are empty on UAE, so India reports return safe zeros.

This means:

  • No India change can accidentally break the UAE book.
  • Adding a third entity later is additive — no fork needed.

What a user sees

The Ledger UI has a book toggle in the sidebar. Click "India" and every page (dashboard, transactions, reports, reconciliation) switches to the India database. Click "UAE" and it flips back. Behind the scenes, the frontend talks to a different backend per book.

The India-only pages (Capital Gains, Dividends, NAV / MTM, Schedule FA, FX Margin, Ops & Audit) only appear in the sidebar when the India book is selected.