Skip to content

Phexium Framework

A Clean Architecture PHP framework combining Hexagonal Architecture, CQRS, and Domain-Driven Design patterns.

Core Principles

  • Clean Architecture - Strict layer separation with dependencies pointing inward
  • CQRS - Separate write (Commands) and read (Queries) operations
  • Port & Adapter - Plugin system for extensible framework capabilities
  • Event-Driven - Domain events via EventBus for loose coupling

Documentation Sections

Key Features

Copy-Based Distribution: Framework code lives in src/, not hidden in vendor/. Full transparency, selective updates, and no vendor lock-in.

Dual-Mode Architecture: Bus Mode (CQRS) for complex business logic, Direct Mode for simpler operations. Both coexist in the same application.

Multiple Databases: InMemory (testing), SQLite, MySQL, and PostgreSQL implementations available for all repositories.

Quick Start

git clone https://gitlab.com/phexium/framework.git
cd phexium
task composer:install
task dev:environment:start

Access the demo application at http://localhost:8080.

See Installation for complete setup instructions.