Engineering writing
Build-logs and deep dives on the things I actually ship — multi-tenant SaaS, Next.js, payments, and AI integration.
Architecting a production-grade AI SaaS with Next.js and FastAPI
Most AI tutorials stop at the API call. This is the production architecture: a Next.js frontend, a FastAPI service for heavy model work, a queue so the UI never blocks, and streaming responses done in TypeScript.
How to add AI to your SaaS without runaway costs
A practical playbook for shipping LLM features that users trust and finance approves — narrow use case, retrieval grounding, right-sized models, caching, token budgets and evals.
Build-log: a multi-tenant, WPS-compliant payroll system
How I built Paylio — multi-tenant payroll with strict tenant isolation, integer-safe money, and locale-accurate invoicing across markets. The decisions that keep payroll correct.
What actually matters running the Next.js App Router in production
Lessons from shipping multiple products on the Next.js App Router — rendering per route, client components at the leaves, caching on purpose, and enforcing tenant scope on the server.
Payment webhooks the hard parts: idempotency, retries and reliability
Why payment webhooks break in production and the patterns that make them safe — signature verification, deduplication, idempotent handlers and queues. From real PSP integration work.
Multi-tenant SaaS: RLS vs schema-per-tenant vs database-per-tenant
The three ways to isolate tenant data in a SaaS, the real trade-offs, and how I choose — from someone who ships multi-tenant systems in production.
How I built a real-time, cookieless analytics console in Next.js
A build-log of the first-party analytics behind this site: cookieless tracking, a Postgres pipeline on a least-privilege role, and a real-time admin dashboard — no Google Analytics.