Commands Overview

osdd:start

Bootstrap a fresh Laravel project with the full OSDD architecture.

osdd:start converts a fresh Laravel project to OSDD architecture in a single command.

This command is designed for fresh projects only. It permanently deletes the app/, database/, and config/ directories. Do not run it on an existing project.

Usage

Terminal
php artisan osdd:start

What It Does

The command performs the following steps in order:

Creates functional/users layer

Scaffolds a complete user layer with:

  • User model
  • UserFactory factory
  • UsersSeeder seeder
  • Migration for the users table
  • UsersServiceProvider

Creates technical/osdd layer

Scaffolds the root infrastructure layer with:

  • OsddServiceProvider
  • Config directory

Cleans up the legacy structure

  • Deletes app/
  • Deletes database/
  • Deletes config/
  • Removes legacy PSR-4 entries (App\, Database\Factories\, Database\Seeders\) from root composer.json

Registers layers in composer.json

Adds Composer path repositories and require entries for both functional/users and technical/osdd.

Runs composer update (optional)

Prompts whether to run composer update to finalize package registration and trigger Laravel's auto-discovery.

Resulting Structure

functional/
  users/
    composer.json
    src/
      Models/User.php
      Providers/UsersServiceProvider.php
    database/
      factories/UserFactory.php
      migrations/xxxx_create_users_table.php
      seeders/UsersSeeder.php
technical/
  osdd/
    composer.json
    src/
      Providers/OsddServiceProvider.php
    config/
bootstrap/
  providers.php
composer.json