Knowledge Portal · engineering documentation

Skip to content

Federated from workspace · PRD-001 · Dental Clinic Revenue Operating System/docs/architecture/MODULE_BOUNDARIES.md Do not edit canonical truth here — update the source repo, then re-run npm run docs:sync.


Module Boundaries ​

Status: Permanent reference
Applies to: All platforms listed below
Enforcement: tests/Architecture/ModuleBoundaryTest.php + per-platform architecture tests

Each platform is a frozen integration boundary unless marked In progress. External code may depend only on the listed Public Contract and public DTOs.


Legend ​

ColumnMeaning
ResponsibilitiesWhat the platform owns
Public ContractSole importable application API
ModulePrimary code location
Allowed DependenciesContracts/events that may be consumed
Forbidden DependenciesMust never be imported directly
OwnershipTeam/domain ownership
FreezeCanonical git tag

Finance ​

ResponsibilitiesClinic patient billing, invoices, payments, credit notes, refunds, adjustments, financial reporting, integrity assertions
Public ContractApp\Modules\CRM\Application\Contracts\FinancialQueryContract
Moduleapp/Modules/CRM/ (finance subdomain)
Allowed DependenciesShared contracts, Compliance events
Forbidden DependenciesCRM Infrastructure\Models from other modules; direct finance service imports
OwnershipCRM / Finance domain
Freezefinance-v1.0 — see docs/FINANCE-V1-FROZEN.md

Billing ​

ResponsibilitiesSaaS subscription billing, lifecycle, provider abstraction, outbox sync, webhooks, customer portal billing
Public ContractApp\Modules\Saas\Application\Contracts\BillingProviderContract (+ orchestrator entry points documented in v1.3 release)
Moduleapp/Modules/Saas/
Allowed DependenciesShared, EntitlementContract, Finance isolation via architecture tests
Forbidden DependenciesFinance internal services; direct Stripe SDK outside provider layer
OwnershipSaaS / Billing
Freezev1.3-billing-platform

Product ​

ResponsibilitiesPlatform admin UI, organization/tenant/subscription management presentation, platform RBAC, operator dashboards
Public ContractPlatform Filament resources + AuthorizesPlatformAccess permission model (presentation layer; writes delegate to Saas actions)
Moduleapp/Filament/ (Platform group) + app/Modules/Saas/
Allowed DependenciesSaas orchestrators, EntitlementContract, BillingProviderContract
Forbidden DependenciesDirect billing provider SDK; finance internals
OwnershipSaaS / Product
Freezev1.4-product-layer

Customer Experience ​

ResponsibilitiesOnboarding funnel, email verification, org/clinic wizards, invitations, trial journey UX
Public ContractMiddleware + Filament onboarding pages (writes via existing Saas/CRM actions)
Moduleapp/Filament/, app/Http/, config/saas.php (customer_experience)
Allowed DependenciesSaas provisioning, Product layer permissions
Forbidden DependenciesBilling orchestrator internals; finance
OwnershipSaaS / Customer Experience
Freezev1.5-customer-experience

Entitlements ​

ResponsibilitiesFeature gating, plan entitlements, quota enforcement
Public ContractApp\Modules\Saas\Application\Contracts\EntitlementContract
Moduleapp/Modules/Saas/
Allowed DependenciesShared, Billing lifecycle state
Forbidden DependenciesFinance internals; direct subscription model access from other modules
OwnershipSaaS / Entitlements
Freezev1.6-entitlements

Public API ​

ResponsibilitiesVersioned REST API (/api/v1), Sanctum auth, envelopes, pagination, rate limiting, OpenAPI
Public ContractHTTP routes in routes/api.php + ApiRequestContext (no business logic in controllers)
Moduleapp/Http/, config/api.php
Allowed DependenciesModule query/command contracts, EntitlementContract
Forbidden DependenciesInfrastructure models in controllers; cross-module services
OwnershipPlatform / API
Freezev1.7-public-api / v1.7.1-platform-hardening

Integrations ​

ResponsibilitiesIntegration registry, provider abstraction, sync dispatch
Public ContractIntegrationRegistryContract, IntegrationProviderContract, ConnectorContract
Moduleapp/Modules/Integrations/
Allowed DependenciesShared, domain events
Forbidden DependenciesCRM/Finance internals
OwnershipPlatform / Integrations
Freezev1.8-integrations-platform

Marketplace (Connector Marketplace) ​

