Capability 06 · SaaS Platforms

SaaS Platforms

One product, many customers — multi-tenant software ready to scale from the first signup.

Before you read: Written from live engineering practice — the money-moving, million-user work our team runs on our own products, set down so anyone building something can learn from it.

01 · What it is

Software as a service is the difference between building a product once and selling it a thousand times. We architect platforms as properly multi-tenant from the first signup: every customer's data isolated by design, plans and subscription billing handled cleanly, workspaces and teams with role-based access, and feature flags so you can roll out carefully instead of abandoning the new thing that surprised you. White-label options let partners put their own brand in front of their customers while you keep running the machine.

What a saas platforms build covers:

  • Multi-tenant architecture with real data isolation from day one
  • Subscription billing, plans, trials & upgrade paths
  • Workspaces, teams & role-based access for every account
  • Feature flags & staged rollouts that de-risk releases
  • White-label & partner branding options
  • Usage analytics & retention tooling that show who stays and why
What we do · How we do it — as TGJOF Enterprise

This is how we do SaaS Platforms

SaaS at TGJOF is the art of selling software by the month without ever letting the business model become an abusive pattern. We build multi-tenant products where the billing engine pays for itself and the architecture stays honest as customers multiply.

What we do

  • Multi-tenant by architecture — hard row-level isolation, per-tenant configuration and boundaries that a bug in one tenant cannot cross.
  • A billing engine that is a feature — usage metering, invoices, receipts, proration and dunning that are invisible when right and painful when wrong.
  • Plans, trials and add-ons — entitlement checks enforced on the server, not hidden in the UI.
  • White-label and partner capacity — the platform can be resold and embedded without forking the code.

How we do it

  • Entitlements are exact-time — access follows the subscription precisely, with clear grace rules and honest expiry handling.
  • Payments raise from the wallet discipline — M-Pesa, cards, PayPal and Stripe subscriptions share the same idempotency and reconciliation guarantees as every rail we run.
  • Scale is rented, not assumed — pooling, quotas, read replicas and batched jobs grow with the tenant count under load-tested budgets.
  • Churn is engineered against honestly — an easy cancellation, a clean export and a fair notice beat a wall of friction that breeds support tickets.

02 · The full discipline

Software as a service is building a product once and selling it a thousand times.

SaaS is the difference between engineering a software product and running a software business. One codebase earns money from thousands of customers — each one believing they have the whole product, their own data, their own world, while you maintain a single machine. That is the promise, and the discipline is real.

We architect SaaS platforms the way we architect money systems: properly multi-tenant from the very first signup, every customer isolated by design, subscription billing and trials handled cleanly, workspaces and teams with role-based access, feature flags so a release never ambushes anyone, and white-label layers so partners can put their own brand in front of their customers while you keep running the machine and the margin.

Everything below is the full discipline of SaaS — the multi-tenant foundations, the subscription engine, the tenant lifecycle, the partners, the retention tools, the scaling reality, and how we take a product from its first signup to its millionth.

03

Multi-tenancy: the whole business in one architecture

The single most important decision in a SaaS product is how many different customers can live safely inside one codebase. Do it right and every new signup costs you a little storage instead of a new deployment, a new codebase or a new maintenance burden. Do it wrong and every customer is a fork, a copy or a panic.

  • Tenant isolation at the database layer, not just in the app — every query carries the tenant; row-level security and tenant-scoped keys mean one customer can never see another's data even if a bug tries to let them.
  • One codebase, thousands of worlds — a single deployment serves every customer, and the architecture grows by adding capacity rather than adding copies.
  • Tenant identity everywhere — the tenant travels with every request, every job, every webhook and every log line, so nothing reserved for one world ever leaks into another.
  • Shared infrastructure, isolated behaviour — tenants share the machine but get their own settings, features, limits, branding and data boundaries.
  • Storage per tenant — rows carry tenant scope, or buckets/namespaces isolate at the storage layer where a file is a file and nobody else's business.
  • Audit spans tenants — one operator console that can see across everything, because while tenants are isolated from each other, the platform owner sees the whole system.

We treat multi-tenancy as a security property with the same weight as encryption. It is not a feature flag someone remembers to check in the app; it is the shape of the database, the queries and the jobs from day one.

