Multi-tenant SaaS architecture, designed to not break at the second milestone
SaaS architecture decisions in the first month set the ceiling on what the product can do in year three. We design tenancy, isolation, identity, billing and observability as a connected system from the start, because retrofitting any of them later is almost always more expensive than rebuilding the product.
The common SaaS failure in India is a product that worked beautifully for the first five tenants and became structurally unsound at thirty. The signal is always the same: tenants starting to see each other's data in edge cases, the single-tenant trial customer who cannot be onboarded without a database export, the per-user billing that cannot handle a tenant with a thousand seats, the observability dashboard that collapses into one tenant's noise. The root cause is always architectural decisions made too early with too little specificity.
We design SaaS foundations with three architectural questions answered before any code ships: what is the tenancy model (shared schema, schema-per-tenant, database-per-tenant), what is the isolation guarantee (how do we prove tenant A cannot see tenant B's data), and what is the on/off-boarding story (how do we add a tenant in under ten minutes and remove one cleanly). The answers are specific to your market and compliance posture — a SaaS for Indian CA firms has very different answers from one for US healthcare — and we commit to them before building rather than defaulting to "shared schema, column-level tenant_id" because it is the easiest first move.
On top of the tenancy decisions sit the cross-cutting concerns: identity (your users, your tenants' users, SSO, invite flows), role-based access control within each tenant, billing that can handle usage, seat and tier changes without manual intervention, observability that lets you answer "what did tenant X see yesterday" without breaking isolation, and a feature-flag system for staging rollouts. These together are the spine of the product. Get them right and every feature after them is cheaper to build; get them wrong and every feature compounds the debt.
Tenancy models, chosen honestly
There are three serious tenancy models and the choice depends on your compliance obligations, your largest expected tenant and your operational budget. Shared schema with tenant_id columns is cheapest to run and hardest to prove isolated — fine for consumer SaaS with modest per-tenant data, dangerous for regulated B2B. Schema-per-tenant inside one database is the sensible default for most Indian B2B SaaS — isolated at the schema level, operationally cheap, and keeps cross-tenant analytics reasonable. Database-per-tenant is expensive to run but the right call for compliance-heavy or very large tenants.
We will have this conversation in the first week and the answer gets committed before data model work begins. Mixing models later is a six-month migration project; choosing honestly at the start takes a day.
In practice
Identity, RBAC and the audit trail
Identity in a SaaS is deceptively complicated. You have platform users (your staff), tenant users, and in B2B often the hierarchy of a tenant customer's own organisation with roles and sub-orgs. Getting this right in the first month is the difference between adding SSO in a week later and a two-month rewrite.
Our standard pattern uses an identity service (Clerk, Auth0, Supabase Auth or a WorkOS integration depending on compliance) with role-based access control stored in the application database. Every state-changing action is audit-logged with actor, tenant, action, object and timestamp. This log is what survives a legal request six months from now when a tenant customer wants to know who changed what — it is also what makes a dispute over a tenant's data provable rather than argumentative.
Every engagement starts with a conversation, not a proposal template.
Thirty minutes with a senior engineer. You leave with an architecture sketch and an honest cost range, whether or not you hire us.
Billing, usage and the lifecycle
Billing is where most Indian SaaS products hit the wall. Flat-rate monthly subscriptions implemented via Razorpay or Stripe handle the first thirty tenants. Usage-based billing, seat changes mid-cycle, pro-rata upgrades, downgrades, tax across states, and the twenty specific edge cases a sales team eventually negotiates each break a flat implementation.
We design the billing layer as a separate service that reads events from the product (tenant.created, user.added, invoice_item.recorded) and emits bills — this lets the billing logic evolve without touching the product. We integrate Razorpay for Indian tenants and Stripe for international, with a tax engine that handles GST across states and VAT / sales tax for global customers.
Every engagement starts with a conversation, not a proposal template.
Thirty minutes with a senior engineer. You leave with an architecture sketch and an honest cost range, whether or not you hire us.
Everything hands over. No lock-in, ever.
Source code in your Git organisation, infrastructure in your cloud account, domains in your name and documentation written for the next team rather than for us. If you part ways with us in year three, a competent engineer should be able to take over in a fortnight.
Deliverables checklist
- Architecture decision records (ADRs) for tenancy, identity, billing
- Infrastructure-as-code (Terraform / Pulumi) for the environment
- CI/CD pipeline with staging and production
- Identity provider configured with SSO support
- RBAC schema and audit-log pipeline
- Billing service integrated to Razorpay / Stripe
- Observability stack (Sentry, logs, metrics, per-tenant dashboards)
- Feature-flag service wired into the product
- Runbook for common operations (onboarding, archival, incidents)
The questions clients actually ask
Including the ones where the honest answer is that you may not need us. If your question is not here, call +91 70033 91355 — you will speak to an engineer, not a call handler.
Usually a 12–20 week architecture and foundation build at the start of a SaaS product, often paired with an ongoing engineering retainer after. Occasionally it is a rescue engagement for a product that reached 20–50 tenants on an unsound foundation and needs a controlled migration without rewriting everything.
₹8,00,000 to ₹25,00,000 for the foundation build depending on scope. A rescue engagement (migration to a sounder architecture while in production) is usually ₹6,00,000–₹15,00,000. These are large numbers because the work is skilled, and because the cost of getting it wrong is almost always ten times higher.
Either. Most engagements build the foundation plus the first version of the product on it (usually another 12–20 weeks). Some engagements are foundation-only with your in-house team continuing from there — we do the handover and a 60-day support period.
TypeScript across the stack. Next.js for the application frontend and API, Node.js for background workers, PostgreSQL for the primary database with Redis for caches and queues, deployed on AWS or a managed platform (Render, Railway, Fly) depending on your scale. We will use a different stack if there is a reason; we will push back on using a different stack purely for taste.
By default we deploy in AWS ap-south-1 (Mumbai) for data residency compliance under the DPDP Act. For products with global tenants we add a regional deployment per data jurisdiction with per-tenant region pinning. Cross-region analytics happens in a separate warehouse with controls on PII movement.
Standard stack is Sentry for errors, Grafana / Cloudwatch / Datadog for metrics and logs (choice depends on volume economics), and a per-tenant view that lets you answer "what is happening in tenant X right now" without compromising isolation. A runbook for common incidents is delivered as part of the handover and is kept current through the retainer.
Services that pair with this
View everythingTell us what is slowing your business down.
A 30-minute call with a senior engineer — not a salesperson. You leave with an architecture sketch and an honest cost range, whether or not you hire us.
Direct line
+91 70033 91355Mon–Sat · 9:30 AM – 7:30 PM IST · Sealdah, Kolkata