- Put a tenant ID on every record from the first day.
- Buy authentication and billing. Build what makes you different.
- Support, onboarding and billing edge cases are part of the product.
- Our SaaS projects start from $9,999 (₹8,49,000) and typically take 10 to 16 weeks.
On this page
- Before architecture: prove the problem
- Choose a tenancy model
- Start with a modular monolith
- A dependable stack
- Accounts, teams and roles
- Billing is harder than it looks
- Security basics, from the start
- Build in this order
- Onboarding decides retention
- Operate it
- Numbers to watch
- Cost and timeline
- Common questions
A SaaS product is a web application plus a business that runs without you: people sign up, pay, invite colleagues, get help, upgrade and leave. Much of the work is in that second half. This guide covers both, in the order we would build them.
Before architecture: prove the problem
You should be able to complete this sentence: "[Role] at [type of company] spends [time or money] on [problem] and currently uses [workaround]." If you cannot name ten people who fit, start with our MVP guide.
Choose a tenancy model
| Model | How | Good for | Cost |
|---|---|---|---|
| Shared tables | Tenant ID on every row | Most SaaS products | Lowest |
| Schema per tenant | Separate schema, one database | Moderate isolation | Medium |
| Database per tenant | Separate databases | Regulated or large customers | Highest |
For most new products, shared tables with a tenant ID and database-level protection is the sensible default. PostgreSQL row-level security can enforce separation even if application code forgets a filter. Design so a large customer can be moved to its own database later.
The worst SaaS bug is showing one customer another customer's data. Write an automated test for it in week one and keep it forever.
Start with a modular monolith
One application, divided into clear modules: accounts, billing, core product, notifications, reports. It is simple to deploy and simple to change. Split a module out only when it has a different scaling need or a separate team.
Microservices solve organisational problems. With four developers, you do not have those problems yet.
A dependable stack
- Frontend: Next.js or React with TypeScript
- Backend: Node.js, Django or Laravel
- Database: PostgreSQL
- Cache and jobs: Redis
- Files: object storage
- Errors and analytics: Sentry, PostHog
The stack your team knows well beats the stack that wins benchmarks.
Accounts, teams and roles
Model this early, because it touches everything:
- A user is a person
- An organisation pays and owns data
- A membership links them, with a role
Never attach data directly to a user. People change jobs and companies, and one person may belong to several organisations. Include invitations, ownership transfer and offboarding. Larger customers will ask for single sign-on and audit logs, so leave space for both.
Billing is harder than it looks
Use a provider such as Stripe or Razorpay, and plan for:
- Trials, with or without a card
- Upgrades and downgrades in the middle of a period
- Failed payments and retries
- Cancellations, refunds and reactivation
- Taxes and invoices by country
- Seats added and removed
- Usage limits
- Enterprise customers who pay by bank transfer
Keep entitlements (what a customer may use) separate from plans (what they pay). You will change prices many times, and you do not want feature checks scattered through the code as plan names.
Treat the provider's webhooks as the source of truth, verify their signatures, and make processing safe to repeat.
Security basics, from the start
- Authorisation checked on the server for every request
- Secrets outside the repository
- Encryption in transit and at rest
- Rate limits on login and expensive endpoints
- Protection against injection and cross-site attacks
- Dependency scanning
- Audit log for sensitive actions
- Backups with tested restores
- Least-privilege access for staff
- A written incident plan
If you handle personal data, plan export, deletion, retention and consent. Customers will send security questionnaires, and these basics answer most of the questions.
Build in this order
- Core workflow for one organisation
- Accounts, teams, roles
- Onboarding to the first useful result
- Billing and entitlements
- Admin panel for your support team
- Notifications and email
- Analytics and reports
- API and integrations
Notice that the admin panel comes early. Without it, every support request becomes a developer task and someone will edit production data by hand.
Onboarding decides retention
Define the moment when a new user gets value: first invoice sent, first report generated, first booking received. Measure how many reach it and how long it takes. Then remove steps. Sample data, templates and import tools usually help more than a guided tour.
Operate it
- Environments: development, staging, production
- Deployment: automated, small, reversible
- Feature flags: release to some customers first
- Monitoring: uptime, errors, slow queries, job queues, payments
- Status page: honest and quick
- Support: one inbox, response targets, saved answers
Numbers to watch
| Metric | Question |
|---|---|
| Activation | Do people reach value? |
| Weekly active organisations | Do they return? |
| Churn, by reason | Why do they leave? |
| Expansion | Do they grow with you? |
| Gross margin | Does usage cost eat revenue? |
| Payback period | How long to recover sales cost? |
AI features need extra care with margin, because each use costs you money. Set limits per plan and track cost per customer.
Cost and timeline
DivyGfx SaaS projects start from $9,999 (₹8,49,000) for a multi-tenant app with auth, billing and admin, and typically take 10 to 16 weeks. Add hosting, email, monitoring, payment fees and maintenance to your plan.
Common questions
How much does it cost to build a SaaS product?
DivyGfx SaaS projects start from $9,999 or ₹8,49,000 for a multi-tenant application with authentication, billing and admin. Integrations, roles and compliance needs change the quote.
How long does it take to build a SaaS?
A first commercial release typically takes 10 to 16 weeks. A narrower MVP can be ready in 8 to 10.
What is multi-tenant architecture?
One application serves many customer organisations while keeping each one's data separate, through tenant IDs, schemas or separate databases.
Should a SaaS start with microservices?
Usually not. A modular monolith is faster to build and easier to operate. Split services later when scaling or team structure requires it.
