← work — the registryBLT-02built & shipped
LessonLoop
music-tuition SaaS — full v2 rebuild, spec to release
Scheduling, billing and the parent's phone for music schools: a multi-tenant platform rebuilt from the ground up, with a security suite that attacks it instead of describing it.
- sector
- music-school management SaaS · iOS app on the App Store
- period
- 2025 – 2026 · in production
- role
- built and shipped — builder credit
readouts — measured, sourced
04 on the record · every one names its source
370,780
lines of source on the platform
read from — repository
277
row-level security policies across 142 tables
read from — database schema
1,012
adversarial security assertions among 2,032 tests
read from — test suite
448
database migrations
read from — repository
the file — read in order
01
the problem
Double bookings, float money, and tenants who must never see each other — the three ways a school platform fails, all three usually handled in application code that a bug can skip.
02
the engineering
Multi-tenant Postgres with row-level security enforced in the database itself: 142 tables, 277 policies with FORCE RLS and restrictive deny-all layers, and 79 authorisation helpers held in a private schema the API physically cannot reach. Exclusion constraints make double-booking structurally impossible under concurrency.
Money is Stripe Connect destination charges with two-phase idempotent webhook processing; every amount an integer in minor units, by constitutional rule.
The iOS app is native Swift: a credential-free widget fed through an App Group, Live Activities whose countdown the OS itself draws, StoreKit 2 purchases resolved to the right tenant server-side.
03
the proof
2,032 automated tests, 1,012 of them adversarial: they impersonate all five roles at the database level, attack across the tenant boundary on every table × role × operation, and roll back through a sentinel exception. A suite that skips is a hard failure, never a green tick.
A forty-week recurring series with three clashes books 37 lessons and honestly reports three skipped.
provenance
- surfaces touched
- Postgres schema and policies · edge functions · Stripe Connect · web app · native iOS app
- numbers read from
- repository · database schema · test suite
- stack
- React · TypeScript · Supabase (Postgres RLS, 76 edge functions) · Stripe Connect · Capacitor + Swift (WidgetKit, ActivityKit, StoreKit 2)
- tags
- saas · multi-tenant · payments · ios
builder credit — engineered and shipped; ownership sits with the product. every readout above is measured from the repository or the platform that runs it.
the registry
previous file · BLT-05
Klarvo Access
accessibility fixes in the served HTML — never an overlay
→
next file · BLT-03
SEOflare
SEO app for the ShopWired platform — through review, onto the store
→
the same hands
The person who diagnosed this file is the person who ships the fix. Two plain sentences beat a brief.