04

The subscription engine: the heartbeat that never misses

A SaaS product does not sell software; it sells a relationship that keeps paying. The billing engine is where that promise is kept or broken — plans, trials, upgrades, downgrades, failed payments and the quiet dignity of customers who missed a payment being helped instead of ambushed.

  • Plans that map to real tiers — free, starter, professional, enterprise — each with its own entitlements, limits and price, enforced by the backend, not by politeness.
  • Trials designed for conversion — start a trial, live it fully, and convert at the moment the value is proven — with the upgrade path inside the product, not an email link to a checkout page.
  • Upgrades and downgrades that never tear the data — moving a customer between plans keeps every record, every setting and every entitlement that survives the change, and prorates the money honestly.
  • Failed payments handled with grace — retries on a sensible schedule, dunning emails that explain, and a downgrade path that protects the data while protecting your revenue — customers are never silently cut off.
  • Metering whether you bill per seat or per use — quotas and usage counters per tenant, so overage, limits and upgrades are decided by real numbers, not estimates.
  • Invoices and receipts that satisfy accountants — correct, searchable, downloadable, forever — matched to transactions so customer support can answer 'was I charged?' in seconds.

We have run live subscription billing ourselves — trials, auto-renewal, grace windows, KES-based plans, wallet top-ups. The mechanics below are the same ones we hold our own platform to: retry schedules, expiry cron jobs, one-notification-per-cycle, and a clear account.

Running subscriptions against real money means holding ourselves to mechanics most pitch decks skip:

  • Exact-time entitlements — access is computed against precise timestamps, so a 30-day trial or a monthly plan cannot silently re-arm on a calendar wrap; a trial is used once, forever.
  • Cycle-aware auto-renewal — the charge hits at the correct period end with the correct price (monthly price for monthly plans, annual for annual), guarded by a lock on the subscription and the wallet so two overlapping runs physically cannot double-debit.
  • Grace, not ambush — an insufficient balance produces one pending bill and one notification per cycle, full access continues through a defined grace window, and the account is frozen only after the grace genuinely lapses.
  • Revenue separated from user funds — company earnings and customer float live in separate pots, so an operational payout can never touch tenant or member money.
  • Expired-entitlement holds — outbound money is paused when entitlements lapse and resumes through the correct renewal path, so a platform never pays out on dead subscriptions.
  • One clear account — invoices, receipts and fee breakdowns are correct, searchable and forever, and the customer's question 'was I charged?' takes seconds to answer.

05

Workspaces, teams and access that means it

A customer is rarely one person. The account has an owner, administrators, members, viewers and people who joined by accident four years ago and still have the password. SaaS without real roles is a door left open.

  • Workspace as the unit — the account holds teams, members and data; people join and leave without anyone re-entering the company's world.
  • Roles with teeth — owner, admin, member, viewer — each with permissions enforced in the backend, so 'hide the button' is never the real protection.
  • Invitation flows done properly — invite by email, join by a link that expires, role assigned at the door, audit recorded when it happens.
  • Leaving without breaking the world — removing a member revokes their access instantly and reassigns or exports what they owned.
  • Session and device reality — per-user sessions, login management, sign-out-all-devices, and device limits for accounts that hold money or medical data.
  • Two-factor by default where it matters — admin rows, payment operations and audit access demand a second factor, because the cost of a hijacked admin is the whole workspace.

Access control is not a permissions screen a developer sketches at the end. It is the product's contract about who can do what — and we make it explicit, reviewable and easy to change as roles and teams grow.

06

Feature flags and staged rollouts: releases that never ambush

Most SaaS disasters are not code failures — they are releases that changed every customer's world in one click. Feature flags and staged rollouts turn a release from a confession into a measurement.

  • Flags at the tenant level — a feature ships to a pilot customer, then a cohort, then everyone — or turns back off instantly if it misbehaves, without a redeploy.
  • Kill switches with no downtime — the moment a release misbehaves in production, the flag flips and the product returns to its previous behaviour without a git revert sprint.
  • Rollout by cohort, not by luck — staged percentages, country filters, plan filters and account cohorts, so the blast radius of any surprise is chosen, not random.
  • Experiments stay true — one tenant's A/B state never leaks into another's, because the flag identity travels with the tenant.
  • Environments mean it — development, staging, production and previews each run their own flags, and promote with the release instead of hoping.
  • Audit of what changed — every flag flip logged, so 'when did payroll start doing that?' has a date, an actor and a reason.

