PHPackages                             samrat415/laravel-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. [Framework](/categories/framework)
4. /
5. samrat415/laravel-ddd

ActiveLibrary[Framework](/categories/framework)

samrat415/laravel-ddd
=====================

Laravel DDD Toolkit - A lightweight Laravel package to scaffold and manage Domain Driven Design (DDD) modules for APIs and Livewire frontends. Features automatic PSR-4 namespace registration, artisan commands for module creation, and seamless integration with Laravel Sail.

v1.0.1(11mo ago)7358MITPHPPHP ^8.1CI failing

Since Jul 3Pushed 11mo agoCompare

[ Source](https://github.com/samrat415/laravel-ddd)[ Packagist](https://packagist.org/packages/samrat415/laravel-ddd)[ Docs](https://github.com/samrat/laravel-ddd)[ GitHub Sponsors](https://github.com/samrat415)[ RSS](/packages/samrat415-laravel-ddd/feed)WikiDiscussions main Synced today

READMEChangelog (1)Dependencies (8)Versions (3)Used By (0)

Laravel DDD Toolkit 🧱
=====================

[](#laravel-ddd-toolkit-)

[![Total Downloads](https://camo.githubusercontent.com/7983a369394d019c63001b861834bf66dc01be4b1ff2ee35a7f0717e81bd37a1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f73616d7261743431352f6c61726176656c2d6464643f7374796c653d666f722d7468652d626164676526636f6c6f723d627269676874677265656e)](https://packagist.org/packages/samrat415/laravel-ddd)

> A Laravel package to scaffold and register Domain Driven Design (DDD) modules for APIs and Livewire frontends.

---

Features
--------

[](#features)

- Auto-registers `domains/`, `src/`, and `frontend/` PSR-4 namespaces
- Registers service providers automatically
- Artisan commands to setup folder structures and modules
- Supports portal-based domain APIs and frontend modules
- Optional interactive prompts for portal creation

---

Installation
------------

[](#installation)

```
composer require samrat415/laravel-ddd
```

---

Autoload
--------

[](#autoload)

You do **not** need to manually add namespaces to composer.json — the package does it for you automatically.

---

Commands
--------

[](#commands)

### 1. Install base folders and portals

[](#1-install-base-folders-and-portals)

```
php artisan ddd:install
```

- Creates base folders: `domains/`, `src/`, `frontend/` (if missing)
- Prompts to add portals for domains and frontend

---

### 2. Create a new domain module

[](#2-create-a-new-domain-module)

```
php artisan ddd:domain {portal/module}
```

- Creates structure inside `domains/{portal}/{module}`, e.g.:

```
domains/Admin/Users/
├── Api/
├── Resources/
└── routes/v1.php

```

- If portal is omitted, prompts to select or create one.

---

### 3. Create a new src module

[](#3-create-a-new-src-module)

```
php artisan ddd:src {module}
```

- Creates structure inside `src/{module}`, e.g.:

```
src/Admin/
├── Controllers/
├── DTO/
├── Enums/
├── Livewire/       # only if livewire_support config enabled
├── Models/
├── Routes/web.php
├── Service/
└── Views/

```

- Does not ask for portal, just creates the module folders.

---

Folder Overview
---------------

[](#folder-overview)

```
domains/      # API domains organized by portal
frontend/     # Livewire & Blade UI modules by portal
src/          # Core business logic and services

```

---

License
-------

[](#license)

MIT License © [samrat415](https://github.com/samrat415)

---

Ongoing Updates
---------------

[](#ongoing-updates)

This package is actively evolving. Upcoming features include a Filament-like, but simpler, module generator that:

- Creates basic CRUD modules
- Follows Domain Driven Design (DDD) patterns
- Uses Livewire components
- Works with your existing database tables

Stay tuned for more improvements and new tools to speed up your Laravel DDD development!

###  Health Score

33

—

LowBetter than 72% of packages

Maintenance51

Moderate activity, may be stable

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~15 days

Total

2

Last Release

349d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f6e64696eaba7af48ffc0345baa32ac261b46fbda83f3ca92901cec27fa59360?d=identicon)[samrat415](/maintainers/samrat415)

---

Top Contributors

[![samrat415](https://avatars.githubusercontent.com/u/43883707?v=4)](https://github.com/samrat415 "samrat415 (5 commits)")

---

Tags

laravellaravel-dddsamrat415

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

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

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k102.4M1.4k](/packages/spatie-laravel-permission)[spatie/laravel-pdf

Create PDFs in Laravel apps

1.0k4.8M47](/packages/spatie-laravel-pdf)[dedoc/scramble

Automatic generation of API documentation for Laravel applications.

2.1k11.2M100](/packages/dedoc-scramble)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17760.2k3](/packages/stephenjude-filament-jetstream)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

816333.3k3](/packages/defstudio-telegraph)[spatie/laravel-passkeys

Use passkeys in your Laravel app

471890.7k39](/packages/spatie-laravel-passkeys)

PHPackages © 2026

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