Writing

Implementation notes and engineering decisions from production systems — M-Pesa integrations, AI features, database architecture, and cloud infrastructure.

RSS feedopens in new tab

What I Learned Shipping AI Features in Production

Honest lessons from building a Claude-powered chatbot, a pgvector semantic search pipeline, and an AI assistant into real products — covering prompt architecture, cost decisions, rate limiting, and where AI actually earns its place.

January 20269 min read
AIAnthropicOpenAIProductionEngineering

Semantic Product Search with pgvector and OpenAI Embeddings

How to implement semantic search in PostgreSQL using the pgvector extension and OpenAI embeddings — covering schema design, embedding generation, cosine similarity queries, IVFFlat vs HNSW indexing, and fallback strategies.

October 20254 min read
PostgreSQLpgvectorOpenAISemantic SearchTypeScript

Integrating M-Pesa STK Push with a Next.js API Route

A complete guide to integrating Safaricom's M-Pesa STK Push using the Daraja API in a Next.js 14 App Router project — covering authentication, STK Push request, callback handling, idempotency, and error states.

October 20254 min read
M-PesaNext.jsTypeScriptPaymentsFintech