We ship releases the same way we ship payments: small, measured and reversible. A feature that surprises a pilot customer is a learning; a feature that surprises a thousand is an incident.

07

White-label and partners: the growth channel founders ignore

The fastest way to grow a SaaS product is often not more customers — it is other brands selling your product to their customers. White-label turns your platform into a partner economy while you keep running the machine and taking the margin.

  • Partner branding per tenant — each partner gets their own logo, colours, domains and signup flows, and their customers never see another brand behind the curtain.
  • Revenue sharing built in, not bolted on — per-partner plans, splits and reporting, so the partner knows exactly what they earned and you know what you owe.
  • Partners are an extension, not a fork — partners configure and resell the core product; they never branch the codebase into a stranded copy that stops receiving updates.
  • Isolated partner worlds — partner A's customers cannot see, search or collide with partner B's, because tenancy is per product-world, not just per end-customer.
  • One upgrade path for everyone — the platform ships once and every white-label tenant receives it, so the partner's roadmap is your roadmap.
  • Onboarding that protects your brand — the partner's account, their first test, their customers' trust — managed as carefully as your own signups.

White-label is where a SaaS product stops being a product and becomes a platform — the kind of business Kenyans build with MPESA integrations, distribution networks and banking partners. We build the layer that makes that real.

08

Usage analytics and retention: who stays, and why

A SaaS product lives or dies on retention. Every engine above powers the customers who arrive; analytics tells you which of them stay, which drift, and which quietly leave while the dashboard still looks healthy.

  • Activation that shows on day one — who reaches the product's 'aha' moment, and how many churn before they get there — measured, not guessed.
  • Retention honestly counted — cohort analysis that shows what a signup actually looks like at day 7, 30 and 90, because a growing signup count can hide a leaking bucket.
  • Usage per feature — which parts of the product earn the monthly subscription and which parts are silent corners nobody opens.
  • The behaviours that predict churn — three weeks without login, a dropped payment, a downgrade — surfaced before it becomes a lost account.
  • The reasons at the moment of leaving — exit surveys and cancellation flows that capture the 'why' while it is still true, not six months later.
  • Funnels that respect privacy — analytics collected in a way that measures the product without selling out the customer; the numbers you need, not a dragnet.

We instrument SaaS products the way we instrument money systems: every meaningful event measured, every KPI shown plainly, and every retention lever wired to a real notification or email — never to a dashboard nobody reads.

09

Tenant lifecycle: onboarding, renewals and offboarding

A tenant is not a row; it is a relationship that starts at a signup and — if you earn it — lasts for years. SaaS products quietly die at four moments: signup friction, the first upgrade, the failed payment and the offboarding. We design all four.

  • A signup that does not ask for permission to start — real onboarding in minutes, with a first-run experience that proves value before a card is asked for.
  • The upgrade asked at the right moment — when a limit is hit or a feature is in front of the buyer, the plan boundary becomes a selling moment, not a wall.
  • Renewals that are remembered by the machine — auto-renew, billing-cycle awareness, grace windows and retries, so 'forgot to renew' is a gentle path, not a data lockdown.
  • Offboarding with dignity — export everything, keep nothing hostage, and make the returning path as easy as the leaving one, because good leavers become returning buyers.
  • Deletion that is honest and complete — real irreversible deletion when the customer truly leaves, executed with care for the law and for the data of bystanders.
  • One operator view of every lifecycle — the platform team sees every tenant's stage — trial, active, overdue, churned — in one console, so rescue is proactive rather than reactive.

We have built these exact lifecycles into live products — scheduled sweeps, grace windows, heartbeats and honest deletion. The tenant lifecycle below is the same machinery we run on our own platform, held to the same standard.

10

Scaling: the platform survives its own success

