Architecture
Designing systems that stay simple to change as the product grows.
Multi-tenancy: the four levels of data isolation
A SaaS handling sensitive data has to keep each customer’s data apart. Four levels, from a tenant_id column to dedicated infra, and the one I usually pick.
What is a "Model"? Two things that have nothing in common
"Model" means both an ORM Model and the DDD domain model. Confusing them makes you think you modelled your business when you only described your tables.
Functional Core, Imperative Shell: the end of mocks everywhere
Gary Bernhardt's 2012 talk Boundaries is still some of the best testing advice around: separate decisions from actions, and pass only values between them.
dependency-cruiser: a computational sensor for your AI agents
dependency-cruiser maps imports and fails CI when a boundary is violated. A sensor for AI agents that only works if the architecture is clear enough to describe.
Vertical Slice Architecture: organise code by request
When adding one field touches six files in four folders, the feature lives nowhere. Jimmy Bogard's Vertical Slice Architecture flips the way code is organised.
How many of your architecture rules break the build?
With AI, a standardised architecture becomes an asset: every rule a machine can verify is a constraint. The others are only intentions.
"A depends on B": what exactly are we talking about?
A dependency can be seen by the compiler, by a test, or by nobody. Three questions to stay precise, with developers and with an AI.
What is a "layer" in software architecture?
Abstraction, technical role, call flow, dependencies, deployment: "layer" names five ways of slicing a program, and yours probably has all of them.
Clean Architecture is one rule: the Dependency Rule
What Robert C. Martin extracted in 2012 from Hexagonal, Onion and friends: a single rule you can verify in the code, the Dependency Rule.
Onion Architecture: business code at the centre
What Jeffrey Palermo proposed in 2008 with Onion Architecture: a single dependency rule so that business code stops paying for every technology change.