ResponsibilitiesConnector catalog, marketplace registry, connector hardening
Public ContractConnectorRegistryContract, ConnectorContract
Moduleapp/Modules/Integrations/
Allowed DependenciesIntegrations platform contracts
Forbidden DependenciesProvider implementations from consumer modules
OwnershipPlatform / Integrations
Freezev1.9-connector-marketplace

AI Platform ​

ResponsibilitiesAI provider abstraction, agent/tool contracts, embedding and vector store boundaries
Public ContractApp\Modules\AI\Application\Contracts\AiPlatformContract
Moduleapp/Modules/AI/
Allowed DependenciesShared
Forbidden DependenciesCRM/Finance internals; direct provider SDK outside AI module
OwnershipAI Platform
Freezev2.0-ai-platform

AI Runtime ​

ResponsibilitiesRuntime execution layer, streaming, tool dispatch, provider connectivity
Public ContractAiProviderContract, AiStreamingProviderContract, AiAgentContract, AiToolHandlerContract
Moduleapp/Modules/AI/
Allowed DependenciesAiPlatformContract
Forbidden DependenciesApplication-layer bypass of provider contracts
OwnershipAI Platform
Freezev2.1-ai-runtime

AI Applications ​

ResponsibilitiesApplication-layer AI features, composed on runtime
Public ContractApplication services exposed via AiPlatformContract surface
Moduleapp/Modules/AI/
Allowed DependenciesAI Runtime contracts
Forbidden DependenciesDirect infrastructure from other modules
OwnershipAI Platform
Freezev2.2-ai-applications

Workspace ​

ResponsibilitiesWorkspace query surface, widgets, data providers, activity aggregation foundation
Public ContractWorkspaceQueryContract, WorkspaceActivityPlatformQueryContract
Moduleapp/Modules/Workspace/
Allowed DependenciesShared, CRM read contracts (via providers)
Forbidden DependenciesCRM write services; finance
OwnershipWorkspace
Freezev2.3-workspace

Notification ​

ResponsibilitiesNotification inbox, activity hub, timeline/inbox/reminder presentation
Public ContractNotificationInboxContract, WorkspaceActivityPlatformQueryContract
Moduleapp/Modules/Workspace/ + app/Filament/Pages/Workspace/
Allowed DependenciesWorkspace providers, Shared notification handlers
Forbidden DependenciesDirect notification persistence from Filament
OwnershipWorkspace / Notifications
Freezev2.4-notification-platform

ResponsibilitiesUnified search providers, collaboration search surface
Public ContractSearchProviderContract, MentionProviderContract
Moduleapp/Modules/Workspace/
Allowed DependenciesWorkspace contracts, CRM read queries
Forbidden DependenciesDirect Eloquent search across modules
OwnershipWorkspace / Search
Freezev2.5-search-collaboration

Realtime ​

ResponsibilitiesPresence, broadcasting abstraction, realtime platform signals
Public ContractApp\Modules\Realtime\Application\Contracts\RealtimePlatformContract
Moduleapp/Modules/Realtime/
Allowed DependenciesShared
Forbidden DependenciesWebSocket infrastructure from consumer modules
OwnershipRealtime
Freezev2.6-realtime-platform

Workflow ​

ResponsibilitiesWorkflow execution platform, triggers, actions, state
Public ContractApp\Modules\Workflow\Application\Contracts\WorkflowPlatformContract
Moduleapp/Modules/Workflow/
Allowed DependenciesShared, port contracts (WorkflowNotificationPortContract, etc.)
Forbidden DependenciesCRM internals from workflow engines
OwnershipWorkflow
Freezev2.7-workflow-platform

Workflow Designer ​

ResponsibilitiesVisual workflow design, definition registry, designer UI
Public ContractWorkflowPlatformContract (design-time operations subset)
Moduleapp/Modules/Workflow/ + Filament designer pages
Allowed DependenciesWorkflow platform
Forbidden DependenciesDirect workflow execution from designer without platform contract
OwnershipWorkflow
Freezev2.8-workflow-designer

Analytics ​

ResponsibilitiesAnalytics platform, KPI queries, metric data providers
Public ContractAnalyticsPlatformContract, AnalyticsReadQueryContract
Moduleapp/Modules/Analytics/
Allowed DependenciesShared, MetricDataProviderContract implementations
Forbidden DependenciesCRM infrastructure from analytics consumers
OwnershipAnalytics
Freezev2.9-analytics-platform

Advanced Analytics ​