The cheapest time to make a SaaS platform scale is the beginning, when the design decision costs a day instead of a migration. We build the mechanisms early so success is an operational fact, not a crisis.

  • The database grows without drama — indexes, query discipline and partitioning from the start, so the first half-million tenants are served by the same calm engine as the first hundred.
  • Scheduled jobs that never collide — cron work that sweeps billing, expiries and notifications is advisory-locked and batched, so two runs of the same job can never double-charge or double-notify.
  • Queues that absorb spikes — emails, webhooks and heavy work go to queues and retry with backoff, so a marketing burst or a flash crowd cannot take the checkout down.
  • Caching with invalidation that actually works — hot reads served from a cache whose eviction is correct, so nobody ever serves stale prices, limits or entitlements.
  • Observability by default — logs, metrics and traces from the first day, so the system's health is visible before customers feel it.
  • Capacity that is understood, not feared — every infrastructure decision has a number attached: tenants per box, requests per second, data per tenant — so growth has a plan, not a prayer.

We run this discipline on live platforms serving millions of financial rows — cron hardening, indexed hot paths, idempotent retries and gateways that survive traffic. A SaaS platform built our way reaches scale as an arrival, not as a firefighting.

11

SaaS security: the platform is the trust boundary

A SaaS platform holds the weight of many businesses at once, which means it is always the target. The security model is not defensive decoration; it is the architecture.

  • Row-level security as the ground truth — the database itself refuses cross-tenant reads; the application never relies on hiding a button to protect someone's data.
  • Encryption at rest and in transit — data encrypted where it sleeps and while it travels, with keys managed and rotated rather than buried in config.
  • No secrets in the bundle — keys and credentials live in managed secrets and are fetched at runtime, never shipped in code that a partner or attacker could read.
  • Scanner-proof access — OAuth and scoped tokens per consumer class, rate limits enforced at the gateway, and abuse detection that treats the API like the public door it is.
  • Least privilege everywhere — service roles, cron jobs and edge functions each carry the narrowest capability that work allows, so one breach never becomes the whole platform.
  • Audit that survives attempts — logs of who did what and when — and a secure, tamper-evident channel for the moments that called the police.

We have hardened live platforms after real attacks — enumeration, escalation and abuse vectors found by people who test for a living. A SaaS product on our watch is built as if the internet will discover it tomorrow, because it will.

12

Testing SaaS platforms

A SaaS platform multiplies a single bug by thousands of tenants, which makes testing a survival instrument, not a formality.

  • Isolation tests that prove tenancy — automated tests attempt cross-tenant reads and fail the build if any customer's data leaks into another's world.
  • Billing that is tested like a bank — trial conversion, prorated upgrades, failed payments, retry schedules and expiry — every money path run through the automated distillery before it meets a real card.
  • Concurrency and idempotency tests — two payments at once, a retry arriving late, a webhook firing twice — proven harmless by design, not hoped harmless by luck.
  • Scalability load — the platform exercised at the tenant numbers and traffic the business actually advertises, so 'unlimited' has been rehearsed at a real number.
  • Recovery rehearsals — restore from backup, replay a queue, rerun a cron — because an operation that never rehearsed failure will fail in public.
  • Feature-flag regression — features tested both on and off, plus rollback drills, so the flag that saves you never becomes the flag that hides a broken world.

The tests below are how a platform earning from thousands of tenants earns the right to change its own code without a support inbox. A release that passes our SaaS suite is a release we can deploy at 4pm and sleep through the night.

13

How we build SaaS platforms

The build process below is the same engineering discipline we run on our own live platform — visible, honest, and ending with the customer owning everything.

  • 01 · The product business model — who pays, what tier, what trial, what retention lever — because a SaaS build starts with the subscription math, not a login screen.
  • 02 · The tenancy decision — isolation model chosen and written into the schema, not the app layer — from the first table.
  • 03 · The auth and workspace foundation — accounts, roles, invitations and sessions — the door built right before the rooms.
  • 04 · The billing engine — plans, trials, entitlements, retries and expiry — wired to the transactions ledger from the start.
  • 05 · The product surfaces — the web app, mobile app and API that tenants actually use — built fast because the foundation is carrying safety and scale.
  • 06 · The partner layer — white-label branding, domains, revenue splits — the growth engine the roadmap promised.
  • 07 · The observability — logs, metrics, alerts and the operator console — so the platform's health is visible before customers feel it.
  • 08 · The pilot tenants — real first customers, real feedback, fast changes — because the first ten tenants teach what the first ten thousand will need.
  • 09 · The staged rollout — feature flags, cohort releases and monitoring — a product that changes its own future carefully, one cohort at a time.

