Domains
Each domain is a bounded context, not a layer:Assistant · Broadcasting · Channels · Contact · Conversation · Flow ·
Media · Messaging · Presale · Shared · Staff · Tenancy · Webhook
Inside one:
Boundaries that are enforced
Domains do not reach into the landlord database. A domain that needs platform-level data takes a contract fromTenancy/Contracts. Direct
DB::connection('landlord') stays inside Tenancy infrastructure. The reasoning is
in Tenant-aware execution.
foundation and support do not depend on Core. No use App\…, no
references to concrete Core classes. See
Dependency direction.
Migrations do not depend on runtime state. See
Migration isolation.
Only migration isolation has a PHPat rule. The other two are not checked
mechanically: foundation and support cannot import App\… because it would not
autoload outside Core, and landlord access is caught in review only.
Where a piece of code belongs
Business logic lives in services and domain classes. Controllers and jobs
orchestrate; they do not decide.