Writing
Technical essays on backend architecture, workflow engines, and the practical realities of running a small system in a regulated market.
-
Why we built our own workflow engine instead of using Temporal
The case for entity-is-state workflow engines in modular monoliths, and why a JSON-config-driven state machine beat external orchestration for our regulated-market use case.
-
Multi-tenant RLS with AsyncLocalStorage in NestJS
How to wire Postgres Row-Level Security through every authenticated request using AsyncLocalStorage, transaction-bound sessions, and a single guard — without leaking tenant filters into business logic.
-
Bridging Result<T,E> with TypeORM transactions using a sentinel
The no-throw rule in domain/application layers conflicts with TypeORM's throw-to-rollback contract. Here's the sentinel pattern we use to bridge them without leaking exceptions into use cases.
-
When forwardRef becomes a saga: planning module extraction in a modular monolith
Cross-module atomic writes via NestJS forwardRef work in-process and break across processes. Saga, outbox, inbox — and why 2PC is usually wrong. The honest cost of extraction and how to plan for it from day one.
-
Claim-state CAS: solving non-idempotent actions in a workflow engine
Optimistic locking catches double-write, not double-action. A config-driven CAS primitive plus a per-module janitor closes the gap for steps with non-idempotent side effects.
-
Six months of production: what I've learned
A retrospective on running a modular NestJS energy-community platform through its first six months in production — what survived contact with real users, what didn't, and what 150+ metering points told me that no design review could have.
-
ADR-driven solo development: 38 decisions, one architect
Architecture Decision Records are usually a team artifact. They're arguably more valuable solo — they're how you negotiate with your future self about choices your present self can't remember making.
-
AI as multiplier, discipline as durability
The rules I wrote for myself to make AI a 20x multiplier instead of a lottery: CLAUDE.md as constitution, ADRs as decision graph, memory as persistent context, automation as workflow encoding. Plus why this discipline raises the bus factor instead of lowering it.
-
Three nights of AI: anatomy of a side project
Full anatomy of a sprint-orchestration and code-review dashboard built in three evenings after an AI workshop. 36K LOC of TypeScript, DDD-lite, branded value objects throughout, a JSON repair pipeline worth lifting, a self-learning triage loop, a dual-backend AI abstraction — and an honest naming of the rough edges. Companion piece to the AI-multiplier essay.