Notes
Engineering notes
Write-ups of problems I've worked through in backend systems, multi-tenant SaaS, auth, and AI products. Each one is written so you can apply it to your own codebase.
11 Oct 2026 · 2 min read
One missing WHERE clause away from a data leak
Every multi-tenant app trusts developers to remember tenant_id on every query. Here's how to make Postgres enforce it instead, in about 15 lines of SQL.
BackendSecurity9 Oct 2026 · 2 min read
Your RAG demo works. Then someone uploads a 240-page PDF.
Chat-with-your-docs is magic with a 2-page file and falls apart with a real one. The fix isn't a better model; it's the boring pipeline around it.
AIBackend