[{"data":1,"prerenderedAt":339},["ShallowReactive",2],{"page-\u002Fv1\u002Fcore\u002Fwhere-does-this-go":3},{"id":4,"title":5,"body":6,"description":331,"extension":332,"meta":333,"navigation":334,"path":335,"seo":336,"stem":337,"__hash__":338},"content\u002Fv1\u002Fcore\u002Fwhere-does-this-go.md","Where does this code go?",{"type":7,"value":8,"toc":325},"minimark",[9,13,28,222,227,298,302,308],[10,11,5],"h1",{"id":12},"where-does-this-code-go",[14,15,16,17,21,22,27],"p",{},"Use this table when you are unsure which folder owns a change. Paths below are ",[18,19,20],"strong",{},"Core roles","; host folder names vary by adapter — see ",[23,24,26],"a",{"href":25},"\u002Fv1\u002Fadapters","Adapters",". For fair multi-host examples of persistence \u002F composition \u002F UI \u002F async, open those concept pages (they list every documented host, not one favorite).",[29,30,31,44],"table",{},[32,33,34],"thead",{},[35,36,37,41],"tr",{},[38,39,40],"th",{},"Scenario",[38,42,43],{},"Core location",[45,46,47,60,70,80,90,100,110,119,130,142,154,168,179,187,195,207],"tbody",{},[35,48,49,53],{},[50,51,52],"td",{},"Database schema \u002F migrations",[50,54,55,56],{},"Module ",[57,58,59],"code",{},"Infrastructure\u002FPersistence\u002F…",[35,61,62,65],{},[50,63,64],{},"Application input DTO",[50,66,67],{},[57,68,69],{},"Application\u002FDTO\u002F{Capability}\u002F",[35,71,72,75],{},[50,73,74],{},"Intra-module Domain DTO",[50,76,77],{},[57,78,79],{},"Domain\u002FDTO\u002F",[35,81,82,85],{},[50,83,84],{},"Pure business rules (Entities)",[50,86,87],{},[57,88,89],{},"Domain\u002FEntities\u002F",[35,91,92,95],{},[50,93,94],{},"Persistence \u002F I\u002FO contracts",[50,96,97],{},[57,98,99],{},"Domain\u002FPorts\u002F{Capability}\u002F",[35,101,102,105],{},[50,103,104],{},"Process orchestration",[50,106,107],{},[57,108,109],{},"Application\u002FUseCases\u002F{Capability}\u002F",[35,111,112,115],{},[50,113,114],{},"Persistence adapter",[50,116,117],{},[57,118,59],{},[35,120,121,124],{},[50,122,123],{},"External \u002F peer integration",[50,125,126,129],{},[57,127,128],{},"Infrastructure\u002FExternalServices\u002F"," (ACL adapters, HTTP clients)",[35,131,132,139],{},[50,133,134,135,138],{},"Tech adapter used by ",[18,136,137],{},"one"," module",[50,140,141],{},"That module’s Infrastructure (+ local port if needed)",[35,143,144,151],{},[50,145,146,147,150],{},"Same tech port used by ",[18,148,149],{},"≥2"," modules",[50,152,153],{},"Promote to Shared kernel",[35,155,156,162],{},[50,157,158,159],{},"Cross-module data ",[18,160,161],{},"needed now",[50,163,164,165],{},"Consumer local port + ACL adapter → thin peer ",[57,166,167],{},"*ModuleInterface",[35,169,170,176],{},[50,171,172,173],{},"Cross-module side effect ",[18,174,175],{},"later",[50,177,178],{},"Publisher Domain Event → consumer translation listener → inbound Use Case",[35,180,181,184],{},[50,182,183],{},"Multi-step cross-module flow",[50,185,186],{},"Orchestration Use Case or Infra process manager (ACL + Events only)",[35,188,189,192],{},[50,190,191],{},"Cross-context report \u002F list",[50,193,194],{},"Owned projection or ACL read — not ORM join across modules",[35,196,197,204],{},[50,198,199,200,203],{},"Processed ",[57,201,202],{},"eventId"," store",[50,205,206],{},"Consumer Infrastructure",[35,208,209,216],{},[50,210,211,212,215],{},"Cross-module ",[18,213,214],{},"business"," types in Shared",[50,217,218,221],{},[18,219,220],{},"Forbidden"," — use ACL \u002F Events",[223,224,226],"h2",{"id":225},"decision-shortcuts","Decision shortcuts",[29,228,229,239],{},[32,230,231],{},[35,232,233,236],{},[38,234,235],{},"Question",[38,237,238],{},"Answer",[45,240,241,249,260,268,276,288],{},[35,242,243,246],{},[50,244,245],{},"Is it a business invariant?",[50,247,248],{},"Domain Entity \u002F Domain service",[35,250,251,254],{},[50,252,253],{},"Is it orchestration of a user intention?",[50,255,256,257],{},"First-level ",[57,258,259],{},"*UseCase",[35,261,262,265],{},[50,263,264],{},"Does it talk to DB \u002F HTTP \u002F peer?",[50,266,267],{},"Port in Domain, adapter in Infrastructure",[35,269,270,273],{},[50,271,272],{},"Does UI need to call it?",[50,274,275],{},"Only first-level Use Cases",[35,277,278,285],{},[50,279,280,281,284],{},"Do two modules need the same ",[18,282,283],{},"tech"," helper?",[50,286,287],{},"Promote to Shared",[35,289,290,295],{},[50,291,280,292,294],{},[18,293,214],{}," concept?",[50,296,297],{},"ACL or Events — never Shared",[223,299,301],{"id":300},"design-test","Design test",[303,304,305],"blockquote",{},[14,306,307],{},"If the peer module is deleted and replaced by HTTP, does Application\u002FDomain still compile?",[14,309,310,311,314,315,319,320,324],{},"If you are placing a ",[57,312,313],{},"use"," statement and the test would fail, you are in the wrong layer — see ",[23,316,318],{"href":317},"\u002Fv1\u002Fcore\u002Fanti-patterns","Anti-patterns"," and the ",[23,321,323],{"href":322},"\u002Fv1\u002Fcore\u002Fdecision-tree","Decision tree",".",{"title":326,"searchDepth":327,"depth":327,"links":328},"",2,[329,330],{"id":225,"depth":327,"text":226},{"id":300,"depth":327,"text":301},"Quick placement reference for Modular Hexagonal DDD — Core paths by scenario.","md",{},true,"\u002Fv1\u002Fcore\u002Fwhere-does-this-go",{"title":5,"description":331},"v1\u002Fcore\u002Fwhere-does-this-go","M928Uz51ZcuFGVKxxtXRYijp__7KFsMs0e9nF0A0QDo",1786241412625]