Software Design
6 essays on this topic.
Background Jobs Done Right: Queues, Retries and the Outbox Pattern
Background jobs fail in quiet ways. Idempotency, retries with backoff, dead-letter queues and the outbox pattern, with Postgres and BullMQ code.

Multi-Tenant SaaS Database Design: Tenant IDs, Isolation and Row-Level Security
Database per tenant, schema per tenant or shared tables? Honest trade-offs, why tenant_id usually wins early, and how Postgres RLS stops data leaks.

Start With a Modular Monolith, Not Microservices
Microservices charge a heavy tax on small teams. A modular monolith gives you clean boundaries now and an easy path to services later.

Time, Money and IDs: The Data Types That Bite Backend Developers
Three column types cause a surprising share of backend bugs. How to store time, money and IDs so they don't bite you later, with TypeScript and SQL.

Treat the LLM Like an Unreliable API: Designing AI Pipelines That Hold Up
An LLM call is a slow, costly, non-deterministic dependency. Design for it like any flaky API: validate, retry, log, evaluate and keep a human in charge.

Writing Better Code with SOLID Principles
A practical guide to the five SOLID principles, with simple before-and-after examples showing how each one makes code easier to change, test and extend.
