Blog

Engineering writing

Build-logs and deep dives on the things I actually ship — multi-tenant SaaS, Next.js, payments, and AI integration.

Jul 14, 2026AI· 10 min

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.

Jun 27, 2026AI· 8 min

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.

Jun 23, 2026SaaS· 9 min

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.

Jun 16, 2026Next.js· 8 min

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.

Jun 9, 2026Payments· 7 min

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.

May 26, 2026SaaS· 9 min

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.

May 12, 2026Next.js· 8 min

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.

RSS feed →