PHPackages                             happenv-com/laravel-true-modular-health - 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. happenv-com/laravel-true-modular-health

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

happenv-com/laravel-true-modular-health
=======================================

Module-scoped health checks for laravel-true-modular: declare checks per module, aggregate runtime + architecture health via Spatie Laravel Health and module:doctor.

v1.0.0(1mo ago)0391↑750%MITPHP ^8.3

Since Jun 28Pushed 1mo agoCompare

[ Source](https://github.com/happenv-com/laravel-true-modular-health)[ Packagist](https://packagist.org/packages/happenv-com/laravel-true-modular-health)[ RSS](/packages/happenv-com-laravel-true-modular-health/feed)WikiDiscussions 1.x Synced 2w ago

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

Health for Laravel True Modular
===============================

[](#health-for-laravel-true-modular)

  ![Health for Laravel True Modular](https://camo.githubusercontent.com/f8ac2e7dbdbdb595297cf60f397a3963fac584a84595393f973c80648344efa9/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4865616c7468253230666f722532304c61726176656c253230547275652532304d6f64756c61722e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d68617070656e762d636f6d2532466c61726176656c2d747275652d6d6f64756c61722d6865616c7468267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d4d6f64756c652d73636f7065642b6865616c74682b636865636b732532432b616767726567617465642b776974682b6172636869746563747572652b646961676e6f7374696373266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)[![Latest Version on Packagist](https://camo.githubusercontent.com/c4a5463c6140ede9b066a6c90f70e7301d2d23236a795dfec8ff286274554c52/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f68617070656e762d636f6d2f6c61726176656c2d747275652d6d6f64756c61722d6865616c74682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/happenv-com/laravel-true-modular-health)[![Total Downloads](https://camo.githubusercontent.com/03ae501b2f592b73b8a07ec3d56cec244be6a1bb702c2bd1c129703cb0b91357/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f68617070656e762d636f6d2f6c61726176656c2d747275652d6d6f64756c61722d6865616c74682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/happenv-com/laravel-true-modular-health)

A companion to [laravel-true-modular](https://github.com/happenv-com/laravel-true-modular) that lets each module **declare its own health checks**, registers them into [Spatie Laravel Health](https://github.com/spatie/laravel-health), and adds a `module:doctor` command that aggregates **runtime** health (the module checks) with **architecture** health (dependency-cycle detection) in one report.

Why
---

[](#why)

The core package gives every module a persistent capability record (the module manifest). This package reads that manifest, so health checks live next to the module that owns them instead of in one central list:

```
$module
    ->hasRoutes()
    ->hasHealthChecks([
        InventoryLedgerCheck::class,
        ReservationIntegrityCheck::class,
    ]);
```

`InventoryLedgerCheck` is a plain Spatie `Check` (`Spatie\Health\Checks\Check`). The core stores only the class name; this package validates and instantiates it.

Install
-------

[](#install)

```
composer require happenv-com/laravel-true-modular-health
```

It auto-discovers. On boot it merges every module's declared checks into Spatie Health (preserving any checks you registered yourself), so your existing `health:check` command, scheduled run, and dashboard include them automatically.

`module:doctor`
---------------

[](#moduledoctor)

```
php artisan module:doctor                 # runtime + architecture
php artisan module:doctor --module=inventory   # runtime checks for one module (architecture still runs)
php artisan module:doctor --json          # machine-readable
```

The command exits non-zero when any check is `failed` or `crashed`, so it doubles as a CI gate. JSON output carries a stable envelope:

```
{
    "schema": { "name": "doctor", "version": 1 },
    "summary": { "ok": 2, "warning": 0, "failed": 1, "crashed": 0, "skipped": 0 },
    "modules": {
        "inventory": [
            { "check": "InventoryLedger", "status": "failed", "message": "..." }
        ],
        "architecture": [
            { "check": "Cycle", "status": "ok", "message": null }
        ]
    }
}
```

Architecture checks
-------------------

[](#architecture-checks)

`Cycle` (`Happenv\LaravelTrueModular\Health\Architecture\CycleCheck`) fails when the module dependency graph contains a circular dependency. It reuses the core's own topological sort, so it sees the same edges the framework uses to order providers.

License
-------

[](#license)

MIT.

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance90

Actively maintained with recent releases

Popularity18

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity48

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

2

Last Release

46d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/855788?v=4)[Bartłomiej Gajda](/maintainers/webard)[@webard](https://github.com/webard)

---

Top Contributors

[![webard](https://avatars.githubusercontent.com/u/855788?v=4)](https://github.com/webard "webard (8 commits)")

---

Tags

health-checklaravelmodularmodular-monolithlaravelhealthspatie healthmodular-monolith

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/happenv-com-laravel-true-modular-health/health.svg)

```
[![Health](https://phpackages.com/badges/happenv-com-laravel-true-modular-health/health.svg)](https://phpackages.com/packages/happenv-com-laravel-true-modular-health)
```

###  Alternatives

[encodia/laravel-health-env-vars

Custom check for Spatie's Laravel Health - Ensure every .env variable you need has been set

20174.5k](/packages/encodia-laravel-health-env-vars)

PHPackages © 2026

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