You own the code, the database, the pipeline and every account. No lock-in, no hostageware, no phone-home threat — a SaaS platform built with us is a business you own and can take anywhere.

14

Honesty about SaaS

Because a SaaS platform is a long-term business relationship, we are direct about its trade-offs and its realities:

  • Multi-tenant done cheaply is a house of cards — shared columns with 'WHERE tenant_id = ?' sprinkled on top will leak. Real isolation costs deliberate architecture and we will not pretend otherwise.
  • Billing is a money system — trials, retries and expiries are business-critical flows, not back-office details. We build them to the standard of real money — because they are.
  • A platform is a running business, not a delivery — uptime, retention and improvement are the product. We stay for the running, not just the launch.
  • White-label success depends on your partners — we build the layer that makes it easy; your distribution makes it huge.
  • Scale is earned with numbers — 'unlimited' is a claim; we repeat the word with a number and a rehearsal behind it.
  • You own the machine and its future — the code and the pipeline are yours, always, so the platform can never hold your business hostage.

The toolchain

The SaaS toolchain

Every layer below is chosen to carry many tenants safely in one codebase: isolation at the database, a billing engine that behaves like money, operator consoles that see across every world, and the scaling discipline that lets success arrive without panic. These are the exact patterns behind our live platform — multi-tenant, billing-aware, white-label-ready and hardened.

stack.toolchain

01

Languages & frontend

What the tenant touches

  • TypeScript / ReactThe tenant surface — web dashboards and portals built with one language, one component system, dense and fast.
  • React Native / DesktopThe tenant's app on phone and workstation, sharing the same API and the same truth as the web surface.
  • Native enginesC#, Rust and C++ for thick workstation tools that need the desk's speed and its hardware.
  • Tailwind + component systemsDesign systems that keep a thousand white-label variants cohesive under the hood.

02

Backend & tenancy

Where isolation is real

  • Managed PostgreSQLTenant-scoped rows, row-level security and cross-tenant operator views — isolation at the data layer, not the app layer.
  • API layer / edge functionsTenant-aware endpoints and server-side logic, each request carrying identity and entitlement.
  • Auth & sessionsAccounts, OAuth, invitations, device limits and admin escalation — the door and the locks.
  • RLS policiesThe database itself refuses cross-tenant reads; the app never 'hides a button' as protection.
  • Service roles & least privilegeEvery cron, queue worker and edge function carries only the capability its work needs.

03

Billing engine

The heartbeat that never misses

  • Subscriptions & plansEntitlements, trials and plan boundaries enforced by the backend, not by politeness.
  • Ledgers & transactionsMoney movement booked like a bank — every charge, credit and fee attributable to a transaction.
  • Retry & dunningFailed payments retried on a sane schedule, customers helped instead of ambushed.
  • Expiry & grace cronScheduled sweeps that advance billing cycles, apply grace and freeze only when the rules say so.
  • Metering & quotasPer-seat or per-use counters that decide upgrades and overage with real numbers.

04

Feature & rollout

Releases that never ambush

  • Feature flagsTenant-level toggles that ship a feature to a pilot, then a cohort, then everyone.
  • Kill switchesInstant rollback to the previous behaviour without a redeploy sprint.
  • Staged rolloutPercentage and cohort releases with a chosen blast radius for any surprise.
  • Environment parityDev, staging and production running the same flags, promoting with the release.

05

Partners & white-label

The growth channel founders ignore

  • Per-tenant brandingLogos, colours, domains and signup flows per partner — their customers see only their brand.
  • Revenue split & reportingPer-partner plans and statements that make the partnership accountable with real numbers.
  • Shared upgrade pathOne codebase shipping to every white-label tenant — partners are an extension, never a fork.

06

Analytics & retention