ResponsibilitiesTrend detection, benchmarking, advanced read queries
Public ContractApp\Modules\Analytics\Application\Advanced\Contracts\AnalyticsAdvancedReadQueryContract
Moduleapp/Modules/Analytics/Application/Advanced/
Allowed DependenciesAnalytics platform
Forbidden DependenciesDirect analytics service imports from other modules
OwnershipAnalytics
Freezev3.0-advanced-analytics

Operational Intelligence ​

ResponsibilitiesHealth scores, operational insights, enrichment ports
Public ContractApp\Modules\OperationalIntelligence\Application\Contracts\OperationalIntelligenceContract
Moduleapp/Modules/OperationalIntelligence/
Allowed DependenciesAnalyticsAdvancedReadQueryContract (read only)
Forbidden DependenciesAnalytics internal services
OwnershipOperational Intelligence
Freezev3.1-operational-intelligence

Autonomous Operations ​

ResponsibilitiesAutonomous decision enrichment, operations orchestration preview
Public ContractApp\Modules\AutonomousOperations\Application\Contracts\AutonomousOperationsContract
Moduleapp/Modules/AutonomousOperations/
Allowed DependenciesOI, Analytics contracts
Forbidden DependenciesMission/Agent internal services
OwnershipAutonomous Operations
Freezev3.2-autonomous-operations

Assistant ​

ResponsibilitiesAssistant registry, context assembly, assistant platform signals
Public ContractApp\Modules\Assistant\Application\Contracts\AssistantPlatformContract
Moduleapp/Modules/Assistant/
Allowed DependenciesAI Platform contracts (read)
Forbidden DependenciesAgent/Mission internals
OwnershipAssistant Platform
Freezev3.3-assistant-platform

Agent ​

ResponsibilitiesAgent registry, orchestration preview, agent runtime signals
Public ContractApp\Modules\Agent\Application\Contracts\AgentPlatformContract
Moduleapp/Modules/Agent/
Allowed DependenciesAI Platform, Assistant contracts
Forbidden DependenciesMission internal engines
OwnershipAgent Platform
Freezev3.4-agent-platform

Mission ​

ResponsibilitiesMission runtime, scheduling, state machine, mission types, control dashboard
Public ContractApp\Modules\Mission\Application\Contracts\MissionPlatformContract
Moduleapp/Modules/Mission/
Allowed DependenciesAgent, Assistant, OI, Analytics, Workflow (availability), Realtime contracts
Forbidden DependenciesexecuteWorkflow from signal services; internal services of consumed platforms
OwnershipMission Runtime
Freezev3.5-mission-runtime

Deployment ​

ResponsibilitiesRuntime configuration, environments, providers, secrets, feature flags, health checks
Public ContractApp\Modules\Deployment\Application\Contracts\DeploymentPlatformContract
Moduleapp/Modules/Deployment/
Allowed DependenciesMission, Agent, Assistant, OI, Analytics, Workflow, Realtime contracts
Forbidden DependenciesObservability/Production internals
OwnershipDeployment Platform
Freezev3.6-deployment-platform

Observability ​

ResponsibilitiesLog/audit/trace/alert/metric type registries, correlation, metrics, diagnostics, health timeline
Public ContractApp\Modules\Observability\Application\Contracts\ObservabilityPlatformContract
Moduleapp/Modules/Observability/
Allowed DependenciesDeployment, Mission, Agent, Assistant, OI, Analytics, Workflow, Realtime contracts
Forbidden DependenciesProduction internals; real logging backends
OwnershipObservability Platform
Freezev3.7-observability-platform

Production ​

ResponsibilitiesSecurity/authorization/rate-limit/retry/queue/cache/circuit-breaker/backup/recovery/readiness policies; production validation; readiness check types
Public ContractApp\Modules\Production\Application\Contracts\ProductionPlatformContract
Moduleapp/Modules/Production/
Allowed DependenciesDeployment, Observability, Mission, Agent, Assistant, OI, Analytics, Workflow, Realtime contracts
Forbidden DependenciesAll frozen platform internal services; infrastructure side effects
OwnershipProduction Hardening
Freezev3.8-production-platform

Growth ​

