Search by

liberusoftware / module-cms-hello

curtisdelicata

A trivial proof-of-concept Liberu CMS module that exercises the whole pipeline: descriptor, isolation, contract, service, event, route, migration, config, and tests.

Package info

github.com/liberusoftware/module-cms-hello

Type:liberu-module

pkg:composer/liberusoftware/module-cms-hello

Statistics

Installs: 45

Dependents: 1

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.1 2026-11-14 13:56 UTC

README

Repository

Source, issues, and release history: https://github.com/liberusoftware/module-cms-hello

Composer package: https://packagist.org/packages/liberusoftware/module-cms-hello

A trivial proof-of-concept module. It exists to exercise the entire module pipeline end to end and to be the module CI enables, disables, and re-enables.

Non-foundational by design: the "disable any module and the app still boots" guarantee is verified against it.

What it demonstrates (the full §5 module contract)

  • Descriptor — HelloModule (key hello).
  • Self-gating provider — HelloServiceProvider extends ModuleServiceProvider.
  • Own contract + service — GreeterInterface bound to Greeter.
  • Cross-module event — HelloGreeted dispatched over the EventBus.
  • Versioned API route — GET /api/v1/hello/{name?}.
  • Migration — hello_greetings.
  • Config — config/hello.php (hello.greeting), publishable + merged.
  • Tests — unit + feature, including enable/disable.

Install

composer update liberusoftware/cms-hello
php artisan migrate

Try it

GET /api/v1/hello/ada  ->  { "module": "hello", "message": "Hello, ada!" }

Config keys

Key Default Purpose
hello.greeting Hello, :name! Template; :name is substituted.

Events

  • Emits: Liberu\Cms\Hello\Events\HelloGreeted (hello.greeted) — on every greeting.
  • Listens: none.

Public contracts

  • Liberu\Cms\Hello\Contracts\GreeterInterface — resolve to produce greetings.

Disable

app(\Liberu\Cms\Contracts\Module\ModuleManagerInterface::class)->disable('hello');

The route 404s and the provider goes inert; the rest of the app is unaffected.