Article
What multi-tenancy is, and when your app needs it
Multi-tenancy means one app serves many customer organizations while keeping each one’s data separate, so none of it leaks to another. Your app needs it as soon as you sell it to more than one business. Every record belongs to a customer, and the server checks it on every request.
What it looks like to your customers
Each business that signs up sees only its own customers, jobs, documents and staff. Its staff log in to the same app as everyone else’s, at the same address. They never see another business’s data, or know it’s there.
Signs your app needs it
- You’re selling the app to more than one business.
- Each business has its own staff, with their own logins.
- A business would be upset, or in legal trouble, if another one saw its data.
When each customer is one person
If each customer uses the app alone, such as a personal goals or budgeting app, their data still has to be private. The server checks that each record belongs to the person asking. That’s a normal app with logins, not multi-tenancy. Multi-tenancy starts when people in the same business share data with each other but not with other businesses.
What I build to keep data from leaking
The job is to keep each business’s data separate, so none of it reaches another business.
- Every record belongs to a business. Each one is tagged with the organization that owns it.
- The server checks it on every request. It works out the business from the signed-in account, never from what the app sends, and returns only that business’s records.
- Every way out goes through the same check: screens, search, file downloads, exports, reports and emails.
- Roles live inside each business. A manager at one business can manage their own staff, and no one else’s.
- Automatic checks try to reach another business’s data after every change, and must be refused.
- Your own admin view sits above them all, for support and billing.
Add it early
Adding multi-tenancy to an app that already has customers’ data mixed together is a bigger job than building it in from the start. If you plan to sell to more than one business, build it in now.
FAQ
Can each business have its own branding? Yes. Their logo, colors and name can be set per organization, on the same app.
Can a person belong to two organizations? Yes, if your business needs it, such as an accountant working for several clients. It’s decided up front.
Does each business need its own database? Usually not. One database with every record tagged by its owner is the common setup.
Selling your app to more than one business?
Tell me what it does and how your customers are set up, and I'll tell you what multi-tenancy it needs.