PHPackages                             hassanelzarkawy/origin - 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. hassanelzarkawy/origin

ActiveLibrary[Framework](/categories/framework)

hassanelzarkawy/origin
======================

Modular architecture for Laravel applications

0.0.1(1mo ago)09MITPHPPHP ^8.2CI failing

Since May 31Pushed 1mo agoCompare

[ Source](https://github.com/HassanElZarkawy/origin)[ Packagist](https://packagist.org/packages/hassanelzarkawy/origin)[ RSS](/packages/hassanelzarkawy-origin/feed)WikiDiscussions main Synced 1w ago

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

Origin — Modular Architecture for Laravel
=========================================

[](#origin--modular-architecture-for-laravel)

Origin is a Laravel package that brings modular architecture to your application. It provides convention-based auto-discovery of routes, migrations, views, translations, config, commands, and factories — with zero boilerplate per module.

Requirements
------------

[](#requirements)

- PHP 8.2+
- Laravel 11.x, 12.x, or 13.x

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

[](#installation)

```
composer require hassanelzarkawy/origin
```

Laravel's package auto-discovery registers the service provider automatically. No manual configuration needed.

Publish the config file:

```
php artisan vendor:publish --tag=modular-config
```

Quick Start
-----------

[](#quick-start)

```
# Create your first module
php artisan make:module Blog

# Install module dependencies (each module has its own composer.json)
composer update

# Generate module components
php artisan make:module:model Blog Post --migration
php artisan make:module:controller Blog PostController
php artisan make:module:seeder Blog PostSeeder

# Run module migrations
php artisan module:migrate Blog

# Check module status
php artisan module:status
```

Documentation
-------------

[](#documentation)

PageDescription[Configuration](docs/configuration.md)All config options and what they do[Creating Modules](docs/creating-modules.md)Module structure, make commands, and conventions[Auto-Discovery](docs/auto-discovery.md)How routes, migrations, views, etc. are wired automatically[Console Commands](docs/console-commands.md)Complete reference for all artisan commands[Module Load Ordering](docs/load-ordering.md)Priority and dependency-based module ordering[Enabling &amp; Disabling Modules](docs/enable-disable.md)Toggle modules on and off[Publishing Module Assets](docs/publishing.md)Publish views, config, and translations[Removing Modules](docs/removing-modules.md)Clean removal of modules[Facade &amp; API Reference](docs/api-reference.md)Programmatic usage via the Modular facade[Testing](docs/testing.md)Testing your modulesHow It Works
------------

[](#how-it-works)

Origin uses [wikimedia/composer-merge-plugin](https://github.com/wikimedia/composer-merge-plugin) to integrate modules with Composer. Each module gets its own `composer.json`, and the merge plugin automatically includes `modules/*/composer.json` when you run `composer update`.

On every request, Laravel boots the `Origin\ModularServiceProvider`. This provider:

1. Scans the `modules/` directory for module directories
2. Filters out any disabled modules
3. Resolves the correct load order (respecting priority and dependencies)
4. Registers each module's `ServiceProvider` with Laravel

Each module's `ServiceProvider` extends `Origin\ModuleServiceProvider`, which auto-discovers and registers:

- **Routes** — `routes/web.php` and `routes/api.php`
- **Migrations** — `database/migrations/`
- **Views** — `resources/views/` (namespaced as `{module}::`)
- **Translations** — `resources/lang/`
- **Config** — `config/*.php`
- **Commands** — `Commands/`
- **Factories** — `database/factories/`

Everything is convention-based. If the file or directory exists, it's registered. If it doesn't, it's silently skipped.

Module Directory Structure
--------------------------

[](#module-directory-structure)

```
modules/Blog/
├── Commands/                    # Auto-registered artisan commands
├── Controllers/                 # Module controllers
├── Models/                      # Eloquent models
├── Providers/
│   └── BlogServiceProvider.php  # Extends Origin\ModuleServiceProvider
├── routes/
│   ├── web.php                  # Web routes
│   └── api.php                  # API routes
├── database/
│   ├── migrations/              # Module migrations
│   ├── seeders/                 # Module seeders
│   └── factories/               # Model factories
├── resources/
│   ├── views/                   # Blade views (use as blog::*)
│   └── lang/                    # Translation files
├── config/                      # Module config files
└── composer.json                # Module dependencies (merged by composer-merge-plugin)

```

License
-------

[](#license)

MIT

###  Health Score

35

—

LowBetter than 77% of packages

Maintenance89

Actively maintained with recent releases

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

54d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8324534bbbd22916cc050f64bdc0e9c6616a7fc1da8354e43f00c409ce584228?d=identicon)[HassanElZarkawy](/maintainers/HassanElZarkawy)

---

Top Contributors

[![HassanElZarkawy](https://avatars.githubusercontent.com/u/12422569?v=4)](https://github.com/HassanElZarkawy "HassanElZarkawy (3 commits)")

---

Tags

laravelarchitecturemodulesmodular

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/hassanelzarkawy-origin/health.svg)

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

###  Alternatives

[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M246](/packages/laravel-ai)[laravel/sail

Docker files for running a basic Laravel application.

1.9k205.7M1.3k](/packages/laravel-sail)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77922.3M186](/packages/laravel-mcp)[laravel/folio

Page based routing for Laravel.

603583.7k34](/packages/laravel-folio)[illuminate/queue

The Illuminate Queue package.

20432.6M1.7k](/packages/illuminate-queue)[erag/laravel-lang-sync-inertia

A powerful Laravel package for syncing and managing language translations across backend and Inertia.js (Vue/React/Svelte) frontends, offering effortless localization, auto-sync features, and smooth multi-language support for modern Laravel applications.

4925.3k](/packages/erag-laravel-lang-sync-inertia)

PHPackages © 2026

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