Writing
Notes on the systems I work on: LLM gateways and agents, Go services, storage decisions, and editor internals. Written for the engineer who has to maintain one, not as tutorials.
10 notes. RSS
AI and LLM
Building a Provider-Agnostic LLM Gateway
One gateway, many providers: normalizing Claude, Gemini, and OpenAI behind a single request format with a pluggable codec layer, central cost tracking, and zero-redeploy model swaps.
LLM, Go, Architecture
Designing AI Agents that Use Tools
What turns an API call into an agent: the tool-calling loop, giving agents the right tools and context, grounding answers with retrieval, and pausing for human approval.
AI agents, Tools, RAG
Frontend
Virtualizing Large React Tables and Taming Re-Render Cascades
Why a data table dies at 10,000 rows, how virtualization fixes it, and the three habits that cause re-render cascades, plus when memoization is the wrong answer.
React, Performance
Building Drag-and-Drop From Scratch with Pointer Events
Nested containers, snap-to-grid, and multi-select group resize: the pointerdown, pointermove, and pointerup loop behind a visual builder, and why drag state belongs in a ref.
DOM, Vanilla JS
Five Kinds of React State (and the Right Tool for Each)
URL, server, form, UI, and global state are five different problems. Which tool each one wants, when Redux Toolkit earns its place, and when a custom hook beats both.
Redux, Context API
Backend
Go + Fiber Patterns: Query Pipelines and Graceful Shutdown
A filter-validate-where-sort-paginate pipeline that scales to 30+ resource types without duplicated query code, plus the SIGTERM handling that keeps deploys from dropping requests.
Go, Fiber
Using PostgreSQL and MongoDB in the Same Project
Not SQL versus NoSQL. Both, deliberately. Where Postgres earns relational data and transactions, where Mongo's aggregation pipelines win for analytics, and how to split the two.
PostgreSQL, MongoDB
Where to Store a JWT (and Why Not localStorage)
localStorage is one XSS away from account takeover. Access tokens in memory, refresh tokens in httpOnly cookies, and why permission checks belong in middleware, not business logic.
JWT, RBAC, Security
Scaling Go WebSockets Across Servers with Redis Pub/Sub
A single WebSocket server works until you add a second instance. The Go hub pattern for connections and rooms, and the Redis Pub/Sub bridge that makes horizontal scaling work.
WebSocket, Redis