Category
Architecture
3 posts in this category.
Multi-tenant Postgres: row-level security explained (with real code)
·9 minHow RLS actually works in production multi-tenant SaaS — set policies, set the session variable, handle bypass, and avoid the three failure modes that bite teams at scale.
Webhook idempotency: the bug most teams ship
·8 minWhy webhook handlers double-charge, double-grant, and double-cancel — and the three-line database pattern that fixes all of it.
Next.js App Router: server actions vs API routes — when to pick each
·8 minWhen server actions are the right call, when API routes still win, and the production patterns we use on every Next.js build.