PHPackages                             morphling-dev/3d - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. morphling-dev/3d

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

morphling-dev/3d
================

Morphling Coding 3D (Domain Driven Design) Scaffolding Generator

05PHPCI passing

Since Mar 29Pushed 3mo agoCompare

[ Source](https://github.com/morphling-dev/3d)[ Packagist](https://packagist.org/packages/morphling-dev/3d)[ RSS](/packages/morphling-dev-3d/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (2)Used By (0)

Morphling 3D (Domain-Driven Design)
===================================

[](#morphling-3d-domain-driven-design)

[![Latest Version on Packagist](https://camo.githubusercontent.com/d9f1a3881f400de897be5a51f582e3efb4031b087e34feb437c0d1ad2e76eefd/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6f7270686c696e672d6465762f33642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/morphling-dev/3d)[![Total Downloads](https://camo.githubusercontent.com/e90ca1b5aedadb174962b0880ea518f7dcc0feba2bb6eb28ba24c0abe031c36c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d6f7270686c696e672d6465762f33642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/morphling-dev/3d)[![License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

**Morphling 3D** is an architectural framework for Laravel that enables you to build scalable, maintainable, and structured applications using **Domain-Driven Design (DDD)** and **Hexagonal Architecture**.

It is designed for systems where business complexity matters — such as ERP, financial systems, and multi-module enterprise applications.

---

Why Morphling 3D Exists
-----------------------

[](#why-morphling-3d-exists)

As applications grow, traditional Laravel structures often lead to:

- Bloated controllers and services
- Mixed responsibilities across layers
- Difficult-to-maintain business logic
- Inconsistent patterns between modules

Morphling 3D addresses these issues by enforcing a clear architectural structure and predictable development flow.

---

Core Principles
---------------

[](#core-principles)

Morphling 3D is built around a few strict principles:

- **Separation of Concerns**Each layer has a single responsibility and must not leak into others.
- **Explicit Application Flow**Every request follows a clear path:

```

Request → DTO → UseCase → Domain → Repository

```

- **Domain-Centric Design**Business rules live inside the Domain layer, not in controllers or infrastructure.
- **Consistency Across Modules**Every module follows the same structure, making large systems easier to navigate and maintain.

---

What Morphling 3D Provides
--------------------------

[](#what-morphling-3d-provides)

Morphling 3D is not just a generator. It provides a structured system for building applications:

- **Modular Architecture**Each feature is isolated into its own module with clear boundaries.
- **Layer Enforcement**Domain, Application, Infrastructure, and Delivery layers are clearly separated.
- **DTO and Mapper Pattern**Ensures data integrity when moving across layers.
- **Auto Discovery**Modules automatically register routes, providers, and migrations.
- **Shared Kernel**Includes reusable components such as:
- `ApiResponse`
- `BaseUseCase`
- `BaseModel`
- `HttpStatus`

---

Module Structure
----------------

[](#module-structure)

Every module follows a consistent 4-layer architecture:

```
modules/
└── {ModuleName}/
  ├── Application/        # DTOs, UseCases
  ├── Domain/             # Entities, Value Objects, Enums, Interfaces
  ├── Infrastructure/     # Models, Repositories, Mappers
  └── Delivery/           # Controllers, Requests, Resources, Routes

```

---

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

[](#installation)

Install via Composer:

```
composer require morphling-dev/3d
```

Run the installer:

```
php artisan 3d:install
```

Register the modules namespace:

```
"autoload": {
    "psr-4": {
        "App\\": "app/",
        "Modules\\": "modules/"
    }
}
```

Then run:

```
composer dump-autoload
```

---

Getting Started
---------------

[](#getting-started)

- Quick Start: [docs/quick-start.md](docs/quick-start.md)
- First Module Tutorial: [docs/first-module.md](docs/first-module.md)
- Architectural Rules: [docs/rules.md](docs/rules.md)

---

Artisan Commands
----------------

[](#artisan-commands)

Morphling 3D provides a comprehensive set of Artisan commands to manage modules and generate structured code across all layers.

---

### Core Commands

[](#core-commands)

Initialize and manage the Morphling 3D environment:

```
php artisan 3d:install
```

---

### Module Management

[](#module-management)

Create, inspect, and manage modules:

```
php artisan 3d:new {ModuleName}
php artisan 3d:delete {ModuleName}
php artisan 3d:list
php artisan 3d:discover
```

---

### Module Operations

[](#module-operations)

Run module-specific operations such as migrations, routes, and testing:

```
php artisan 3d:migrate
php artisan 3d:seed
php artisan 3d:route:list
php artisan 3d:test
```

---

### Application Layer

[](#application-layer)

Generate application-level components:

```
php artisan 3d:make-dto
php artisan 3d:make-usecase
```

---

### Domain Layer

[](#domain-layer)

Generate core business logic components:

```
php artisan 3d:make-entity
php artisan 3d:make-vo
php artisan 3d:make-enum
php artisan 3d:make-interface
php artisan 3d:make-service
```

---

### Infrastructure Layer

[](#infrastructure-layer)

Generate technical and persistence-related components:

```
php artisan 3d:make-model
php artisan 3d:make-repo
php artisan 3d:make-mapper
php artisan 3d:make-migration
php artisan 3d:make-seeder
php artisan 3d:make-factory
php artisan 3d:make-event
php artisan 3d:make-listener
php artisan 3d:make-job
php artisan 3d:make-notification
php artisan 3d:make-observer
php artisan 3d:make-external
php artisan 3d:make-provider
```

---

### Delivery Layer

[](#delivery-layer)

Generate interface and HTTP-related components:

```
php artisan 3d:make-controller
php artisan 3d:make-request
php artisan 3d:make-resource
php artisan 3d:make-route
php artisan 3d:make-view
```

---

### Command Philosophy

[](#command-philosophy)

Morphling 3D commands are designed to enforce architectural consistency. Each generated file follows predefined conventions aligned with the 4-layer architecture.

> Commands are not just code generators — they help ensure your application remains maintainable, scalable, and aligned with best practices.

---

Configuration
-------------

[](#configuration)

You can customize base paths and namespaces in `config/3d.php`:

```
return [
    'base_path' => base_path('modules'),
    'base_namespace' => 'Modules',

    'namespaces' => [
        'use-case'     => 'Application/UseCases',
        'entity'       => 'Domain/Entities',
        'value-object' => 'Domain/ValueObjects',
        'repository'   => 'Infrastructure/Repositories',
    ],
];
```

---

When to Use Morphling 3D
------------------------

[](#when-to-use-morphling-3d)

Morphling 3D is best suited for:

- Enterprise applications
- ERP systems
- Financial systems with approval workflows
- Systems with complex business rules
- Multi-team development environments

It may be unnecessary for small CRUD-based projects.

---

Links
-----

[](#links)

- GitHub:
- Documentation:
- Issues:

---

Contribution
------------

[](#contribution)

Contributions are welcome. Please open a Pull Request to the `main` branch.

---

License
-------

[](#license)

MIT License

---

Created by **Indra Ranuh** &amp; **Morphling Coding**

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance55

Moderate activity, may be stable

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/534dfdfdbeced802a31cdeae5307ef34b997bf625b11664b0e110650ca093212?d=identicon)[morphling-dev](/maintainers/morphling-dev)

---

Top Contributors

[![indraranuh-dev](https://avatars.githubusercontent.com/u/61109346?v=4)](https://github.com/indraranuh-dev "indraranuh-dev (13 commits)")

### Embed Badge

![Health badge](/badges/morphling-dev-3d/health.svg)

```
[![Health](https://phpackages.com/badges/morphling-dev-3d/health.svg)](https://phpackages.com/packages/morphling-dev-3d)
```

###  Alternatives

[pixelopen/cloudflare-turnstile-bundle

A simple package to help integrate Cloudflare Turnstile on Symfony.

35230.3k3](/packages/pixelopen-cloudflare-turnstile-bundle)[laravel-frontend-presets/paper

Laravel 10.x Front-end preset for paper dashboard

5018.2k](/packages/laravel-frontend-presets-paper)

PHPackages © 2026

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