How factory patterns keep tenant-specific logic clean, pluggable, and safe—plus practical patterns you can drop into our stack.