Knowledge Portal · engineering documentation

Skip to content

DDD Rules

Status: Canonical
Last updated: 2026-07-05


Layer model

Every product module follows:

Domain/          → entities, value objects, domain services, events
Application/     → actions, services, DTOs, queries
Infrastructure/  → persistence, external APIs
Http/            → controllers, requests (thin)
Providers/       → DI registration
Database/        → migrations, seeders, factories
Tests/           → unit + feature per module

Rules

RuleDetail
D-01Domain has no framework imports except allowed primitives
D-02Application orchestrates; Domain decides business invariants
D-03Infrastructure implements repository interfaces defined in Domain or Application
D-04No cross-module Infrastructure imports
D-05Writes go through Actions or Application Services
D-06Reads may use Queries; return DTOs at boundaries

Bounded context map

See product-specific module index: MODULES/README.md.


Breadcrumbs: Home → Engineering → DDD Rules

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