Writing

Build logs, architecture decisions, and technical deep-dives from things I've shipped.

AI Engineering

Running MiniMax H3 on One RTX 4090

experiment

I ran the open-weights MiniMax H3 (Hailuo 3.0) video+audio model on a single 24 GB RTX 4090 and turned six storybook illustrations into a 31-second film with sound. Measured findings: why prompt structure beats resolution 14x, how first/last-frame mode invents narrative in between, and the ComfyUI node bug that fakes a 6x speedup.

· 12 min read

One Day of Agent Observability: Five Bugs Found

experiment

I gave my kids' book agent proper logging in a morning — three plain files — and spent the afternoon fixing what the logs immediately caught: 73% of GPU time wasted, books in the wrong language, and two ways the model broke its own tool calls. Real numbers, same-day payback.

· 11 min read

Logging Email to a CRM: What AI Actually Changed

experiment

I built a BCC-to-CRM email intake pipeline and ran it entirely on a single RTX 4090: deterministic threading, dedup, and quote-stripping, with a local Qwen3.6-27B doing exactly one job — turning a cleaned thread into a schema-valid activity entry. 40 out of 40 real threads produced valid structs. Here's the architecture, the measured numbers, and the three gotchas.

· 9 min read

Style Prompts Without the Artist's Name

experiment

Naming a living illustrator in a prompt is the lazy way to get a style — and it makes the model forge their signature. I spent 126 images on Krea 2 Raw trying to describe a style without naming anyone. It failed three distinct, reproducible ways, each with a specific fix. Here's the failure map, the seed replication, and the prompt that finally worked.

· 10 min read

A 3B model tied Opus at text-to-SQL — where it breaks

experiment

I RL-tuned a 3B model on a single GPU to tie Claude Opus 4.8 on text-to-SQL, then went query by query to show why an equal score doesn't mean an equal model.

· 19 min read

Do You Need a Glean? Onyx vs 80 Lines of Postgres

experiment

The enterprise-knowledge-search question is really build-vs-buy: pay for Glean, self-host the open-source Onyx, or build RAG on the Postgres you already run. Instead of a feature table, I stood up the full Onyx platform AND wrote the entire Postgres alternative in ~80 lines, pointed both at the same local Qwen 27B over the same company knowledge base, and asked the same questions. Both gave accurate, cited answers. The difference isn't quality — it's eleven containers and a connector marketplace versus one container and a prompt you own. Here's how to choose.

· 11 min read

Durable Agent Workflows on SQLite — Until You Need Temporal

experiment

Multi-step LLM agents fail halfway, wait on slow tools, and pause for human approval — so they need durable execution. The reflex is to reach for Temporal or Inngest on day one. I built crash-safe, resumable, human-pausable LLM workflows in ~200 lines on plain SQLite, then measured exactly where it runs out: a hard crash mid-run replays the finished steps and saves half the tokens, and the durable write ceiling is a flat ~1,000 steps/sec — far more than any LLM workflow needs. The honest conclusion: you graduate for architecture, not throughput.

· 8 min read

Reframe: an AI Shopify App, Solo, to Paying Merchants

How I built and run Reframe, an AI product-photo app for Shopify merchants: the architecture decisions that let one person operate a GPU pipeline in production, how session recordings drove churn down, and what it took to make an AI system merchants trust. Outcomes, decisions, and trade-offs — not a tutorial.

· 6 min read

Don't Make an LLM Find At-Risk Customers

experiment

The tempting move is to hand an LLM your customer data and ask which accounts are about to churn. That's the expensive, unreliable way to do the one thing classic ML is great at. I built the whole pipeline on a real 1M-row e-commerce dataset: a one-line SQL rule already catches 75% of churners in the top-flagged 20%, gradient boosting nudges it up — and the LLM's only job is to explain and route each case. Then I measured whether a free local 27B stays faithful to the model's signals: 0% hallucinated drivers across 109 cards.

· 10 min read

Which Patients Will Ghost? Predicting Dental No-Shows

experiment

Empty chairs are pure lost revenue, and 'just text everyone a reminder' is the advice every practice gets. I ran 110,000 real appointments through plain, old-fashioned machine learning — no LLM in sight — and found the reminder advice is half a trap. Here's who actually no-shows, why the obvious reading of the data is wrong, and the dollar value of calling the right 20% instead of everyone.

· 9 min read

How Much of Your LLM Bill Is the Same Question Twice?

experiment