ResponsibilitiesScoring/opportunity/growth-signal/expansion policy registries; scoring model, opportunity, growth signal, and expansion signal type taxonomies; preview-safe scoring/opportunity/expansion/validation engines; growth evaluation context; read-only Growth Platform dashboard
Public ContractApp\Modules\Growth\Application\Contracts\GrowthPlatformContract
Moduleapp/Modules/Growth/ (platform layer under Application/)
Allowed DependenciesEntitlementContract, LeadQueryServiceContract, AnalyticsAdvancedReadQueryContract, OperationalIntelligenceContract, AssistantPlatformContract, ProductionPlatformContract (availability only), ObservabilityPlatformContract
Forbidden DependenciesCRM/Leads infrastructure; AI application services; frozen platform registries/engines/internal services; GrowthActionService; workflow/mission dispatch; lead mutations; campaign execution
OwnershipGrowth Platform
Freezev3.9-growth-platform

Compliance ​

ResponsibilitiesCompliance rule, violation type, content scope type, and audit event type registries; compliance rule type taxonomy; preview-safe content scan, rule evaluation, and validation engines; compliance evaluation context; read-only Compliance Platform dashboard; legacy violation/audit actions remain in module
Public ContractApp\Modules\Compliance\Application\Contracts\CompliancePlatformContract
Moduleapp/Modules/Compliance/ (platform layer under Application/)
Allowed DependenciesEntitlementContract, GrowthPlatformContract, AnalyticsAdvancedReadQueryContract, OperationalIntelligenceContract, AssistantPlatformContract, ProductionPlatformContract (availability only), ObservabilityPlatformContract
Forbidden DependenciesCRM/Marketing infrastructure; frozen platform registries/engines/internal services; legacy ComplianceRuleEngine from platform layer; violation persistence from preview engines; content mutation; audit dispatch from previews
OwnershipCompliance Platform
Freezev3.10-compliance-platform

Marketing ​

ResponsibilitiesMarketing assets; asset graph; strategy layer; campaign policies; channel types; funnel policies; content policies; template types; platform knowledge; knowledge graph; recommendation engine; preview engines; validation; read-only Marketing Platform dashboard; legacy WhatsApp/content runtime remains in module
Public ContractApp\Modules\Marketing\Application\Contracts\MarketingPlatformContract
Moduleapp/Modules/Marketing/ (platform layer under Application/)
Allowed DependenciesEntitlementContract, CompliancePlatformContract, GrowthPlatformContract, LeadQueryServiceContract, AnalyticsAdvancedReadQueryContract, OperationalIntelligenceContract, AssistantPlatformContract, ProductionPlatformContract (availability only), ObservabilityPlatformContract, ClinicQueryServiceContract
Forbidden DependenciesTracking internals; CRM writes; lead writes; campaign execution; WhatsApp execution; legacy Marketing runtime from platform layer; frozen platform registries/engines/internal services; lead mutations; content mutation from preview engines
OwnershipMarketing Platform
Freezev3.11-marketing-platform

Tracking ​

ResponsibilitiesEvent taxonomy; event properties; attribution policies; source types; conversion policies; journey stages; privacy policies; integration types; tracking knowledge; event graph; attribution graph; recommendation engine; preview engines; validation; read-only Tracking Platform dashboard; legacy write runtime remains in module
Public ContractApp\Modules\Tracking\Application\Contracts\TrackingPlatformContract
Moduleapp/Modules/Tracking/ (platform layer under Application/)
Allowed DependenciesEntitlementContract, MarketingPlatformContract, CompliancePlatformContract, GrowthPlatformContract, LeadQueryServiceContract, AnalyticsAdvancedReadQueryContract, OperationalIntelligenceContract, AssistantPlatformContract, ProductionPlatformContract (availability only), ObservabilityPlatformContract, ClinicQueryServiceContract
Forbidden DependenciesTrackingFacade, TrackingService, Track*Action, Event model, Infrastructure imports, CRM writes, lead writes, frozen platform registries/engines/internal services, Analytics internal services, Marketing runtime execution, event persistence from preview engines
OwnershipTracking Platform
Freezev3.12-tracking-platform

Platform UX ​

ResponsibilitiesTheme/token/component registries; action card and navigation card templates; structured response blocks; dashboard and report layout templates; feedback states; theme/token resolution; structured response composition; dashboard shell composition; report layout composition; locale/RTL presentation; accessibility metadata; deterministic layout recommendations; registry-driven Blade rendering; Filament theme provider; read-only Platform UX dashboard; legacy design tokens and per-platform dashboard Blade remain parallel
Public ContractApp\Modules\PlatformUX\Application\Contracts\PlatformUXPlatformContract, App\Modules\PlatformUX\Application\Contracts\DesignSystemContract, App\Modules\PlatformUX\Application\Contracts\PlatformUXPresentationContract
Moduleapp/Modules/PlatformUX/
Allowed DependenciesEntitlementContract, ClinicQueryServiceContract, ClinicTemplateViewService (read-only branding), ProductionPlatformContract (availability only), ObservabilityPlatformContract, GrowthPlatformContract, CompliancePlatformContract, MarketingPlatformContract, TrackingPlatformContract (availability signals only)
Forbidden DependenciesCRM/Leads/Finance Infrastructure; frozen platform registries/engines/internal services; AI runtime; domain write Actions; Infrastructure models; direct config reads from consumer modules; business logic in Blade views
OwnershipPlatform UX & Design System
Freezev4.1-platform-ux-design-system

