Multi-tenant SaaS development
Turning a working product into a product you can sell many times is mostly one hard question: how do you guarantee tenant A can never see tenant B's data? We answer it at the database level, then build billing, plan gating and onboarding on top of that guarantee.
Built for these situations
- Service businesses productising an internal tool they already use daily
- Founders launching a vertical SaaS for a MENA industry
- Teams whose current product isolates tenants in application code and knows it is risky
- Products whose users work in poor connectivity and need offline-first clients
Not a fit if
- Single-customer internal tools — multi-tenancy adds cost you would not recover
- Ideas with no first paying customer identified; the tenancy model needs a real user
- Teams wanting a SaaS shell with no thinking about pricing or plan boundaries
What usually goes wrong
Isolation enforced in application code
One missing `where tenant_id = …` is a data breach. Relying on every developer remembering it on every query is a policy, not a guarantee.
Plans are a marketing page, not a system
If limits and feature gates are not enforced in code, upgrades never get triggered and the pricing page becomes fiction.
Onboarding needs you in the room
If a new tenant cannot be provisioned, seeded and running without manual work, growth is capped by your calendar.
The app dies without internet
In many MENA settings — classrooms, warehouses, clinics — connectivity is intermittent. A cloud-only client is unusable exactly when the work happens.
What Makhloof Studio actually delivers
Isolation at the database
Postgres Row-Level Security with tenant scoping, so a forgotten filter returns nothing instead of returning someone else's data. The guarantee holds even when the application code is wrong.
Subscriptions and plan gating
Plans, seats, usage limits and feature flags enforced server-side, with trial, upgrade, downgrade and dunning paths that behave sensibly at the boundaries.
Self-serve tenant provisioning
Sign-up creates a fully seeded workspace — roles, defaults, sample data and invitations — with no manual step from you. Qooty's partner portal works exactly this way.
Offline-first clients where it matters
Local-first data with conflict-aware sync, so the product keeps working on a bad connection and reconciles when it returns — the architecture behind Mudarris running a whole tutoring business on-device.
Shipped, not theorised
Every claim on this page maps to a case study you can read in full.
Typical modules
A realistic scope for this kind of build. Yours will be a subset — the first call is where we cut it down.
Tenancy & access
- Row-Level Security tenant isolation
- Workspace provisioning and seeding
- Roles, permissions and invitations
- SSO-ready authentication
- Per-tenant configuration and branding
- Data export and account deletion
Billing & plans
- Plan, seat and usage limits
- Trials, upgrades and downgrades
- Server-enforced feature gating
- Invoices and payment retries
- Regional payment gateways
- Revenue and churn reporting
Product surfaces
- Web application (Next.js)
- Cross-platform mobile app (Flutter)
- Offline-first sync where needed
- Admin console for your own team
- In-app notifications and email
- Usage analytics per tenant
How this gets built
- 01
Define a tenant
Is it a company, a branch, or a user? Everything downstream — billing, permissions, data model — follows from this one decision, so it is made deliberately.
- 02
Isolate before you build features
Tenancy and access control land first. Retrofitting isolation into a live product with real customer data is the most expensive rewrite in SaaS.
- 03
Ship a paid-ready MVP
The first release includes billing and plan gating, not just the core workflow. A SaaS that cannot charge is a demo.
- 04
Instrument, then iterate
Per-tenant usage analytics from day one, so the next features are chosen from evidence instead of the loudest customer.
Typical stack
Worth knowing before you write.
A short, honest filter. It saves us both a call that was never going to work.
Not a fit
- 1A team of ten starting Monday
- 2A fixed budget before any scope exists
- 3Shopping for the cheapest quote
- 4Equity-only work or an unpaid prototype
A good fit
- 1A real business or funded idea, and a decision-maker
- 2Money, roles or operations have to be correct
- 3Arabic and English both matter to your market
- 4A few hours a week for reviews and decisions
You bring
rough is fine- What the business does today
- The workflow that hurts most
- Who logs in, and what they do
- A real deadline and a budget range
You leave with
straight answers- Buildable as imagined — yes or no
- The two or three decisions driving cost
- Phases, surfaces and where the risk sits
- An honest ballpark — or a referral
Answered straight
- A.
Separate databases per tenant are simple to explain and painful to operate — migrations, backups and cross-tenant reporting all multiply. Row-Level Security gives you a database-enforced guarantee with one schema to maintain. Where a customer genuinely requires physical separation, that is a per-tenant decision rather than the default.
Written for buyers, not for engineers.
Need a SaaS platform like this?
Tell us who your first paying tenant is and what they do every day. That is enough to shape a first release.

