Search by

The tiny micro-kernel of PhrameCMS — PSR-11 DI container, topological module loader, PSR-14 event bus, and AI-first operation pipeline.

Package info

github.com/PhrameCMS/core

pkg:composer/phramecms/core

Statistics

Installs: 69

Dependents: 11

Suggesters: 0

Stars: 0

Open Issues: 0

v0.1.0 2026-12-04 21:00 UTC

This package is auto-updated.

Last update: 2026-12-04 21:00:15 UTC


README

The tiny micro-kernel of PhrameCMS — an AI-first, API-native, modular PHP 8.5 CMS.

phramecms/core intentionally contains zero CMS logic: no database layer, no HTTP routing, no users, no configuration storage, and no entity/field system. Everything beyond kernel orchestration is provided by composable modules.

Responsibilities

  • PSR-11 Dependency Injection Container with Service Tags: Supports singletons, factories, aliases, and tagged services so modules can register field types, routes, operations, CLI commands, and event listeners without tight coupling.
  • Topological Module Loader & Lifecycle: Resolves module dependency graphs deterministically, rejects missing or circular dependencies, and runs clean two-phase booting (register() -> boot()).
  • PSR-14 Event & Alter Bus: Priority-ordered typed events enabling Drupal-style alterability without global procedural hooks.
  • AI-First Operation Pipeline & Contracts:
    • OperationInterface with self-describing JSON Schema for inputs/outputs, required permissions, mutatesState, and supportsDryRun.
    • Centralized OperationBus enforcing Actor/Policy authorization, strict JSON Schema validation, optional idempotency_key deduplication, dry-run previewing, and immutable audit emission.
  • Kernel Contracts: ActorInterface (human vs agent), PolicyEnforcerInterface, AuditLoggerInterface, SchemaValidatorInterface, and PSR-20 \Psr\Clock\ClockInterface (SystemClock).

Explicitly Out of Scope

  • Database connections or SQL queries (see phramecms/database)
  • Configuration persistence or import/export (see phramecms/config)
  • HTTP request/response handling or routing (see phramecms/routing)
  • Entities, fields, users, REST API, MCP, or CLI (each is its own module)

Dependencies

  • PHP ^8.5
  • psr/clock, psr/container, psr/event-dispatcher, psr/log

Ecosystem

Part of the PhrameCMS multi-repo suite. See PhrameCMS/cms for the starter distribution, architecture docs, and cross-module integration tests.