<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Sthan CRM</title>
    <description>The latest articles on DEV Community by Sthan CRM (@sthancrm).</description>
    <link>https://dev.to/sthancrm</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4265927%2F2d3e6f1d-d035-40a2-867c-00a427b23903.png</url>
      <title>DEV Community: Sthan CRM</title>
      <link>https://dev.to/sthancrm</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sthancrm"/>
    <language>en</language>
    <item>
      <title>Building a multi-tenant real-estate CRM for Indian developers: 5 decisions we'd make again</title>
      <dc:creator>Sthan CRM</dc:creator>
      <pubDate>Thu, 26 Nov 2026 04:39:53 +0000</pubDate>
      <link>https://dev.to/sthancrm/building-a-multi-tenant-real-estate-crm-for-indian-developers-5-decisions-wed-make-again-4f1h</link>
      <guid>https://dev.to/sthancrm/building-a-multi-tenant-real-estate-crm-for-indian-developers-5-decisions-wed-make-again-4f1h</guid>
      <description>&lt;p&gt;We build &lt;a href="https://sthan.org" rel="noopener noreferrer"&gt;Sthan&lt;/a&gt;, 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Money is an integer of paise. Always.
&lt;/h2&gt;

&lt;p&gt;A ₹1.47 crore flat is &lt;code&gt;1470000000&lt;/code&gt; 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.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Every query is scoped by tenant, and the scope is enforced, not remembered
&lt;/h2&gt;

&lt;p&gt;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.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Migrations are additive and reversible
&lt;/h2&gt;

&lt;p&gt;Add a column, backfill, switch reads, then (much later) drop. Staging gets every change first; production only moves a commit that was green on staging.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. PII stays off the wire unless a screen needs it
&lt;/h2&gt;

&lt;p&gt;Buyer phone numbers and ID-like fields are masked in list responses and logs. The full value is fetched only for the one action that needs it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Inventory holds expire
&lt;/h2&gt;

&lt;p&gt;A unit "held" for a buyer carries an expiry, so two sales executives can't sell the same flat, and a forgotten hold returns the unit to the market on its own.&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;Stack:&lt;/strong&gt; NestJS + Prisma + PostgreSQL on the API, React + Vite on the web, React Native (Expo) for the sales-team app.&lt;/p&gt;

&lt;p&gt;What would you add to this list? Questions welcome in the comments.&lt;/p&gt;

</description>
      <category>saas</category>
      <category>architecture</category>
      <category>postgres</category>
      <category>nestjs</category>
    </item>
  </channel>
</rss>