Who stays, and why

  • Activation trackingThe signup-to-aha journey measured on day one, not six months later.
  • Cohort retentionWhat a signup actually looks like at day 7, 30 and 90 — the real leak detector.
  • Feature usageWhich parts earn the subscription and which corners stay silent.
  • Churn signalsThe behaviours that predict leaving, surfaced before the account is lost.
  • Privacy-respecting funnelsThe metrics the product needs, never a dragnet on the customer.

07

Operations & scaling

Surviving success on purpose

  • Advisory-locked cronScheduled jobs that can never double-run, double-charge or double-notify.
  • Queues & retriesWebhooks and heavy work absorbing spikes with backoff, not breakage.
  • Caching with real invalidationHot reads served fast without ever serving stale prices or entitlements.
  • ObservabilityLogs, metrics and traces from day one — health visible before customers feel it.
  • Capacity numbersTenants per box, requests per second, data per tenant — growth with a plan, not a prayer.

08

Security

The platform is the trust boundary

  • Encryption at rest & in transitData encrypted where it sleeps and while it travels, keys rotated, never buried in config.
  • Scoped tokens & rate limitsOAuth and per-consumer-class limits enforced at the gateway — not politely requested.
  • Audit logsWho did what, when — tamper-evident for the moments that matter.
  • Pen-test disciplineThe platform treated as if the internet will discover it tomorrow, tested accordingly.

Lifecycle

The SaaS lifecycle — from first signup to millionth tenant

A SaaS product is not built once; it is a living business relationship repeated for every tenant, every billing cycle and every release. This is the lifecycle we carry every platform through.

01

Price

The business model first: who pays, what tier, what trial, what retention lever earns the recurring revenue.

02

Isolate

Multi-tenant architecture with tenant isolation in the database — from the very first table.

03

Secure

Auth, accounts, teams, roles and invitations — the door built right before the rooms.

04

Bill

Plans, trials, entitlements, retries and grace — the billing engine wired to real ledger transactions.

05

Build

The tenant surfaces — web, mobile, desktop, API — fast because the foundation carries safety and scale.

06

Partner

White-label branding, domains and revenue splits — the growth layer the roadmap promised.

07

Measure

Activation, retention, usage and churn signals — the product that knows who stays and why.

08

Release

Feature flags and staged rollouts — the platform that changes its own future carefully.

09

Scale

Cron locks, queues, caching and capacity numbers — success arriving as an operational fact.

10

Pilot

Real first tenants teaching what the first ten thousand will need — fast changes while it is cheap.

11

Run

Observability, alerts and the operator console — health visible before customers feel it.

12

Own

The code, database, pipeline and every account handed to the customer — the platform they take anywhere.

Closing

More than development

SaaS Platforms is where a software product becomes a software business — one codebase earning from thousands of isolated customers, billing that behaves like money, partners multiplying the reach and retention that shows who stays and why. That includes:

Multi-tenant architecture with real data isolation.Tenant isolation at the database layer.One codebase, thousands of customers.Subscription plans, trials and entitlements.Billing cycles, auto-renewal and grace windows.Failed-payment retries and dunning.Per-seat and per-use metering.Workspaces, teams and role-based access.Invitation flows and instant revocation.Device limits and two-factor for admins.Feature flags and tenant-level rollouts.Kill switches and instant rollback.White-label branding, domains and signup flows.Partner revenue sharing and reporting.Activation and cohort retention tracking.Feature usage and churn-signal analytics.Tenant onboarding, offboarding and honest deletion.Advisory-locked cron and idempotent jobs.Queues, caching and capacity planning.Row-level security and least privilege.Encryption at rest and in transit.Scaled, rehearsed, and ready for the millionth tenant.

SaaS is the highest-stakes software business model, because every mistake is multiplied by thousands of tenants at once — and every success compounds the same way. When the tenancy is real, the billing is honest, the releases are reversible and the partners can multiply you, the product stops being software and becomes the machine a business runs on.

We build SaaS platforms the way we build money systems — because a subscription platform is a money system. Every tenant, every plan, every retry and every renewal is held to the same standard as the software we run ourselves.

Previous capability

Desktop Applications

Next capability

Backend Engineering

Building something like this?

The discipline above is what we run on our own products every day. If it would help on yours, our door is open.