A semantic cache on pgvector deletes the LLM calls you're paying for twice — but only if you tune it. I replayed 6,000 real questions through a warming Postgres cache and measured the hit rate, the dollars, and the part nobody benchmarks: how often a 'close enough' match serves a confidently wrong answer.

· 10 min read

Evaluating and Monitoring LLM Workflows in Production

A practical guide to proving your LLM feature actually works — tracing, offline evals, and online monitoring — with an honest tour of the mid-2026 tooling landscape: Langfuse, Opik, Phoenix, DeepEval, Ragas, promptfoo, and where Trigger.dev fits.

· 15 min read

Every Supplier Invoice in Your Accounting System, Same Day

What it actually looks like to stop typing invoices into your accounting system: what week one looks like, what it costs, what still needs a human, and what breaks. Written for the business owner, not the developer.

· 6 min read

Invoice Extraction Is Solved. The Pipeline Around It Isn't.

I ran three real invoices — a 1906 hardware bill, the handwritten Fabergé invoice for two Imperial Easter eggs, and a photographed Persian receipt — through a frontier vision model. The extraction took one API call. This post is about everything that one API call doesn't do: validation, schema design, vendor normalization, and the failure modes that actually bite in production.

· 11 min read

Automating E-Commerce Photography with AI

Why generative image editing failed for product photos, and the multi-model architecture that actually works — covering GPU deployment, cold starts, and the Build vs. Buy tradeoff.

· 13 min read

Speculative Decoding Nearly Tripled Qwen on One 4090

experiment

I benchmarked MTP speculative decoding for Qwen3.6-27B in llama.cpp on one 24GB RTX 4090 — it nearly tripled generation speed, and helped even on cold generation. Here's the result, why MTP isn't in mainline llama.cpp yet, and an honest note on what 'fast' does and doesn't buy you.

· 9 min read

LangChain Evolution Part 4: The 12-Factor Agent Methodology

Moving beyond implementation to engineering discipline. Learn the 12-Factor Agent methodology that transforms stochastic scripts into reliable, production-grade AI systems by treating LLMs as components within strict architectural patterns.

· 9 min read

LangChain Evolution Part 3: Production-Ready Agentic Systems

With a dynamic graph in place, we now focus on making our agent robust, scalable, and ready for production. This post covers persistence, multi-agent collaboration, and advanced error handling.

· 10 min read

LangChain Evolution Part 2: Workflows to Graphs

In Part 1, we replaced a monolithic prompt with a stateful agent. Now, we're taking the next step: evolving our agent's hardcoded logic into a flexible, scalable, and truly autonomous graph with LangGraph.

· 10 min read

LangChain Evolution Part 1: Prompts to Agents

Learn how to migrate from a fragile, monolithic prompt to a maintainable, intelligent agent architecture using specialized tools, state management, and human-in-the-loop patterns with LangChain.

· 7 min read

AI Sales Engine Part 2: Leads to Clients

Technical deep dive into automating client acquisition with AI agents - complete code for lead generation, cold email personalization, and scaling your automation business

· 11 min read

AI Automation Business for Developers - Part 1

How developers can dominate the automation market by building AI agents they'd actually use - and turning them into profitable services

· 21 min read

Building Practical AI Agents: From Tools to Workflows

Learn about Building Practical AI Agents: From Tools to Workflows

· 7 min read

Extending LLMs with Custom Tools

Learn about Extending LLM Capabilities with Custom Tools: Beyond the Knowledge Cutoff

· 6 min read

A Self-Healing LLM JSON Processor with Zod and Ollama

Learn about Building a Self-Healing LLM JSON Processor with Zod and Ollama (Deepseek 8b)

· 10 min read

RAG Deep Dive Part 3: Advanced Features and Performance

Learn about RAG Systems Deep Dive Part 3: Advanced Features and Performance Optimization

· 8 min read

RAG Deep Dive Part 2: Building with LangChain

Learn about RAG Systems Deep Dive Part 2: Practical Implementation with LangChain

· 6 min read

RAG Systems Deep Dive Part 1: Core Concepts and Architecture

Learn about RAG Systems Deep Dive Part 1: Core Concepts and Architecture

· 8 min read

Intro to Ollama: Your Personal AI Model Tool

Learn about Intro to Ollama: Your Personal AI Model Tool

· 6 min read

Local AI Assistance with Continue and Ollama for VS Code

Learn about Local AI Assistance with Continue and Ollama for VS Code

· 12 min read

LLM Prompting Techniques for Developers

Learn about LLM Prompting Techniques for Developers

· 14 min read

Data & Search

