Writing
Writing
Notes from building and shipping multi-tenant products — on putting authorization where it cannot be bypassed, keeping the cost of a product from scaling with the number of people looking at it, and getting software through App Store review. Written by Liana Grigory, also written Liana Grigoryan. Longer engineering pieces are collected under Insights.
-
One entity, or five
A knowledge graph will not merge a person described five slightly different ways. The fix is one identifier and one set of strings, generated from a single place.
-
Two footers, one site
Nineteen pages on one of my sites carried two different footers. Nobody edited anything wrongly: copies drift, and the count of variants tells you when you stopped generating them.
-
A 200 is not a contract
An endpoint of mine returned 200 and saved:true, then published a page reading undefined six times. The validator checked the container, never the fields the renderer read.
-
The spreadsheet is the spec
Before writing any code for a business that already works, read the spreadsheet it is being run on. It is a more honest specification than anything either of you would write down.
-
Navigation that never lies: deriving back and forward state on iOS
A back arrow with nothing behind it is a control that lies. The bookkeeping required to know, on a platform that will not tell you.
-
What a technical co-founder actually ships in the first ninety days
Joining a company that has customers and no product. What gets built first, what gets deliberately deferred, and the decisions that are expensive to reverse later.
-
Edge inference in production: what Workers AI is genuinely good for
Running a model at the edge changes the economics and the privacy posture of a feature. It also constrains what the feature can be. Where the line falls in practice.
-
Deny by default: when security rules are the only authorization layer
A product with no backend has no place to check permissions except the database. What that constraint forces you to get right, and why the result is usually safer.
-
Shipping a web app through App Store review with Capacitor
What actually gets a wrapped web application rejected, and the specific decisions that get it approved: navigation, offline state, account deletion and the iPad build.
-
One document, not one query: a public board that costs the same at ten thousand visitors
A public listing implemented as a collection query bills a read per row, per visit, forever. The same data in a single aggregate document bills one, and stays writable only by its owners.
-
Building to the HIPAA Security Rule bar on a free-tier stack
The HIPAA Security Rule is a set of engineering controls, not a product you buy. What it actually requires, and how each control is met on Firebase and Cloudflare without paid tooling.
-
Per-tenant isolation in Firestore, enforced where it cannot be bypassed
How a multi-tenant SaaS keeps one agency out of another agency's records by putting authorization in Firestore Security Rules rather than in application code.