DDD layers are the first architecture rule. Screens, routes, database tables, source-era controllers, and a top-level feature folder do not define the core boundary. ADR 029 is the current authority.
C4 diagrams are the architecture navigation layer over DDD. Level 1 and Level 2 show system boundaries and executable units; Level 3 maps backend components to bounded contexts; Level 4 maps one feature slice to aggregate, command, query, policy, and adapter code.
- Layer fixes dependency authority.
- Bounded context names business ownership inside the layer.
- Feature slice names one cohesive business outcome inside the context.
- Optional CQRS splits application writes and reads inside that feature only.
- Adapters translate source IDs and provider rows behind owned ports.
- Interfaces bind transport; orchestration owns composition and process flow.
Canonical shape
Section titled “Canonical shape”domain/<context>/features/<feature>/application/<context>/features/<feature>/adapters/<context>/features/<feature>/interfaces/<context>/features/<feature>/orchestration/<context>/features/<feature>/platform/Dependency direction is
domain <- application <- adapters/interfaces <- orchestration. Sibling
features communicate through explicit public contracts or ports, never through
implementation deep imports.
Naming
Section titled “Naming”Use ubiquitous names in files, functions, types, and variables. Source status codes stay behind adapters or explicit contract mapping.