How multi-tenant ERP protects customer data.
Multi-tenancy is cheaper to run and far easier to keep current — one codebase, one upgrade, every customer on the same version. But it only earns that efficiency if isolation is enforced in the data layer rather than promised in the interface.
Architecture · 8 min read

01 What multi-tenancy actually buys you
A single-tenant deployment gives every customer their own stack. It is easy to reason about and expensive in every other respect: each upgrade is a separate project, each incident is a separate investigation, and the version a customer is running drifts away from the version you are developing against.
Multi-tenancy collapses that into one system serving many businesses. The customer gets fixes the week they ship instead of the quarter they are scheduled. The trade is that a boundary which used to be physical — separate servers, separate databases — now has to be enforced in software, every single time a record is read.
02 Isolation belongs in the query, not the screen
The failure mode people imagine is dramatic: an attacker breaking out of one workspace into another. The failure mode that actually happens is mundane. A developer adds a report, writes a query against a shared table, and forgets the tenant condition. Nothing looks wrong in testing, because the test database has one customer in it.
The defence is structural. Every workspace in Havenzu has its own slug, its own records, and its own users, and queries are tenant-scoped before they run — not filtered afterwards. Filtering in the interface is a display choice, and display choices can be bypassed by a URL, an export, or an API call. Scoping in the query is the control, because there is no code path that reaches the data without it.
03 Access context, not duplicated data
The lazy way to give a branch manager a branch-sized view is to copy the branch data somewhere they can safely be pointed at. Now you have two copies that have to agree, and a synchronisation job whose failure is silent.
A user’s company and branch assignment should instead decide the records they can reach, against the same underlying data everyone else works in. One record set, many scopes. A group finance view and a single-branch view are then visibly the same measure at different levels, rather than two numbers that need reconciling before anyone can act on them.
04 Modules as a hard boundary
Plan and role gating is often implemented as hiding — the menu item disappears, but the route still resolves for anyone who knows the address. That is a presentation trick, not a permission.
Modules in Havenzu are enabled per company. If the plan or the role does not cover a module, the user gets a clear unavailable message and no route in. Making the boundary explicit is also kinder: a person who cannot find a feature will raise a ticket, while a person told plainly that it is not part of their plan knows exactly what to ask for.
05 Roles built from permissions, not job titles
Hard-coding a handful of roles — admin, manager, staff — works until the first customer whose organisation does not match. Then the workaround is to over-grant, and over-granting is how finance ends up able to edit stock.
Building roles from a permission set instead means finance, sales, and operations each get their own scope, defined by what they need to do rather than by which of three buckets they most resemble. Users carry a role, department, company, and branch, and the combination decides the surface they see.
06 The audit trail answers what isolation cannot
Isolation prevents the wrong read. It says nothing about the right one. When a figure is questioned six weeks later, the useful question is rarely "could someone else have seen this?" — it is "who changed it, and when?"
Recording significant actions is what turns a claim into evidence. It is also the control that survives contact with reality, because it does not depend on anyone predicting in advance which record would matter.
07 What to ask a vendor
Three questions separate a real answer from a reassuring one. Where is the tenant boundary enforced — in the query layer, or in the interface? What happens when a user requests a URL belonging to another workspace? And what exactly is recorded when a record changes?
A vendor who can answer those concretely has thought about the problem. A vendor who answers with a compliance badge has bought a certificate. The two are not the same thing, and only one of them is load-bearing when something goes wrong.