Skip to content
SaaS & Startups2025

Paperstack's document-workflow product had grown into 68 single-tenant deployments across 200 VMs, with customers stranded three versions behind and enterprise deals dying on the security questionnaire. We replatformed it as true multi-tenant SaaS, every tenant migrated in eleven weeks, uptime at 99.95%, and SOC 2 Type II inside five months.

Client
Paperstack
Industry
SaaS & Startups
Timeline
9 months
Team
6 engineers
Year
2025
97.1% → 99.95%monthly uptime
3 wk → 1 dayenterprise tenant onboarding
-44%infrastructure cost per tenant
5 moto SOC 2 Type II attestation
The engagement

How we took Paperstack from the problem that hurt to the numbers above.

  1. The challenge

    Paperstack's document-workflow product was winning deals and losing the ability to run them. Early enterprise customers had demanded dedicated installs, so the company kept cloning the stack, by the time we met them, 68 customers ran on more than 200 virtual machines, each deployment a slightly different snowflake. Upgrades were manual weekend work performed customer by customer, which meant most customers simply were not upgraded: the median tenant ran three major versions behind, and every support ticket began with an archaeology phase.

    The commercial ceiling was explicit. Enterprise prospects representing the majority of the pipeline were stalling on the security questionnaire, no SOC 2, no SAML SSO, no exportable audit logs, and the sales team was quoting three weeks to onboard a new tenant because onboarding meant provisioning infrastructure. Monthly uptime across the fleet averaged 97.1%, dragged down by whichever snowflake happened to fail that month, and the two-person ops team spent effectively all of its time keeping the estate alive.

    The founders knew they needed multi-tenancy but had twice deferred it, reasonably fearing a rewrite that would stall the roadmap. The engagement began not with a commitment but with a two-week discovery sprint to establish whether an incremental path existed at all.

  2. Our solution

    Discovery produced the plan that made the program safe: the core workflow engine was salvageable, the tenancy assumptions were concentrated in the persistence and auth layers, and long-running document workflows, some spanning weeks of human approvals, were the real migration hazard, since they could not simply be paused. The blueprint that came out of those two weeks, with a costed roadmap and a risk register, is what the board actually approved.

    We rebuilt the platform around a control-plane and data-plane split. The control plane owns tenants, identity, entitlements, and billing; data-plane services run the document workflows, rebuilt on Temporal so that a workflow with three pending human approvals survives deploys, node failures, and the migration itself with its state intact. Tenant isolation is enforced with PostgreSQL row-level security plus per-tenant encryption keys, which turned the scariest security-questionnaire rows into short answers. SAML and OIDC SSO, SCIM provisioning, and immutable audit-log export closed out the enterprise checklist, and Stripe-metered usage billing replaced hand-produced invoices.

    Migration ran in cohorts over eleven weeks: tooling exported each snowflake, replayed its in-flight workflows into Temporal, and ran shadow verification before DNS moved. The three most heavily customized tenants got dedicated attention; the remaining 65 moved on a conveyor. The old estate was decommissioned VM by VM, and the infrastructure bill per tenant fell 44%, while SOC 2 Type II, scoped from day one of the rebuild, was attested five months after kickoff.

  3. Architecture

    The control-plane/data-plane split is the load-bearing decision: a NestJS control plane fronts tenant management, auth, and Stripe billing, while stateless data-plane services execute workflows orchestrated by Temporal, durable execution replaced a fragile homegrown job queue and made long-running, human-in-the-loop workflows a solved problem rather than the product's biggest liability. Services communicate through a transactional outbox into an event bus, keeping tenant-facing writes atomic while analytics and notifications consume downstream.

    Everything runs on Kubernetes provisioned by Terraform, with one shared cluster for standard tenants and the option, used by two customers, of a dedicated data-plane cell at a premium tier, same codebase, different placement. That single-codebase cell model is what lets Paperstack sell isolation without ever again selling a snowflake.

    Technologies

    TypeScriptNestJSReactPostgreSQLTemporalRedisStripeKubernetesTerraform
“The discovery sprint alone was worth the fee, it turned a rewrite we were afraid of into a sequence of steps we could defend to the board. Eleven weeks later every customer was migrated and nobody noticed, which was exactly the point.”

Daniel Reyes

Co-founder and CTO, Paperstack