A multi-tenant system serves multiple organizations using the same application. The most important invariant is simple: a user from one organization must not access records belonging to another. Tenant identity should come from the authenticated session or validated membership, not from a company ID supplied unchecked by the browser. Every list query, record lookup and mutation must be constrained to the active tenant. Apply the same rule to nested resources: a unit must belong to a property owned by the selected company. Transaction boundaries matter. A property or lead creation workflow may insert several related records, fire domain events and schedule notifications. First commit a consistent database state; then dispatch side effects using a reliable outbox or after-commit mechanism where appropriate. Background workers must carry the tenant context explicitly and re-check permissions where necessary. Testing is the strongest safeguard. Create two tenants with separate data and verify that every endpoint rejects cross-tenant IDs. Test exports, file access, filters, search, dashboards and background jobs too. Tenant isolation is not a single middleware; it is a property of the whole application.