We build Sthan , a CRM for Indian real-estate developers. It handles leads from property portals, ads and WhatsApp, site visits, tower and unit inventory, bookings, construction-linked payment plans and possession. One codebase serves every builder (tenant). These are the decisions that held up.
1. Money is an integer of paise. Always.
A ₹1.47 crore flat is 1470000000 paise. No floats, no decimals in transit, and formatting happens only at the edge. Cost sheets, GST lines and demand notes add up to the paisa, and every rounding rule lives in one module with tests.
2. Every query is scoped by tenant, and the scope is enforced, not remembered
The tenant id comes from the session, never from the request body. Raw SQL is treated as a privileged act: each raw query is listed, reviewed and scanned in CI, so a cross-tenant path can't slip in quietly.
3. Migrations are additive and reversible
Add a column, backfill, switch reads, then (much later) drop.…