Backend & AI Engineering Notes
Practical write-ups on the things I build — NestJS microservices, AI/LLM integration, and shipping reliable backends to production.
Building a Production RAG Pipeline: Chunking, Hybrid Search & Cost Controls
Naive vector search looks great on ten PDFs and falls apart at ten thousand documents. Here is how to design a production Retrieval-Augmented Generation pipeline with hybrid retrieval, tenant isolation and predictable token costs.
Handling Stripe Webhooks Safely in Node.js: Signatures, Idempotency & Reconciliation
In payment systems, webhooks arrive out of order, get retried multiple times, and occasionally fail mid-flight. Here is the production pattern I use in NestJS to prevent double charges and stale subscription state.
Indexing On-Chain Events Without Losing Data
WebSocket subscriptions drop, nodes fall behind, and chains reorganize recent blocks. Here is how to build a Web3 backend that turns a messy live blockchain into a clean, never-miss-an-event API.
Integrating the Claude API Into Production: Structured Output & Retries
A demo that calls an LLM and prints the answer is easy. A production integration that never returns broken JSON, survives timeouts, and degrades gracefully is a different job. Here is the pattern I use.
Migrating a NestJS Monolith to Microservices With Zero Downtime
A practical, battle-tested approach to splitting a NestJS monolith into independently deployable services — without a maintenance window, a big-bang release, or a 2 a.m. rollback.