PHPackages                             theaddresstech/ddd - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. theaddresstech/ddd

ActiveLibrary

theaddresstech/ddd
==================

DDD Laravel-structure-generator

v2.1(2y ago)23611MITPHP

Since Mar 15Pushed 2y ago4 watchersCompare

[ Source](https://github.com/theaddresstech/ddd-v2)[ Packagist](https://packagist.org/packages/theaddresstech/ddd)[ RSS](/packages/theaddresstech-ddd/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (5)Versions (14)Used By (1)

This Package support DDD with laravel
=====================================

[](#this-package-support-ddd-with-laravel)

to Install This Package Following this steps:

1-Update your `composer.json` with following code

```
   "autoload": {
      "psr-4": {
          "App\\": "app/",
          "Database\\Factories\\": "database/factories/",
          "Database\\Seeders\\": "database/seeders/",
          "Src\\":"src/"
      }
  },

```

2- run following command :

```
  composer dump-autoload

```

3-setup package by writting folowing command :

```
  composer require theaddresstech/ddd

```

usage
=====

[](#usage)

The package provide 2 commands:

1-First command :

```
  php artisan ddd:directory

```

after run php artisan ddd:directory will generate `src` folder in base path this folder contain 3 major folders:

```
1-Common: this will contain all common folders such as :

    1.1-Commands   :folder will contain all console commands files that will generate through project.

    1.2-Console    :folder will contain `kernel.php` that where All of your console commands are registered within your application's.

    1.3-Exceptions :folder will contain `kernel.php` This class contains a register method where you may register custom exception reporting and rendering callbacks

    1.4-Helpers    :folder will contain all helpers files that may need or adding new helper files as you need such as : `main.php`,`Enum.php`

    1.5-Http       :folder will contain:
        1.5.1-Http Folder : Will contain Middleware Folder which will contain All middlewares that will available in project.

        1.5.2-kernel.php : This class is used to register your middleware

   1.6-Providers   :folder will contain  service providers that will bootstrp your own application such as (DomainServiceProvider,RouteServiceProvider,RepositoryServiceProvider`,HelperServiceProvider,EventServiceProvider,PolicyServiceProvider)

2-Infrastructure will contain all infrastucture files that will be base calsses for classes that find in Domain Folder  such as:

    2.1-AbstractModels : contain BaseModel class that all entities  extend from it

    2.2-AbstractProviders :contain ServiceProvider class that all service providers extend from it

    2.3-AbstractRepositories :contain basis calsses that all entity EloquentRepository and entity contract repository will extend from it

    2.4-Commands :contain basis calss that all commands in project will extend from it

    2.5-Contracts :contain BaseRepository class  that EloquentRepository extend from it and scope class that all scopes in class extend from it

    2.6-Http : contain basis for Controller,Request,Resource,Factory

    2.7-scoping: contain scoper class

    2.8-Traits :contain set of traits that will used in app

3-Domain Holds the future-domains of the app by default Dashboard And User will be in Domain each domain contain folders

  3.1-Database contain all migrations ,factotories,seeders entities in Domain

  3.2-Entities Contain all entities in Domain besides Traits Folder that contain (CustomAttributes folder contain entityAttributes and Relations Folder contain entity Relations )

  3.3-Http contain three folders (Controller ,Request ,Resources) in each folder contain contain logic for aspecific job

  3.4-Policies contain policy that declared in domain

  3.5-Providers contain providers that related to domain such as  (DomainServiceProvider,RouteServiceProvider,RepositoryServiceProvider`,HelperServiceProvider,EventServiceProvider,PolicyServiceProvider)

  3.6-Repositories contain two folder (Contracts,Eloquent) that are included to support l5 Repository

  3.7-Routes      contain two folder one for api  and other for web containing (auth,guest,public)

  3.8-Resources containing views related to Entites in Domain

  3.9-Traits   can declare traits that specific for each domain in it

the command will modify the Kenel namespace in the `boostrap/app.php` + overwrite the service-providers namespaces in `config/app.php`

```

2- second command : `php artisan ddd:make {type}`

```
`{type}` can be :

`Domain` : create new folder in Domain with name that passes in command and will contain three folders (providers,routes,traits,contract)

`Entity` : create new Entity in Entities Folder  in specified Domain

`Repo`   : create new Repository in Repositories folder in specified Domain

`Event`  : create new Event in Events folder in specified Domain and adding to listen in EventServiceProvider in specified Domain

`Listener` : create new Listner in Listners folder in specified Domain and adding to listen in EventServiceProvider in specified Domain

`Resource`   : create a new resource in a specified domain with apecific entity

`Request`     : create a new Request in a specified domain

`Rule`        :create a new Rule in a specified domain

`Migration`    :create a new migration in a specified domain

`Factory`     :create a new factory in a specified domain

`Seeder`     :create a new seeder in a specified domain

`Notification` :create new notification in aspecified domain

`Controller`   :create new controller in aspecified domain that can be (resource,sac)

`Crud` : [ creates : Entity + DatabaseView + Migration + Factory + Seeder + Views + Datatable + Request + Repo + Resource + Controllers ]

```

Please note that there are options that may be required in order to create any type and you will be asked throwghout the creation process. Therefore you can run the command above without specify any additional option

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~33 days

Total

13

Last Release

749d ago

Major Versions

v1.1.5 → v2.12023-12-11

### Community

Maintainers

![](https://www.gravatar.com/avatar/47220f98fc9a23f431cc3255069f79e566431f63de6afd669f4a29048360956b?d=identicon)[eslam-adel](/maintainers/eslam-adel)

---

Top Contributors

[![Eslam-adel-github](https://avatars.githubusercontent.com/u/57862768?v=4)](https://github.com/Eslam-adel-github "Eslam-adel-github (15 commits)")[![eslam-git-hub](https://avatars.githubusercontent.com/u/63204053?v=4)](https://github.com/eslam-git-hub "eslam-git-hub (15 commits)")[![mohamedselimrefaat](https://avatars.githubusercontent.com/u/5443970?v=4)](https://github.com/mohamedselimrefaat "mohamedselimrefaat (1 commits)")

### Embed Badge

![Health badge](/badges/theaddresstech-ddd/health.svg)

```
[![Health](https://phpackages.com/badges/theaddresstech-ddd/health.svg)](https://phpackages.com/packages/theaddresstech-ddd)
```

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[krayin/laravel-crm

Krayin CRM

22.0k32.8k1](/packages/krayin-laravel-crm)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[corbosman/laravel-passport-claims

Add claims to Laravel Passport JWT Tokens

88655.9k](/packages/corbosman-laravel-passport-claims)[jeremy379/laravel-openid-connect

OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Laravel Passport.

55342.3k2](/packages/jeremy379-laravel-openid-connect)[muhammadsadeeq/laravel-activitylog-ui

A beautiful, modern UI for Spatie's Activity Log with advanced filtering, analytics, and real-time features.

17510.1k](/packages/muhammadsadeeq-laravel-activitylog-ui)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
