PHPackages                             glugox/orchestrator - 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. glugox/orchestrator

ActiveLibrary[Framework](/categories/framework)

glugox/orchestrator
===================

A Laravel framework to build modular applications.

v1.0.0(6mo ago)020[5 PRs](https://github.com/glugox/orchestrator/pulls)MITPHPPHP &gt;=8.2

Since Oct 24Pushed 6mo agoCompare

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

READMEChangelogDependencies (15)Versions (20)Used By (0)

[![logo.svg](https://raw.githubusercontent.com/glugox/cloud/main/public/logo.svg)](https://raw.githubusercontent.com/glugox/cloud/main/public/logo.svg) Orchestrator
====================================================================================================================================================================

[](#-orchestrator)

Overview
--------

[](#overview)

`glugox/orchestrator` is the **runtime module manager** for Laravel applications that embrace the Glugox modular ecosystem. The package discovers available modules, registers them with the framework, and gives developers tooling to enable, disable, and monitor every module that powers their application.

Where [`glugox/module`](https://github.com/glugox/module) defines the contracts a module must fulfil and [`glugox/module-generator`](https://github.com/glugox/module-generator) scaffolds new modules, orchestrator is the piece that connects everything at runtime inside the main Laravel app.

---

Architecture at a Glance
------------------------

[](#architecture-at-a-glance)

```
┌────────────────────┐         ┌────────────────────┐         ┌────────────────────┐
│  Main Laravel App  │────┬──▶ │  glugox/orchestr.  │ ───────▶│    Module Runtime  │
└────────────────────┘    │    └────────────────────┘         │ (Routes, Migrations│
                          │                                   │  Providers, etc.)  │
                          │    ┌────────────────────┐         └────────────────────┘
                          └──▶ │  glugox/module     │ ◀────┐
                               └────────────────────┘      │
                                                           │
                               ┌────────────────────┐      │
                               │ glugox/module-gen. │ ─────┘
                               └────────────────────┘

```

- **Main Laravel App** – hosts the modules and exposes the artisan commands and APIs to administrators.
- **glugox/orchestrator** – discovers, validates, enables, disables, and boots modules.
- **glugox/module** – provides the base `ModuleContract`, lifecycle hooks, and helper traits that orchestrator consumes.
- **glugox/module-generator** – produces modules that follow the conventions required by both orchestrator and `glugox/module`.

---

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

[](#installation)

```
composer require glugox/orchestrator
```

Laravel auto-discovers the service provider. If you want explicit control, register it in `config/app.php`:

```
'providers' => [
    // ...
    Glugox\Orchestrator\OrchestratorServiceProvider::class,
],
```

Publish the configuration file to customise module directories and discovery options:

```
php artisan vendor:publish --provider="Glugox\Orchestrator\OrchestratorServiceProvider"
```

---

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

[](#configuration)

The published `config/orchestrator.php` file controls how modules are located and managed.

Key settings include:

- **`paths.modules`** – directories that should be scanned for modules (defaults to `base_path('modules')`).
- **`manifest`** – file name that stores cached discovery information.
- **`autoload`** – toggles whether discovered modules should be automatically registered at boot.

Configuration values are consumed by `Support\OrchestratorConfig`, keeping discovery behaviour consistent across commands and runtime services.

---

Module Lifecycle
----------------

[](#module-lifecycle)

1. **Discovery** – `Support\ModuleDiscovery` scans configured directories and composer metadata for modules. Manifest files speed up repeat scans.
2. **Registration** – Discovered modules are registered with the Laravel container via `OrchestratorServiceProvider`.
3. **Boot** – When a module is enabled, orchestrator resolves its `ModuleServiceProvider` (defined by `glugox/module`) and loads routes, migrations, translations, and assets.
4. **Management** – The lifecycle can be controlled via artisan commands or the `Services\ModuleManager` API.

Modules generated by `glugox/module-generator` already implement the contracts from `glugox/module`, so they are immediately compatible with orchestrator.

---

Command Reference
-----------------

[](#command-reference)

- `php artisan orchestrator:modules:list` – show every discovered module with its current status.
- `php artisan orchestrator:modules:enable {module}` – enable a module and boot its service provider.
- `php artisan orchestrator:modules:disable {module}` – disable a module while keeping it installed.
- `php artisan orchestrator:modules:reload` – flush the manifest cache and rediscover modules.

Commands delegate to `Services\ModuleManager` and `Services\ModuleRegistry`, which encapsulate runtime state and synchronisation logic.

---

Using Orchestrator in Your Application
--------------------------------------

[](#using-orchestrator-in-your-application)

### Bootstrapping Modules During Application Start

[](#bootstrapping-modules-during-application-start)

The service provider hooks into Laravel's boot sequence. When the application starts, orchestrator:

1. Reads the manifest to determine available modules.
2. Resolves each module's metadata via `ModuleRegistry`.
3. For enabled modules, registers the corresponding `ModuleServiceProvider` from the module package.
4. Invokes lifecycle hooks such as `bootRoutes`, `bootMigrations`, and `bootAssets` that are declared by the module through the interfaces in `glugox/module`.

Because the work is performed in a service provider, modules participate in the Laravel pipeline like any other package, benefiting from deferred service loading, configuration merging, and event listeners.

### Coordinating with glugox/module

[](#coordinating-with-glugoxmodule)

`glugox/module` supplies the contracts and base implementations that orchestrator relies on. When a module implements the `ModuleContract`, orchestrator can:

- Inspect the module identifier, version, and dependencies.
- Resolve the module's custom service provider class.
- Invoke optional capabilities such as route, migration, or asset loading.

If a module declares dependencies, orchestrator ensures they are enabled first, preventing runtime mismatches.

### Integrating Modules Generated by glugox/module-generator

[](#integrating-modules-generated-by-glugoxmodule-generator)

`glugox/module-generator` scaffolds modules that already follow the directory structure and class naming conventions required by orchestrator. Typical workflow:

1. Generate a module:

    ```
    php artisan module:make Inventory
    ```
2. The generator creates the module skeleton, including the service provider and manifest expected by orchestrator.
3. Run `php artisan orchestrator:modules:reload` to discover the new module.
4. Enable it with `php artisan orchestrator:modules:enable company/inventory` and the module becomes part of the application immediately.

---

Programmatic Usage
------------------

[](#programmatic-usage)

```
use Glugox\Orchestrator\Services\ModuleManager;

$manager = app(ModuleManager::class);

// Retrieve all modules
$modules = $manager->all();

// Enable a module
$manager->enable('company/billing');

// Disable a module
$manager->disable('company/crm');
```

`ModuleManager` talks to `ModuleRegistry` to keep module status in sync with the manifest file, and raises domain-specific exceptions if modules cannot be located or have unmet dependencies.

---

Project Structure
-----------------

[](#project-structure)

```
src/
├── Commands/
│   ├── DisableModuleCommand.php
│   ├── EnableModuleCommand.php
│   ├── ListModulesCommand.php
│   └── ReloadModulesCommand.php
├── Services/
│   ├── ModuleManager.php
│   └── ModuleRegistry.php
├── Support/
│   ├── ModuleDiscovery.php
│   └── OrchestratorConfig.php
└── OrchestratorServiceProvider.php

```

---

Roadmap Ideas
-------------

[](#roadmap-ideas)

- Optional dashboard UI for module management.
- Declarative dependency resolution between modules.
- Remote module registries with signed manifests.
- Lifecycle hooks for pre/post enable and disable events.

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance67

Regular maintenance activity

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity56

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

197d ago

### Community

Maintainers

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

---

Top Contributors

[![glugox](https://avatars.githubusercontent.com/u/13313019?v=4)](https://github.com/glugox "glugox (55 commits)")

---

Tags

frameworklaravelmodulesorchestratorglugox

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/glugox-orchestrator/health.svg)

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

###  Alternatives

[hemp/presenter

Easy Model Presenters in Laravel

247592.6k1](/packages/hemp-presenter)[rahulalam31/laravel-abuse-ip

Block ip address of all spammer's around the world.

27431.5k](/packages/rahulalam31-laravel-abuse-ip)

PHPackages © 2026

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