Engineering notes, on reliable software, AI systems, and delivery.
Design decisions, failure paths, and verification methods from building product infrastructure and production AI systems.
Practical idempotency patterns for reliable workflows
Use idempotency keys, state predicates, and an outbox so retries return one business outcome.
How I built my site
One validated MDX entry feeds SSR, raw Markdown, search, RSS, sitemap, and social images; Bun runs the Nitro server and SQLite write path.
Flexible MongoDB schemas for fast-changing apps
Indexed fields, schema versions, and tolerant readers let old and new application versions run together while record-specific fields change.
Build RAG with MongoDB Vector Search
Store chunks, embeddings, metadata filters, permissions, and answer traces together, then keep dimensions and candidate counts tied to runtime configuration.
LLMs in production: tools, retrieval, evals
A production LLM system needs traceable retrieval, constrained tools, evaluations, and an explicit path for low-confidence answers.
Scope and verify coding agents
Repository rules, infrastructure code, CI, tests, and logs give agents concrete boundaries and checks.
How an AWS-to-GCP migration cut our cloud bill about 70%
Inventory dependencies, move one workload at a time, measure cost and behavior, then delete the old path after rollback is no longer needed.
Offline-first mobile when the network is bad
The cluster and API only matter if the field worker can capture intent offline, reconnect, and trust the result that comes back.
MongoDB modeling mistakes that show up late
Pick the datastore by how the app reads and writes data, then watch the document that quietly outgrows memory.
Use Terraform for durable settings and Ansible for machines
I keep repository and cloud configuration in Terraform, machine setup in Ansible, and one small command interface in front of both.
Redirect plain HTTP sent to an nginx HTTPS port
nginx uses internal code 497 for this protocol mismatch. Handle it at the TLS listener, keep the caller visible in logs, and fix clients you control.
Docker images should package verified builds
Run the checks in CI, keep config at runtime, and give the container one explicit writable directory.
How Magento catalog, stock, payment, and cache state disagree
The fastest way through a Magento incident is to identify the authoritative record, then reconcile the indexes, caches, and external systems that copied it.