Finding Duplicate Customers in Postgres

experiment

Every CRM quietly fills up with the same person entered three different ways — and you pay for it in wasted marketing, wrong reports, and split histories. I measured three ways to find the duplicates on 5,000 labeled records: plain exact match, Postgres fuzzy matching, and AI embeddings. The boring one won — exact numbers, where each method wins, and why you don't need a data-quality platform.

· 9 min read

When Does a Knowledge Graph Beat Vector Search?

experiment

Everyone answers questions over their data with vector search. But some questions aren't 'what's similar' — they're 'what's connected,' and vectors fall off a cliff. I measured vector search, graph traversal, and a hybrid of the two on 1,800 multi-hop movie questions, then settled the Postgres-vs-Neo4j question with real numbers: Postgres wins neighborhood reachability by ~4x, Neo4j wins shortest-path by ~85-135x. The honest answer is to match the engine to the traversal.

· 14 min read

The Embeddings Lost to ORDER BY count(*)

experiment

Everyone reaches for an AI vector database to build 'people also bought.' I did too — then measured it on real Amazon data and watched the fancy approach lose to a few lines of SQL that just count what customers actually buy together. Here's the honest, plain-English comparison: what wins, what doesn't, and why you probably don't need the extra infrastructure — all in one database.

· 15 min read

Geospatial RAG on Postgres

experiment

Site selection is two search problems wearing a trenchcoat — where (spatial) and what-kind (semantic). You don't need a vector database next to PostGIS. Here's how to fuse PostGIS proximity and pgvector similarity in a single Postgres query, feed it to an LLM agent, and put it on a map — built and measured on real grid data.

· 12 min read

A Support Copilot with RAG on Postgres

A practical, architecture-level guide to building a customer-support copilot with retrieval-augmented generation on Postgres alone — pgvector, BM25, and row-level security — and why big context windows changed RAG's job rather than killing it.

· 8 min read

BM25 Search in PostgreSQL: The Missing Piece for Hybrid Search

Bring production-grade BM25 ranking into PostgreSQL with pg_textsearch. Combine keyword precision with semantic understanding for hybrid search—no Elasticsearch required.

· 16 min read

Multi-Tenant Search in PostgreSQL with Row-Level Security

Build a secure, scalable multi-tenant SaaS architecture with PostgreSQL's Row-Level Security (RLS), Prisma, and Next.js. Isolate customer data and implement tenant-aware search that just works.

· 7 min read

PostgreSQL LISTEN/NOTIFY: Real-Time Without the Message Broker

Build real-time search and live updates in your Next.js app using PostgreSQL's native LISTEN/NOTIFY, Prisma, and WebSockets. No complex message brokers needed.

· 10 min read

Advanced Search Techniques with pgvector and Geospatial Search

Learn about Advanced Search Techniques with pgvector and Geospatial Search

· 14 min read

Full-Text Search with PostgreSQL and Prisma

Learn about Full-Text Search with PostgreSQL and Prisma

· 11 min read

Web Engineering

Next.js Server Actions: The Complete Guide

Ditch API routes and build forms, mutations, and async operations with zero API endpoints using Next.js Server Actions - the modern way to handle server-side logic

· 12 min read

Real-Time Notifications with Server-Sent Events (SSE) in Next.js

Learn how to implement real-time server-to-client updates using Server-Sent Events in Next.js - a simpler alternative to WebSockets for one-way data streaming

· 9 min read

Redis Queues and Pub/Sub in Next.js - A Practical Guide

Learn how to use Redis lists, queues, and pub/sub patterns in Next.js for real-time features and background processing

· 12 min read

WebSockets with Next.js Part 4: Going Native - Ditching Socket.IO

Learn how to implement WebSockets with Next.js using native WebSocket APIs instead of Socket.IO - better performance, zero dependencies, and full control

· 7 min read

Background Processing in Next.js Part 1

Learn about Background Processing in Next.js Part 1

· 6 min read

Advanced Background Processing in Next.js Part 2

Learn about Advanced Background Processing in Next.js Part 2

· 7 min read

Next.js APIs with tRPC: End-to-End Type Safety

Learn about Next.js APIs with tRPC: A Developer's Guide to End-to-End Type Safety

· 4 min read

Security Best Practices: Learning from Real-World Incidents

Learn about Security Best Practices: Learning from Real-World Incidents

· 6 min read

WebSockets with Next.js Part 3: Advanced Concepts

Learn about WebSockets with Next.js Part 3: Advanced Concepts and Best Practices

· 9 min read

