Tests against a real database
The integration and security suites run against a real PostgreSQL database, in CI on every push and locally with one command. Payment providers and email are stubbed; the database never is.
Case study · DryDock Kit
DryDock Kit is a product I build and sell: a self-hosted Next.js starter kit for multi-tenant B2B SaaS. Organizations, roles, billing and an admin console come already wired together, for developers and small agencies who would rather build their product than its plumbing.
01 — At a glance
02 — The problem
Every B2B SaaS rebuilds the same foundation: sign-in, organizations, invitations, roles, plans, billing webhooks and an admin console. The pages are quick to build. The bugs live in the rules between them.
Those bugs are the expensive kind: one customer reading another's data, an admin granting themselves ownership, a retried payment webhook changing billing twice. A starter kit is only worth buying if it proves those rules hold.
03 — What I built
04 — Architecture
The integration and security suites run against a real PostgreSQL database, in CI on every push and locally with one command. Payment providers and email are stubbed; the database never is.
Organization-scoped records are always fetched by organization and ID together, so a valid ID from another tenant simply isn't found.
A redelivered payment event is recognised and acknowledged without changing billing again, with unique keys in the database for the case where two copies arrive at once.
A purchase is granted only for a checkout the app itself recorded, for the right product and amount, never from data the buyer can set.
05 — Challenges
The owner-only rule lived in role changes but not in invitations. Invitations now enforce it too, and a test fails if it regresses.
Pending invitations now reserve seats, and accepting one re-checks the limit under a lock, tested with a concurrent race for the last seat.
Impossible billing status changes are refused, and all 50 transitions are tested.
06 — Results
Figures from the test run published on drydockkit.com on 2 October 2026. Both reviews were done in-house, not by an independent penetration tester.
Building something similar?
An MVP or a full SaaS product, built on a foundation that survives its first customers.
07 — Contact
I take on a small number of projects at a time, from full product builds to deployment, performance and automation work: scoped, shipped, and handed over clean.
Bengaluru, India → Open to RelocationReplies under 24h