SaaS Web App Development for Startups: Building a B2B MVP That Lasts
In this article
Custom web app development for a B2B SaaS startup comes down to one decision made well. Build the first version as a single complete journey, not a small copy of the finished product. A customer signs up, their organisation is created, they do the one thing your product promises, and they pay for it. That is the minimum viable product. Everything else, from team roles to integrations to a mobile app, is a later stage that the first customers will help you order.
We build SaaS platforms in Django, and we build them in stages: a few weeks for one simple journey, a few months for a product with several kinds of user. Our own platforms, UK Name Change, Tenancy Pilot and UK Prenup, run on the same stack and were built the same way. This guide covers what we have learned from them: what to leave out of an MVP, why Django suits the job, and the multi-tenancy decision you cannot easily reverse. It also covers billing, the API, and what an investor's technical reviewer will look for later.
What an MVP is, and what it is not
A minimum viable product is the smallest thing a customer will pay for and keep using. It is a test of the business, so it has to be real: real accounts, real payments, real data that the customer would mind losing. It is not a clickable design, and it is not a prototype in a no-code tool that you will have to throw away once it works.
The discipline is in what you cut. For most B2B products the first version does not need:
- A reporting dashboard. Export a CSV and look at it in a spreadsheet until you know which numbers matter.
- A billing portal of your own. Stripe's hosted checkout and customer portal handle cards, invoices and cancellations.
- Roles beyond owner and member. Add admin, viewer and billing-only roles when a customer asks for them.
- Integrations with other tools. Prove the core first; the API that connects your app to other systems comes in the second stage.
- A mobile app. A web app that works well on a phone is enough to learn from.
Why we build SaaS MVPs in Django
Django is a Python framework that ships with the parts every SaaS product needs and most teams otherwise rebuild badly. Those are user accounts with password reset and session handling, a permissions system, an admin area generated from your data model, database migrations and form validation. It also ships with protection against cross-site request forgery, cross-site scripting and SQL injection, switched on by default. On an MVP that saves weeks, and the weeks are spent on the part of the product that is actually yours.
Two more reasons matter for a startup specifically. Django is boring in the good sense. Django 5.2 is a long-term support release, Instagram has run on Django at enormous scale for years, and the questions you will hit have been answered. And Python is readable, which pays off the day someone else needs to understand your code, whether a new hire or an investor's reviewer. If you are comparing agencies to build it, our guide to choosing a Django development agency lists the questions to ask.
Multi-tenancy: the decision that is hard to reverse
A B2B product is multi-tenant: Company A and Company B both use it and must never see each other's data. There are three ways to arrange that, and the choice shapes everything built on top of it.
| Approach | How it works | Isolation | Cost to run and change | Fits |
|---|---|---|---|---|
| Shared schema, tenant column | One database; every row carries an organisation ID | Enforced in code and by database policies | Lowest; one migration for everyone | Most B2B SaaS, including MVPs |
| Schema per tenant | One PostgreSQL database, a separate schema per customer | Strong; a query cannot cross schemas by accident | Migrations run once per tenant; backups are larger | Products where customers demand separation |
| Database per tenant | A separate database for each customer | Strongest | Highest; every customer is an operations job | Regulated or very large customers only |
We start almost every product on the shared schema. The organisation is a model, and every tenant-owned model has a foreign key to it. A custom manager filters every query by the organisation on the current request, so forgetting a filter raises an error rather than leaking data. PostgreSQL row-level security policies then enforce the same rule inside the database, which protects you from a bug in the application layer. Tests create two organisations and assert that each sees only its own rows; that test runs on every change.
Accounts, roles and billing
The account model is organisations with members, not users with data. A person signs up, an organisation is created with them as owner, and they invite colleagues by email. Roles start as owner and member; more arrive when a customer asks. Single sign-on through Google or Microsoft is a common second-stage request from larger customers and is easy to add later if the account model was right from the start.
Billing goes through Stripe Billing. The subscription is created from Stripe Checkout, and the customer manages cards and cancellations in Stripe's hosted portal. Your database holds a copy of the subscription state driven entirely by Stripe's webhooks. Each webhook handler is idempotent, so a retry cannot activate a plan twice or send a second welcome email. UK Name Change, which has changed more than 160,000 names, runs on that pattern so that no order is missed or charged twice. Trials, failed-payment retries and proration are Stripe settings, not code you have to write.
Built to grow without a rewrite
"Will it fall over if we grow?" is the right question with the wrong emphasis. An MVP does not need to serve a million users; it needs to be built so that serving the next ten thousand is a configuration change rather than a rewrite.
The boring choices
- PostgreSQL as the only database, with every tenant-owned table indexed on the organisation ID.
- Redis for caching and as the broker for Celery, so emails, PDF generation and imports run as background jobs and never hold up a page.
- Files in object storage (S3 or an equivalent), never on the web server's disk.
- The app packaged in Docker and deployed the same way to staging and production.
- Error tracking (we use Sentry), uptime alerts, and daily backups that are restored for real to prove they work.
With those in place the first scaling step is a bigger server, and the second is a second application server behind a load balancer. The database is the last thing you touch. Our guide to when load balancing is actually needed explains why that order is right for almost every startup.
API-first, but not API-only
The usual advice is to build the backend as an API with a separate front end from day one, so a mobile app can plug in later. That is right about the separation and wrong about the timing. A single-page React front end doubles the surface area of an MVP: two codebases, two deployments, and authentication across the gap. For the first stage we render pages on the server with Django templates and use HTMX for the parts that need to update without a reload. That is faster to build and faster to load.
What we keep from API-first is the shape of the code. Business logic lives in a service layer, not in views, so the same function that handles a form submission can sit behind a Django REST Framework endpoint in stage two. When the mobile app or a customer's integration arrives, the API is a thin layer over logic that already exists and is already tested.
What technical due diligence looks for
If you raise investment, someone will read the code. They are rarely looking for brilliance; they are looking for the absence of risk. The list is short and you can hold a developer to it from the first week:
- An automated test suite that runs on every change.
- No secrets in the repository.
- Dependencies kept current.
- A documented way to deploy from a clean machine.
- Backups that have been restored.
- Clear ownership of the code and the accounts.
On our builds the client owns the code once the project is paid for, and the domain and hosting are in the client's name from the start. That is the question a reviewer asks first.
The stages we build in
Platform work is quoted after a short call, in writing, and delivered in stages so each one is something customers can use. A typical sequence for a B2B product on one of our web platform builds:
- One journey. Sign-up, organisation, the core feature, Stripe subscription, transactional email. Deployed to a staging site you click through, then live. A few weeks.
- A team product. Invitations and roles, an activity log, CSV export, the first integration customers have asked for, and the metrics you need to run the business. The KPI tracking template for web apps is what we hand over at this point.
- A platform. A public API with keys and rate limits, webhooks out to customers' systems, single sign-on, reporting, and a mobile app if the first stages earned it. A few months in total for a product with several kinds of user.
The marketing site is separate from the product and should be built as one; SaaS websites that convert visitors into trial users covers that side. For launch day itself, when the site has to take sign-ups and stay up while the traffic lands, see tech startup websites for product launches.
Questions people ask
How long does it take to build a SaaS MVP?
A few weeks for one simple journey that takes payment, a few months for a product with several kinds of user. The variable is how settled the journey is before the build starts, not the code.
Should I prototype in a no-code tool first?
If you need something to show people before you can commit to a build, yes, and treat it as a drawing. The moment it holds real customer data or takes real payments you have a product, and leaving a no-code platform later means rebuilding it. Decide by whether the first version will be sold.
Is Django a good choice for SaaS?
Yes: accounts, admin, migrations and security come built in, PostgreSQL support is excellent, and the ecosystem for payments, background jobs and APIs is mature. Node or Rails can do the same job; the framework matters less than building one journey first and keeping tenants apart properly.
What to do this week
Write the one journey as a numbered list of screens. Write down the kinds of user you expect in year one, even though only one of them gets built first. Decide what the customer pays and when. Those three documents are most of a specification, and our web app requirements planning guide has an outline for turning them into one a developer can quote from.