Introduction
Laravel OSDD (Open Source Driven Development) is a Laravel package that replaces the default monolithic app/, database/, and config/ directory structure with independently composable layers.
Each layer is its own Composer package living inside a functional/ or technical/ directory at the project root. Layers have their own composer.json, PSR-4 autoloading, migrations, seeders, models, and service providers.
The Problem It Solves
A standard Laravel application starts clean, but as it grows the app/ directory becomes a sprawling mix of unrelated concerns:
app/
Models/User.php
Models/Order.php
Models/Product.php
Http/Controllers/UserController.php
Http/Controllers/OrderController.php
...
There is no structural boundary between domains. A change to the billing logic requires navigating through folders shared with users, inventory, and notifications. Tests are global. Config is global. Seeders are global.
The OSDD Solution
OSDD gives every domain concern its own isolated package:
functional/
users/
composer.json ← Composer package "functional/users"
src/
Models/User.php
Providers/UsersServiceProvider.php
database/
migrations/
seeders/
orders/
composer.json ← Composer package "functional/orders"
src/
Models/Order.php
Providers/OrdersServiceProvider.php
database/
migrations/
seeders/
technical/
osdd/
composer.json ← Composer package "technical/osdd"
src/
Providers/OsddServiceProvider.php
config/
Each layer is independently testable, independently deployable (as a private Composer package), and completely self-contained.
Core Concepts
Layers
The unit of organization. Each layer is a Composer package representing one domain or infrastructure concern.
functional/
Business domain layers. Users, orders, billing, notifications — one layer per domain.
technical/
Infrastructure layers shared across the app. Auth adapters, event buses, global config.
Requirements
| Requirement | Version |
|---|---|
| PHP | ^8.3 |
| Laravel | ^12.0 or ^13.0 |
| DOM extension | Required for osdd:phpunit |