Skip to content
Ray Fung edited this page Feb 16, 2026 · 4 revisions

Razy Framework

A modular PHP framework built for manageable development environments. Multi-site, distributor-based architecture with high performance and flexibility.

PHP 8.2+ PSR-4 / PSR-12 238+ Tests 82%+ Coverage MIT LicenseInstallation GitHub

Features

📦

Modular Architecture

Reusable modules with controllers, views, plugins, and APIs. Vendor/package namespace structure with semantic versioning.

🌐

Multi-Site Distribution

Run multiple sites from one codebase. Distributors manage domains, modules, and configurations independently.

🔌

Plugin System

Extend Template, Collection, Statement, and FlowManager with custom plugins. Shared plugin trait across subsystems.

🗄️

Database Abstraction

Multi-driver support (MySQL, SQLite, MSSQL) with fluent Statement builder and Simple Syntax for shorthand SQL.

🎨

Template Engine

High-performance templating with variable tags, modifiers, function tags, and advanced block types (WRAPPER, RECURSION).

📡

Event System

Inter-module communication via EventEmitter pattern. Fire events, listen across modules, collect responses.

🔗

Cross-Module API

Provider/Consumer pattern for module-to-module integration. Handshake-based access control.

CLI & PHAR

Full CLI tooling via Razy.phar. Interactive shell, module validation, GitHub installer, and more.

🧪

Testing Suite

PHPUnit 10.5 with 238+ test cases. PSR-12 linting with PHP CS Fixer. Enterprise-grade quality.

Quick Start

# Install via Composer
composer require rayfunghk/razy

# Build Razy environment
php Razy.phar build

# Initialize a new distributor
php Razy.phar init dist mysite

# Generate .htaccess rewrite rules
php Razy.phar rewrite mysite

# Run interactive shell
php Razy.phar runapp mysite

Architecture Overview

Bootstrap→Application→Domain→Distributor→Modules→Routing

The framework follows a pipeline from bootstrap to route execution. Each distributor manages its own set of modules, which are loaded in dependency order and go through a well-defined lifecycle.

Architecture

Roadmap to v1.0

Feature Status
GitHub Module Installer Done
Simplified Application Flow Done
App Container CLI (runapp) Done
Revamped Action & Validate Done
Cache System Planned
Thread System Planned
Table/Column Class Revamp Planned
Cross-Distributor Communication Planned

[[Installation| Next → Installation ]]

Clone this wiki locally