When you build one SaaS product, you can get away with shortcuts. When you build several, every shortcut gets copied — and every bug with it. That is why every product in our portfolio starts from the same multi-tenant core.
What "multi-tenant" means in practice
A tenant is a customer organization: a pharmacy, a school, a print shop. Multi-tenancy means one running system serves many of them, while each one only ever sees its own data.
The rule we enforce everywhere is simple: the server decides which organization a request belongs to — never the client. The organization comes from the authenticated session, not from a field in the request body. That single rule closes a whole class of data-leak bugs.
The pieces every product inherits
- Organization-scoped data. Every list query is filtered by organization. A record that belongs to another tenant returns not found, not forbidden — so it does not even confirm the record exists.
- Role-based access. Owners, managers, and staff get different permissions, checked on the server for every action.
- Audit trails. Important changes are logged, so a customer can answer "who changed this, and when?"
- A versioned API. Every product exposes a consistent
/api/v1design with predictable success and error envelopes.
Why it is worth the upfront effort
Retrofitting tenancy into a product that was built for one customer is one of the most expensive rewrites in software. Starting with it costs a little more in week one and saves months later.
It also makes launching new products faster. When Dawai or EduPortal started, authentication, roles, organization scoping, and deployment were already solved — the team could spend its time on the parts that make each product unique.
The takeaway
If you are planning a SaaS product, decide how tenants are isolated before you write your first feature. It is the one architectural choice that touches everything else.
- #SaaS
- #Architecture
- #Security