03SaaS development
The unglamorous foundations that make a SaaS product sellable.
Ways to engage
- New platform build in milestones
- Hardening sprint for an existing product: tenancy, billing or SSO
Reference architecture
A multi-tenant platform, ready for enterprise questions
Tenant isolation, enterprise identity, billing and support tooling: the parts buyers ask about before they ask about features. Scroll to connect them.
0105
Tenant context on every request
Custom domains and workspaces resolve to a tenant at the edge. The API carries that context into every query, cache key and log line, so isolation never depends on a WHERE clause someone might forget.
- Custom domains
- Tenant context
- NestJS
0205
Enterprise identity
Each organization brings its own SAML or OIDC provider. SCIM keeps users and groups in sync, and fine-grained permissions decide what each role can touch.
- SAML
- OIDC
- SCIM
- RBAC
0305
Isolation you can explain
Most tenants share tables protected by PostgreSQL row-level security; customers who need it get a dedicated database. The choice is written down, with its exit path.
- Row-level security
- PostgreSQL
- Dedicated databases
0405
Billing that reconciles
Usage is metered as idempotent events. Stripe is the source of truth for money; webhooks mirror it into the product, and a nightly job checks both sides agree.
- Stripe Billing
- Metering
- Webhooks
0505
Support without raw SQL
An admin console with consented impersonation and per-tenant feature flags, and an append-only audit log of every privileged action, exportable for security reviews.
- Admin console
- Audit log
- Feature flags
You might need this if
- Your first enterprise prospect sent a security questionnaire and you're not sure how to answer it.
- Tenant data is separated by a WHERE clause somebody might forget.
- Billing logic is spread across webhooks, cron jobs and the frontend.
- Support needs an admin console, but engineers are running SQL by hand.
What I can own
- Tenancy model: shared schema with row-level security, schema per tenant or database per tenant, chosen by isolation needs and cost
- Organizations, invitations, roles and fine-grained permissions
- SSO (SAML and OIDC) and SCIM provisioning for enterprise customers
- Subscription billing, metered usage, trials, proration and dunning with Stripe
- Admin and support tooling: consented impersonation, audit trails and per-tenant feature flags
- Data export, retention and deletion workflows
Deliverables
What you receive.
- Tenancy and access model
- A documented isolation strategy, enforced in the database and verified at the API layer.
- Billing integration
- Plans, metering and webhook handling that reconciles against the provider, with idempotent event processing.
- Admin console
- Search, tenant management, support actions and an audit log of who did what, and when.
- Security questionnaire answers
- Plain-language answers and evidence for common questionnaire items: encryption, backups, access control and logging.
- Operational dashboards
- Per-tenant usage, error rates and the metrics that warn you before a customer does.
How it runs
The approach, step by step
- 01
Decide the tenancy model
Isolation requirements, customer count and operating cost decide between shared and dedicated data. The choice is written down with its exit path.
- 02
Build identity and access
Organizations, roles, invitations and SSO come early, because retrofitting them touches everything.
- 03
Wire billing to reality
The billing provider is the source of truth for money; your database mirrors it through idempotent webhooks and nightly reconciliation.
- 04
Make it supportable
Admin tools, audit logs and feature flags let support solve problems without an engineer and a SQL prompt.
Typical tools
Chosen per project for fit and longevity, not by habit.
Backend
Data
Identity
Billing
Frontend
Technology pages
Delivered with specialists who join the project, with me leading the architecture and review.
Production work
Where I’ve done this in production.
Related work
See it in practice
Questions
Keep exploring
Other services
Next step
Tell me what you’re building. I’ll tell you how I’d approach it.
Send a short brief. You’ll get a written reply from me within two business days — either a few clarifying questions, a suggested first step, or an honest “I’m not the right fit” with a pointer elsewhere.
Parth Patel
Senior full-stack engineer