A modular monolith separates public interfaces from implementation for capabilities such as orders and payments within one process. Other modules call only the public interface.
The demo rejects a shortcut into internals while a call through the public port succeeds. Table ownership also needs rules or the code boundary erodes.
When to use
Use it when independent releases are unnecessary but coupling between features needs control.