Asynchronous JavaScript: Promises, Async/Await, and Error Handling

Learn about Asynchronous JavaScript: Promises, Async/Await, and Error Handling

· 5 min read

From Idea to MVP: Building FastForward IQ with Next.js

Learn about From Idea to MVP: Building FastForward IQ with Next.js

· 7 min read

WebSockets with Next.js Part 2: Real-Time Chat

Learn about WebSockets with Next.js Part 2: Real-Time Chat

· 12 min read

Zustand: State Management for React E-commerce

Learn about Zustand: Simplifying State Management in React E-commerce Applications

· 6 min read

WebSockets with Next.js Part 1: Basics and Setup

Learn about WebSockets with Next.js Part 1: Basics and Setup

· 10 min read

Smart Login in Next.js with NextAuth.js

Learn about Smart Login in Next.js with NextAuth.js

· 4 min read

Authentication in Next.js 14 with NextAuth.js

Learn about Authentication in Next.js 14 with NextAuth.js

· 19 min read

Building a Shopping Cart with React and Local Storage

Learn about Building a Shopping Cart with React and Local Storage

· 9 min read

Mastering JavaScript Array Methods: Map, Filter, Reduce, and More

Learn about Mastering JavaScript Array Methods: Map, Filter, Reduce, and More

· 7 min read

Test-Driven Development (TDD) with Node.js and Jest

Learn about Test-Driven Development (TDD) with Node.js and Jest

· 6 min read

Node.js Security 101: Common Web Attacks

Learn about Node.js Security 101: Protecting Your Application from Common Web Attacks

· 10 min read

Infrastructure

My Remote AI Dev Workflow: Claude Code + tmux + a 4090

How I use Claude Code on a headless RTX 4090 server with tmux, git worktrees, and Tailscale to ship code from my laptop, iPad, or phone. Fire a prompt, close the lid, reconnect later. The actual workflow I use daily.

· 10 min read

Building My AI Home Lab: From Laptop to Dedicated Server

How I built a dedicated RTX 4090 AI server running Pop!_OS, and how it has evolved since: Tailscale, Docker Compose profiles, local LLMs with Ollama and llama.cpp, image generation, self-hosted Immich, and driving coding agents from my phone over mosh and tmux.

· 19 min read

I Let GitHub Copilot Remotely Debug My Live Ubuntu Server

A real-world case study on using GitHub Copilot to diagnose and solve a persistent logging issue on my live Dokku server. A look into the future of AI-driven DevOps.

· 11 min read

Dokku Migrations: Introducing the Open Source Dokku Migration Tool

Learn about Dokku Migrations: Introducing the Open Source Dokku Migration Tool

· 7 min read

Deploying Nextjs on Your Own VPS using Dokku

Learn about Deploying Nextjs on Your Own VPS using Dokku

· 15 min read

A Beginner's Guide to Docker Containers and Images

Learn about A Beginner's Guide to Docker Containers and Images

· 9 min read

Hosting NodeJs Apps on Your Own Heroku, Using Dokku

Learn about Hosting NodeJs Apps on Your Own Heroku, Using Dokku

· 14 min read

Automate the Deployment of PostgreSQL to EC2 ARM Using Terraform

Learn about Automate the Deployment of PostgreSQL to EC2 ARM Using Terraform

· 9 min read

Hosting PostgreSQL on a t4g Graviton2 ARM Instance on AWS EC2

Learn about Hosting PostgreSQL on a t4g Graviton2 ARM Instance on AWS EC2

· 6 min read

Payments & Billing

Stripe Payment Links and Customer Portal in Next.js 15

Learn how to implement Stripe Payment Links and Customer Portal in Next.js 15 for the easiest payment integration with self-service customer management

· 12 min read

Stripe + Next.js 15: The Complete 2025 Guide

Build production-ready payment systems with Stripe and Next.js 15 using Server Actions - from one-time payments to subscriptions and credit systems

· 13 min read

Implementing Pre-paid Usage Billing with Next.js and Stripe

Learn about Implementing Pre-paid Usage Billing with Next.js and Stripe

· 8 min read

Stripe Webhooks: Race Conditions and Credit Ledgers

Learn about Stripe Webhooks: Solving Race Conditions and Building a Robust Credit Management System

· 5 min read

Stripe Subscriptions in a Next.js Application

Learn about Stripe Subscriptions in a Next.js Application

· 14 min read

Stripe Checkout and Webhook in a Next.js Application

Learn about Stripe Checkout and Webhook in a Next.js Application

· 15 min read