Public Experience ​

ResponsibilitiesPublic website orchestration; landing pages; website builder taxonomy; hero AI host surfaces; booking UX shells; navigation; SEO composition; content orchestration; QR experience; campaign pages; white-label theme bridge; visitor personalization; analytics hook plans; Platform UX composition delegation; journey context; deterministic recommendations; preview semantics; read-only Public Experience dashboard; contract-driven Filament builder shell; optional draft/publish persistence; public Blade presentation hosts; legacy ClinicTemplateSystem and static Blade remain parallel
Public ContractApp\Modules\PublicExperience\Application\Contracts\PublicExperiencePlatformContract, App\Modules\PublicExperience\Application\Contracts\PublicSurfaceContract
Moduleapp/Modules/PublicExperience/
Allowed DependenciesPlatformUXPlatformContract, DesignSystemContract, PlatformUXPresentationContract, EntitlementContract, ClinicQueryServiceContract, ClinicTemplateViewService (read-only), MarketingPlatformContract, TrackingPlatformContract, GrowthPlatformContract, CompliancePlatformContract, LeadQueryServiceContract, AnalyticsAdvancedReadQueryContract, CRM public read contracts (config allowlist), ProductionPlatformContract (availability only), ObservabilityPlatformContract, FinancialQueryContract (graceful degradation)
Forbidden DependenciesCRM/Leads Infrastructure; ClinicTemplateSystem Infrastructure models; Platform UX internal registries/engines/resolvers; Marketing/Tracking legacy runtime Actions; AI Runtime SDKs; frozen platform internal services; domain write Actions from platform layer; business logic in composition engines, Filament pages, or Blade views
OwnershipPublic Experience Platform
Freezev4.2-public-experience-platform

Engineering Operating System ​

ResponsibilitiesEngineering methodology; Cursor rules, skills, agents, commands; prompt library; templates; knowledge hierarchy; MCP governance documentation; architecture test integrity guards
Public ContractN/A — documentation and engineering-test authority only; not a runtime module
Moduledocs/development/, .cursor/ (engineering assets), tests/Architecture/GovernanceDocumentationTest.php, tests/Architecture/EngineeringOperatingSystemIntegrityTest.php
Allowed DependenciesReferences to docs/architecture/, zaixos-company/ (cite), docs/product/, docs/releases/; must not restate governance text
Forbidden DependenciesRuntime module modification; frozen platform code changes; MCP enablement without approval workflow; architecture approval by AI tools
OwnershipEngineering / Architect
Freezev5.0-ai-development-environment (provisional — confirmed at Git freeze)

See docs/releases/v5.0-ai-development-environment.md.


Cross-Cutting Modules (Non-Platform) ​

ModuleRolePublic Surface
SharedKernel contracts, DTOs, clinic scopingApp\Modules\Shared\Application\Contracts\*
ClinicClinic configurationClinicQueryServiceContract
CRMPatients, appointments, clinical workflowsActions + FinancialQueryContract for finance reads
LeadsLead capture, qualificationLeadQueryServiceContract, LeadCommandServiceContract
ClinicTemplateSystemWebsite templatingClinicTemplateViewService (public application service)

Dependency Matrix (Platform Layers) ​

Higher layers may consume lower layers via contract only:

Public Experience → Platform UX / ClinicTemplateSystem / Marketing / Tracking / Compliance / Growth (contract-only reads)
Platform UX → Tracking / Marketing / Compliance / Growth (availability signals only)
Production → Observability → Deployment → Mission → Agent → Assistant
                ↓                ↓
         Operational Intelligence → Advanced Analytics → Analytics
                ↓
         Workflow (availability only)    Realtime (presence)

Never reverse dependencies. Never skip the public contract.


For freeze dates and commit hashes, see docs/releases/. For rules, see ARCHITECTURE_RULES.md.

ZAIXOS Knowledge Portal — public engineering docs at /docs · Staff operations at /admin