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.
All three are checked by PHPat rules rather than by reviewers remembering them.
Where a piece of code belongs
Business logic lives in services and domain classes. Controllers and jobs
orchestrate; they do not decide.