PHPackages                             amroboney/repository-generator - 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. amroboney/repository-generator

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

amroboney/repository-generator
==============================

A feature-rich Laravel package to simplify and streamline the process of generating repository files using the repository pattern, promoting clean architecture and maintainable code.

v1.0.0(12mo ago)2129PHPPHP ^8.1

Since May 12Pushed 12mo ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (2)Used By (0)

Laravel Repository Generator
============================

[](#laravel-repository-generator)

A **Laravel** package designed to streamline the implementation of the **repository pattern** in your projects. This tool generates a complete repository setup, including repository classes, interfaces, and service classes, helping developers maintain clean, organized, and decoupled codebases. This package is ideal for teams and individuals following **Clean Architecture** and **Domain-Driven Design (DDD)** principles, enabling faster scaffolding of repositories and services for Laravel applications.

---

📦 Installation
--------------

[](#-installation)

You can install the package via Composer:

```
composer require amroboney/repository-generator
```

If the package is not on Packagist and hosted on GitHub, add this to your Laravel app’s composer.json:

```
"repositories": [
  {
    "type": "vcs",
    "url": "https://github.com/amroboney/repository-generator"
  }
]
```

Then install it with:

```
composer require amroboney/repository-generator:dev-main
```

⚙️ Usage
--------

[](#️-usage)

Generate a repository, interface, and service using the artisan command:

```
php artisan make:repository ModelName
```

This will generate the following files automatically:

```
app/
├── Repositories
│    └── Interfaces/
│    │   └── ModelNameRepositoryInterface.php
│    └── Repositories/
│       └── ModelNameRepository.php
└── Services/
  └── ModelNameService.php
```

You only need to replace `ModelName` with the relevant name for your feature or entity (e.g., `User`).

🌟 Features
----------

[](#-features)

- **Automated File Generation**: Instantly creates repository and service structures, saving significant development time.
- **Repository Pattern Support**: Promotes clear separation of concerns between business logic and database operations in Laravel.
- **Configurable Structure**: Adheres to Clean Architecture and Domain-Driven Design principles.
- **PHP 8.1+ Compatibility**: Leverages modern PHP syntax and features for robust development.

📂 File Structure Example
------------------------

[](#-file-structure-example)

If you run the command `php artisan make:repository User`, this is how your file structure will look:

```
app/
├── Repositories/
│   ├── Interfaces/
│   │   └── UserRepositoryInterface.php
│   └── Implementations/
│       └── UserRepository.php
└── Services/
    └── UserService.php

```

- **UserRepositoryInterface.php**: Defines the contract for the repository.
- **UserRepository.php**: Implements the repository logic for interacting with the database.
- **UserService.php**: Contains business logic and operations for the `User` entity.

🤝 Contributing
--------------

[](#-contributing)

Contributions are welcome! If you'd like to contribute to this package, feel free to fork the repository and submit a pull request. Please ensure that your code adheres to PSR standards and includes thorough testing.

🧑‍💻 Author
----------

[](#‍-author)

**Amro Boney**📧 📍 Riyadh, Saudi Arabia

License Information
-------------------

[](#license-information)

This package is licensed under the **MIT License**, which means:

### ✅ Permissions:

[](#-permissions)

- **Commercial Use**You can use this package in commercial applications and products.
- **Modification**You are allowed to modify the source code for your own use.
- **Distribution**You can freely share, distribute, or resell the package (as-is or modified).
- **Private Use**You can use this package in private or internal projects without any restrictions.

### ❌ Limitations:

[](#-limitations)

- **No Liability**The author is not responsible for any damages resulting from the use of this software.
- **No Warranty**The software is provided "as is," without any warranty of any kind (express or implied), including but not limited to:
    - Warranties of merchantability.
    - Fitness for a particular purpose.
    - Non-infringement.

For full license details, please refer to the [LICENSE](LICENSE) file included in this repository.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance52

Moderate activity, may be stable

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Unknown

Total

1

Last Release

361d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a517f5a540da7b64b33959dc35e32aaaa555a091922c439dc6bd0debfefb454?d=identicon)[amroboney](/maintainers/amroboney)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/amroboney-repository-generator/health.svg)

```
[![Health](https://phpackages.com/badges/amroboney-repository-generator/health.svg)](https://phpackages.com/packages/amroboney-repository-generator)
```

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M683](/packages/barryvdh-laravel-ide-helper)[orchestra/canvas

Code Generators for Laravel Applications and Packages

21017.2M157](/packages/orchestra-canvas)[illuminate/pipeline

The Illuminate Pipeline package.

9446.6M210](/packages/illuminate-pipeline)[illuminate/pagination

The Illuminate Pagination package.

10532.5M857](/packages/illuminate-pagination)[spatie/laravel-pjax

A pjax middleware for Laravel 5

513371.8k11](/packages/spatie-laravel-pjax)[spatie/laravel-mix-preload

Add preload and prefetch links based your Mix manifest

169176.0k2](/packages/spatie-laravel-mix-preload)

PHPackages © 2026

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