[{"data":1,"prerenderedAt":452},["ShallowReactive",2],{"navigation":3,"\u002Fgetting-started\u002Fintroduction":193,"\u002Fgetting-started\u002Fintroduction-surround":449},[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":11,"body":195,"description":441,"extension":442,"links":443,"meta":444,"navigation":445,"path":12,"seo":446,"sitemap":447,"stem":13,"__hash__":448},"docs\u002F1.getting-started\u002F1.introduction.md",{"type":196,"value":197,"toc":433},"minimark",[198,207,212,215,226,229,233,236,242,269,276,280,395,399],[199,200,201,202,206],"p",{},"Laravel OSDD (Open Source Driven Development) lets you split a Laravel application into ",[203,204,205],"strong",{},"layers",": one Composer package per domain, living in your repository, with its own models, migrations, seeders, tests, routes and service provider.",[208,209,211],"h2",{"id":210},"the-problem","The problem",[199,213,214],{},"A fresh Laravel application keeps every domain in the same folders:",[216,217,222],"pre",{"className":218,"code":220,"language":221},[219],"language-text","app\u002F\n  Models\u002FUser.php\n  Models\u002FOrder.php\n  Models\u002FInvoice.php\n  Http\u002FControllers\u002FUserController.php\n  Http\u002FControllers\u002FOrderController.php\n  Http\u002FControllers\u002FInvoiceController.php\n  ...\ndatabase\u002Fmigrations\u002F   ← every table of every domain\ntests\u002FFeature\u002F         ← every test of every domain\n","text",[223,224,220],"code",{"__ignoreMap":225},"",[199,227,228],{},"Nothing separates billing from orders. Migrations, seeders and tests are global, any class can use any other one, and the dependencies between domains only exist in people's heads.",[208,230,232],{"id":231},"the-osdd-way","The OSDD way",[199,234,235],{},"Each domain owns a package, and declares the packages it depends on:",[216,237,240],{"className":238,"code":239,"language":221},[219],"functional\u002F\n  users\u002F\n    composer.json        ← \"functional\u002Fusers\"\n    src\u002FModels\u002FUser.php\n    database\u002Fmigrations\u002F\n    tests\u002F\n  orders\u002F\n    composer.json        ← \"functional\u002Forders\", requires \"functional\u002Fusers\"\n    src\u002FModels\u002FOrder.php\n    src\u002FProviders\u002FOrdersServiceProvider.php\n    database\u002F\n    routes\u002F\n    tests\u002F\ntechnical\u002F\n  osdd\u002F\n    composer.json        ← \"technical\u002Fosdd\": the OSDD configuration\n    config\u002Fosdd.php\n",[223,241,239],{"__ignoreMap":225},[243,244,245,263],"ul",{},[246,247,248,251,252,255,256,255,259,262],"li",{},[223,249,250],{},"functional\u002F"," holds the business domains: ",[223,253,254],{},"users",", ",[223,257,258],{},"orders",[223,260,261],{},"billing",".",[246,264,265,268],{},[223,266,267],{},"technical\u002F"," holds the shared infrastructure: configuration, authentication wiring, observability.",[199,270,271,272,275],{},"The application stays one Laravel application: one ",[223,273,274],{},"artisan",", one database, one deployment. The layers only change where the code lives and who may use it.",[208,277,279],{"id":278},"how-the-pieces-fit","How the pieces fit",[281,282,283,299],"table",{},[284,285,286],"thead",{},[287,288,289,293,296],"tr",{},[290,291,292],"th",{},"Piece",[290,294,295],{},"What it gives you",[290,297,298],{},"Read",[300,301,302,322,341,356,371],"tbody",{},[287,303,304,310,317],{},[305,306,307],"td",{},[203,308,309],{},"Layer",[305,311,312,313,316],{},"A Composer package with ",[223,314,315],{},"\"type\": \"layer\"",", installed through a local path repository",[305,318,319],{},[320,321,34],"a",{"href":35},[287,323,324,328,337],{},[305,325,326],{},[203,327,38],{},[305,329,330,331,333,334,336],{},"The folders that hold the layers: ",[223,332,250],{}," and ",[223,335,267],{}," by default",[305,338,339],{},[320,340,38],{"href":39},[287,342,343,347,352],{},[305,344,345],{},[203,346,42],{},[305,348,349,351],{},[223,350,122],{}," fails when a layer uses a layer it does not require, or when layers require each other",[305,353,354],{},[320,355,42],{"href":43},[287,357,358,363,366],{},[305,359,360],{},[203,361,362],{},"Layer provider",[305,364,365],{},"Each layer wires its own migrations, seeders, routes, views and config",[305,367,368],{},[320,369,370],{"href":47},"Service providers",[287,372,373,378,391],{},[305,374,375],{},[203,376,377],{},"Artisan twins",[305,379,380,255,383,386,387,390],{},[223,381,382],{},"osdd:model",[223,384,385],{},"osdd:controller"," and every other ",[223,388,389],{},"make:*"," twin write inside the layer you pick",[305,392,393],{},[320,394,146],{"href":147},[208,396,398],{"id":397},"where-to-go-next","Where to go next",[400,401,402,409,415,426],"card-group",{},[403,404,406],"card",{"icon":405,"title":15,"to":16},"i-lucide-download",[199,407,408],{},"Requirements and the one Composer command.",[403,410,412],{"icon":6,"title":411,"to":20},"Quick start",[199,413,414],{},"Convert a fresh project and create your first layer.",[403,416,419],{"icon":417,"title":418,"to":24},"i-lucide-folder-git-2","Existing application",[199,420,421,422,425],{},"Add layers next to ",[223,423,424],{},"app\u002F",", one domain at a time.",[403,427,430],{"icon":428,"title":429,"to":57},"i-lucide-blocks","Add a domain",[199,431,432],{},"From an empty layer to a tested CRUD resource.",{"title":225,"searchDepth":434,"depth":435,"links":436},1,2,[437,438,439,440],{"id":210,"depth":435,"text":211},{"id":231,"depth":435,"text":232},{"id":278,"depth":435,"text":279},{"id":397,"depth":435,"text":398},"What Laravel OSDD is, the problem it solves, and how its pieces fit together.","md",null,{},true,{"title":11,"description":441},{"loc":12},"v6o252qvbnL3xa5lNSq6LfW3cHd3yOoIGqFJNxT9qOw",[443,450],{"title":15,"path":16,"stem":17,"description":451,"children":-1},"Install Laravel OSDD and pick your path, fresh project or existing application.",1794437210447]