PHPackages                             andreyizmaylov/base-domain-structure - 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. andreyizmaylov/base-domain-structure

ActiveLibrary[Framework](/categories/framework)

andreyizmaylov/base-domain-structure
====================================

Base domain structure for Laravel applications

1.2.4(4mo ago)113↓85.7%MITPHPPHP ^8.2

Since Feb 22Pushed 4mo agoCompare

[ Source](https://github.com/andrewizmaylov/ddd-structure)[ Packagist](https://packagist.org/packages/andreyizmaylov/base-domain-structure)[ RSS](/packages/andreyizmaylov-base-domain-structure/feed)WikiDiscussions main Synced 2d ago

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

Domain Structure for Laravel Project
====================================

[](#domain-structure-for-laravel-project)

A template scaffold that implements Domain-Driven Design principles for Laravel, providing a clean, opinionated structure so you can focus on what matters: your business domain.

### 🚀 Installation

[](#-installation)

```
composer require andreyizmaylov/base-domain-structure

```

### 🎯 Publish the configuration: \*

[](#-publish-the-configuration-)

```
php artisan vendor:publish --tag=base-domain-structure-config

```

### 🔄 Directory Structure Visualization

[](#-directory-structure-visualization)

Here's a more detailed tree view of your configurable structure:

```
src/Balance/
├── ApplicationLayer/
│   └── UseCases/
│       └── UpdateBalanceUseCase.php
├── DomainLayer/
│   ├── Entities/
│   ├── Repository/
│   │   ├── AccountRepositoryInterface.php
│   │   └── BalanceTransactionRepositoryInterface.php
│   ├── Services/
│   │   ├── BalanceUpdateService.php
│   │   └── CreateTransactionsService.php
│   ├── Storage/
│   │   ├── AccountStorageInterface.php
│   │   └── BalanceTransactionStorageInterface.php
│   └── ValueObjects/
├── InfrastructureLayer/
│   ├── Repository/
│   │   ├── AccountRepository.php
│   │   └── BalanceTransactionRepository.php
│   └── Storage/
│       ├── AccountStorage.php
│       └── BalanceTransactionStorage.php
└── PresentationLayer/
    └── HTTP/V1/
        ├── Controllers/
        │   └── UpdateBalanceController.php
        ├── Requests/
        │   └── UpdateBalanceRequest.php
        ├── Responders/
        │   └── BalanceTransactionResponder.php
        └── routes.php

```

After publishing, you can modify default domain structure:

```
    'structure' => [
        'ApplicationLayer',
        'DomainLayer' => [
            'Entities',
            'ValueObjects',
            'Repository',
            'Storage'
        ],
        'InfrastructureLayer' => [
            'Repository',
            'Storage',
        ],
        'PresentationLayer' => [
            'HTTP' => [
                'V1' => [
                    'Controllers',
                    'Requests',
                    'Responders',
                    'routes.php'
                ]
            ]
        ],
    ],
```

### 📁 Customize Your Source Folder

[](#-customize-your-source-folder)

By default, domains are created in `app/src/`. You can change this via your `.env` file:

```
BASE_DOMAIN_SRC_DIR=Domain

```

### Commands

[](#commands)

Create Context structured folder

```
php artisan make:context Balance

```

Create UseCase structured folder

```
php artisan make:use-case UpdateBalance Balance

```

### 🙏 Acknowledgements

[](#-acknowledgements)

Mehul Koradiya - For his foundational work on [laravel-enterprise-structure](https://github.com/mehulkoradiya/laravel-enterprise-structure), which inspired this package ❤️.

### 📄 License

[](#-license)

The MIT License (MIT). See LICENSE file for details.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance76

Regular maintenance activity

Popularity7

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity51

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

Total

5

Last Release

130d ago

PHP version history (2 changes)1.1.6PHP ^8.1

1.2.1PHP ^8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/24591347?v=4)[Andrew Izmaylov](/maintainers/andrewizmaylov)[@andrewizmaylov](https://github.com/andrewizmaylov)

---

Top Contributors

[![andrewizmaylov](https://avatars.githubusercontent.com/u/24591347?v=4)](https://github.com/andrewizmaylov "andrewizmaylov (17 commits)")

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/andreyizmaylov-base-domain-structure/health.svg)

```
[![Health](https://phpackages.com/badges/andreyizmaylov-base-domain-structure/health.svg)](https://phpackages.com/packages/andreyizmaylov-base-domain-structure)
```

###  Alternatives

[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k39.6M299](/packages/laravel-dusk)[nineinchnick/edatatables

Grid widget for the Yii Framework, wrapper for the DataTables jQuery plugin

173.2k](/packages/nineinchnick-edatatables)[link-cloud/fast-hyperf

LinkCloud Fast Hyperf

241.2k1](/packages/link-cloud-fast-hyperf)

PHPackages © 2026

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