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
- Getting Started - Installation, configuration, and first steps
- Core Concepts - Architecture fundamentals
- Architectural Modes - Bus Mode vs Direct Mode
- Plugin System - Available plugins and usage
- Architecture Layers - Application, Domain, Infrastructure, Presentation
- Testing - Unit, integration, and acceptance testing
- Middleware & Security - Authentication, RBAC, session management
- Code Quality - Coding standards, static analysis
- Example Application - Demo library management system
- Development - Contributing and documentation
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.