[{"data":1,"prerenderedAt":639},["ShallowReactive",2],{"navigation":3,"\u002Fconcepts\u002Fbuckets":193,"\u002Fconcepts\u002Fbuckets-surround":634},[4,27,49,99,149,169,183],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":26},"Getting Started","i-lucide-rocket","\u002Fgetting-started","1.getting-started",[10,14,18,22],{"title":11,"path":12,"stem":13},"Introduction","\u002Fgetting-started\u002Fintroduction","1.getting-started\u002F1.introduction",{"title":15,"path":16,"stem":17},"Installation","\u002Fgetting-started\u002Finstallation","1.getting-started\u002F2.installation",{"title":19,"path":20,"stem":21},"Quick Start","\u002Fgetting-started\u002Fquick-start","1.getting-started\u002F3.quick-start",{"title":23,"path":24,"stem":25},"Existing Application","\u002Fgetting-started\u002Fexisting-application","1.getting-started\u002F4.existing-application",false,{"title":28,"icon":29,"path":30,"stem":31,"children":32,"page":26},"Concepts","i-lucide-layers","\u002Fconcepts","2.concepts",[33,37,41,45],{"title":34,"path":35,"stem":36},"Layers","\u002Fconcepts\u002Flayers","2.concepts\u002F1.layers",{"title":38,"path":39,"stem":40},"Buckets","\u002Fconcepts\u002Fbuckets","2.concepts\u002F2.buckets",{"title":42,"path":43,"stem":44},"Boundaries","\u002Fconcepts\u002Fboundaries","2.concepts\u002F3.boundaries",{"title":46,"path":47,"stem":48},"Service Providers","\u002Fconcepts\u002Fservice-providers","2.concepts\u002F4.service-providers",{"title":50,"icon":51,"path":52,"stem":53,"children":54,"page":26},"Guides","i-lucide-book-marked","\u002Fguides","3.guides",[55,59,63,67,71,75,79,83,87,91,95],{"title":56,"path":57,"stem":58},"Add a Domain","\u002Fguides\u002Fadd-a-domain","3.guides\u002F01.add-a-domain",{"title":60,"path":61,"stem":62},"Share Code Between Layers","\u002Fguides\u002Fshare-code-between-layers","3.guides\u002F02.share-code-between-layers",{"title":64,"path":65,"stem":66},"Routes","\u002Fguides\u002Froutes","3.guides\u002F03.routes",{"title":68,"path":69,"stem":70},"Views and Components","\u002Fguides\u002Fviews-and-components","3.guides\u002F04.views-and-components",{"title":72,"path":73,"stem":74},"Seeders","\u002Fguides\u002Fseeders","3.guides\u002F05.seeders",{"title":76,"path":77,"stem":78},"Configuration","\u002Fguides\u002Fconfiguration","3.guides\u002F06.configuration",{"title":80,"path":81,"stem":82},"Events","\u002Fguides\u002Fevents","3.guides\u002F07.events",{"title":84,"path":85,"stem":86},"Tests and CI","\u002Fguides\u002Ftesting-and-ci","3.guides\u002F08.testing-and-ci",{"title":88,"path":89,"stem":90},"Production","\u002Fguides\u002Fproduction","3.guides\u002F09.production",{"title":92,"path":93,"stem":94},"Remove a Layer","\u002Fguides\u002Fremoving-a-layer","3.guides\u002F10.removing-a-layer",{"title":96,"path":97,"stem":98},"Multi-tenancy","\u002Fguides\u002Fmulti-tenancy","3.guides\u002F11.multi-tenancy",{"title":100,"icon":101,"path":102,"stem":103,"children":104,"page":26},"Commands","i-lucide-terminal","\u002Fcommands","4.commands",[105,109,113,117,121,125,129,133,137,141,145],{"title":106,"path":107,"stem":108},"Overview","\u002Fcommands\u002Foverview","4.commands\u002F01.overview",{"title":110,"path":111,"stem":112},"osdd:start","\u002Fcommands\u002Fosdd-start","4.commands\u002F02.osdd-start",{"title":114,"path":115,"stem":116},"osdd:layer","\u002Fcommands\u002Fosdd-layer","4.commands\u002F03.osdd-layer",{"title":118,"path":119,"stem":120},"osdd:list","\u002Fcommands\u002Fosdd-list","4.commands\u002F04.osdd-list",{"title":122,"path":123,"stem":124},"osdd:check","\u002Fcommands\u002Fosdd-check","4.commands\u002F05.osdd-check",{"title":126,"path":127,"stem":128},"osdd:graph","\u002Fcommands\u002Fosdd-graph","4.commands\u002F06.osdd-graph",{"title":130,"path":131,"stem":132},"osdd:seed","\u002Fcommands\u002Fosdd-seed","4.commands\u002F07.osdd-seed",{"title":134,"path":135,"stem":136},"osdd:phpunit","\u002Fcommands\u002Fosdd-phpunit","4.commands\u002F08.osdd-phpunit",{"title":138,"path":139,"stem":140},"osdd:remove","\u002Fcommands\u002Fosdd-remove","4.commands\u002F09.osdd-remove",{"title":142,"path":143,"stem":144},"osdd:cache","\u002Fcommands\u002Fosdd-cache","4.commands\u002F10.osdd-cache",{"title":146,"path":147,"stem":148},"Generators","\u002Fcommands\u002Fmake-commands","4.commands\u002F11.make-commands",{"title":150,"icon":151,"path":152,"stem":153,"children":154,"page":26},"API Reference","i-lucide-book-open","\u002Fapi-reference","5.api-reference",[155,159,162,166],{"title":156,"path":157,"stem":158},"LayerServiceProvider","\u002Fapi-reference\u002Flayer-service-provider","5.api-reference\u002F1.layer-service-provider",{"title":34,"path":160,"stem":161},"\u002Fapi-reference\u002Flayers","5.api-reference\u002F2.layers",{"title":163,"path":164,"stem":165},"SeederRegistry","\u002Fapi-reference\u002Fseeder-registry","5.api-reference\u002F3.seeder-registry",{"title":76,"path":167,"stem":168},"\u002Fapi-reference\u002Fconfiguration","5.api-reference\u002F4.configuration",{"title":170,"icon":171,"path":172,"stem":173,"children":174,"page":26},"Integrations","i-lucide-puzzle","\u002Fintegrations","6.integrations",[175,179],{"title":176,"path":177,"stem":178},"Laravel Boost","\u002Fintegrations\u002Flaravel-boost","6.integrations\u002F1.laravel-boost",{"title":180,"path":181,"stem":182},"Tinker and IDE Helper","\u002Fintegrations\u002Ftinker-and-ide-helper","6.integrations\u002F2.tinker-and-ide-helper",{"title":184,"icon":185,"path":186,"stem":187,"children":188,"page":26},"Upgrade","i-lucide-arrow-up-circle","\u002Fupgrade","7.upgrade",[189],{"title":190,"path":191,"stem":192},"Upgrade from 2.x","\u002Fupgrade\u002Ffrom-2x","7.upgrade\u002F1.from-2x",{"id":194,"title":38,"body":195,"description":626,"extension":627,"links":628,"meta":629,"navigation":630,"path":39,"seo":631,"sitemap":632,"stem":40,"__hash__":633},"docs\u002F2.concepts\u002F2.buckets.md",{"type":196,"value":197,"toc":621},"minimark",[198,207,319,340,345,411,422,426,440,448,454,464,468,474,597,611,617],[199,200,201,202,206],"p",{},"A bucket is a folder listed in ",[203,204,205],"code",{},"osdd.layers.paths",". OSDD looks for layers in the buckets only. There are two by default:",[208,209,215],"pre",{"className":210,"code":211,"filename":212,"language":213,"meta":214,"style":214},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","'layers' => [\n    'paths' => [\n        'functional' => base_path('functional'),\n        'technical'  => base_path('technical'),\n    ],\n],\n","technical\u002Fosdd\u002Fconfig\u002Fosdd.php","php","",[203,216,217,238,253,282,307,313],{"__ignoreMap":214},[218,219,222,226,230,232,235],"span",{"class":220,"line":221},"line",1,[218,223,225],{"class":224},"sMK4o","'",[218,227,229],{"class":228},"sfazB","layers",[218,231,225],{"class":224},[218,233,234],{"class":224}," =>",[218,236,237],{"class":224}," [\n",[218,239,241,244,247,249,251],{"class":220,"line":240},2,[218,242,243],{"class":224},"    '",[218,245,246],{"class":228},"paths",[218,248,225],{"class":224},[218,250,234],{"class":224},[218,252,237],{"class":224},[218,254,256,259,262,264,266,270,273,275,277,279],{"class":220,"line":255},3,[218,257,258],{"class":224},"        '",[218,260,261],{"class":228},"functional",[218,263,225],{"class":224},[218,265,234],{"class":224},[218,267,269],{"class":268},"s2Zo4"," base_path",[218,271,272],{"class":224},"(",[218,274,225],{"class":224},[218,276,261],{"class":228},[218,278,225],{"class":224},[218,280,281],{"class":224},"),\n",[218,283,285,287,290,292,295,297,299,301,303,305],{"class":220,"line":284},4,[218,286,258],{"class":224},[218,288,289],{"class":228},"technical",[218,291,225],{"class":224},[218,293,294],{"class":224},"  =>",[218,296,269],{"class":268},[218,298,272],{"class":224},[218,300,225],{"class":224},[218,302,289],{"class":228},[218,304,225],{"class":224},[218,306,281],{"class":224},[218,308,310],{"class":220,"line":309},5,[218,311,312],{"class":224},"    ],\n",[218,314,316],{"class":220,"line":315},6,[218,317,318],{"class":224},"],\n",[199,320,321,322,325,326,329,330,325,333,336,337,339],{},"The key of each bucket is also the vendor of the layers created in it: ",[203,323,324],{},"osdd:layer functional\u002Forders"," creates ",[203,327,328],{},"functional\u002Forders",", and ",[203,331,332],{},"osdd:layer technical\u002Fauth",[203,334,335],{},"technical\u002Fauth",". In a terminal, ",[203,338,114],{}," without a name asks which bucket to use.",[341,342,344],"h2",{"id":343},"functional-or-technical","functional or technical",[346,347,348,364],"table",{},[349,350,351],"thead",{},[352,353,354,358,361],"tr",{},[355,356,357],"th",{},"Bucket",[355,359,360],{},"Holds",[355,362,363],{},"Examples",[365,366,367,390],"tbody",{},[352,368,369,375,378],{},[370,371,372],"td",{},[203,373,374],{},"functional\u002F",[370,376,377],{},"Business domains. A domain owns its models, rules, HTTP layer and tests.",[370,379,380,383,384,383,387],{},[203,381,382],{},"users",", ",[203,385,386],{},"orders",[203,388,389],{},"billing",[352,391,392,397,400],{},[370,393,394],{},[203,395,396],{},"technical\u002F",[370,398,399],{},"Infrastructure shared by several domains, with no business meaning.",[370,401,402,383,405,383,408],{},[203,403,404],{},"osdd",[203,406,407],{},"auth",[203,409,410],{},"feature-flags",[199,412,413,414,417,418,421],{},"OSDD handles both buckets the same way: the split is organizational. Avoid catch-all layers such as ",[203,415,416],{},"common"," or ",[203,419,420],{},"shared",": they end up holding everything, and every other layer depends on them.",[341,423,425],{"id":424},"how-layers-are-found","How layers are found",[199,427,428,429,432,433,436,437,439],{},"OSDD scans every bucket. A sub-folder whose ",[203,430,431],{},"composer.json"," has ",[203,434,435],{},"\"type\": \"layer\""," is a layer. A sub-folder without a ",[203,438,431],{}," is scanned in turn, so you can group layers:",[208,441,446],{"className":442,"code":444,"language":445},[443],"language-text","functional\u002F\n  billing\u002F\n    invoices\u002F     ← layer \"functional\u002Finvoices\"\n      composer.json\n    payments\u002F     ← layer \"functional\u002Fpayments\"\n      composer.json\n  orders\u002F         ← layer \"functional\u002Forders\"\n    composer.json\n","text",[203,447,444],{"__ignoreMap":214},[199,449,450,451,453],{},"A folder with a ",[203,452,431],{}," stops the scan: OSDD never looks for layers inside a layer, nor inside a package of another type.",[199,455,456,457,463],{},"The layers are always sorted by name. They are discovered once per process; ",[458,459,460],"a",{"href":143},[203,461,462],{},"php artisan optimize"," caches them for production.",[341,465,467],{"id":466},"adding-a-bucket","Adding a bucket",[199,469,470,471,473],{},"Add a path to ",[203,472,212],{},":",[208,475,477],{"className":210,"code":476,"filename":212,"language":213,"meta":214,"style":214},"return [\n    'layers' => [\n        'paths' => [\n            'functional' => base_path('functional'),\n            'technical'  => base_path('technical'),\n            'support'    => base_path('support'),\n        ],\n    ],\n];\n",[203,478,479,487,499,511,534,556,580,586,591],{"__ignoreMap":214},[218,480,481,485],{"class":220,"line":221},[218,482,484],{"class":483},"s7zQu","return",[218,486,237],{"class":224},[218,488,489,491,493,495,497],{"class":220,"line":240},[218,490,243],{"class":224},[218,492,229],{"class":228},[218,494,225],{"class":224},[218,496,234],{"class":224},[218,498,237],{"class":224},[218,500,501,503,505,507,509],{"class":220,"line":255},[218,502,258],{"class":224},[218,504,246],{"class":228},[218,506,225],{"class":224},[218,508,234],{"class":224},[218,510,237],{"class":224},[218,512,513,516,518,520,522,524,526,528,530,532],{"class":220,"line":284},[218,514,515],{"class":224},"            '",[218,517,261],{"class":228},[218,519,225],{"class":224},[218,521,234],{"class":224},[218,523,269],{"class":268},[218,525,272],{"class":224},[218,527,225],{"class":224},[218,529,261],{"class":228},[218,531,225],{"class":224},[218,533,281],{"class":224},[218,535,536,538,540,542,544,546,548,550,552,554],{"class":220,"line":309},[218,537,515],{"class":224},[218,539,289],{"class":228},[218,541,225],{"class":224},[218,543,294],{"class":224},[218,545,269],{"class":268},[218,547,272],{"class":224},[218,549,225],{"class":224},[218,551,289],{"class":228},[218,553,225],{"class":224},[218,555,281],{"class":224},[218,557,558,560,563,565,568,570,572,574,576,578],{"class":220,"line":315},[218,559,515],{"class":224},[218,561,562],{"class":228},"support",[218,564,225],{"class":224},[218,566,567],{"class":224},"    =>",[218,569,269],{"class":268},[218,571,272],{"class":224},[218,573,225],{"class":224},[218,575,562],{"class":228},[218,577,225],{"class":224},[218,579,281],{"class":224},[218,581,583],{"class":220,"line":582},7,[218,584,585],{"class":224},"        ],\n",[218,587,589],{"class":220,"line":588},8,[218,590,312],{"class":224},[218,592,594],{"class":220,"line":593},9,[218,595,596],{"class":224},"];\n",[199,598,599,602,603,606,607,610],{},[203,600,601],{},"osdd:layer support\u002Fmailing"," now creates the layer in ",[203,604,605],{},"support\u002F"," and registers a ",[203,608,609],{},".\u002Fsupport\u002F*"," path repository with the first layer you create there.",[199,612,613,614],{},"Without a terminal, a vendor that matches no bucket fails: ",[203,615,616],{},"The vendor [acme] matches no key of osdd.layers.paths (functional, technical). Name the layer after one of them, or pass --target-path.",[618,619,620],"style",{},"html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}",{"title":214,"searchDepth":221,"depth":240,"links":622},[623,624,625],{"id":343,"depth":240,"text":344},{"id":424,"depth":240,"text":425},{"id":466,"depth":240,"text":467},"The folders that hold the layers, what goes in each one, and how OSDD finds the layers inside them.","md",null,{},true,{"title":38,"description":626},{"loc":39},"kmoXQ4w7cI8hk4ZB4hAX7Aw8NdNlj9IIJuHE2uU84S0",[635,637],{"title":34,"path":35,"stem":36,"description":636,"children":-1},"What a layer is, what its composer.json declares, and how it gets installed.",{"title":42,"path":43,"stem":44,"description":638,"children":-1},"The rule osdd:check enforces between layers, what it reads, and how to fix or ignore a violation.",1794437210447]