Download the PHP package cynchro/modux without Composer
On this page you can find all versions of the php package cynchro/modux. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download cynchro/modux
More information about cynchro/modux
Files in cynchro/modux
Package modux
Short Description A lightweight, dependency-injection-first PHP framework organized as a modular monolith.
License MIT
Informations about the package modux
Modux
A production-ready PHP modular monolith framework. Each business domain lives in its own self-contained module. No facades, no magic statics, no hidden globals — every dependency is explicit and injected.
Best for: teams that want full control over their codebase, clear request lifecycles, and testable code without learning a large framework's conventions.
At a glance
- Zero magic — no facades, no service locator calls in business code
- PSR-11 container with reflection-based autowiring and
makeWithfor parameterized resolution - PSR-3 structured logger — JSON to file or stderr, falls back silently
- Middleware pipeline — composable per-route and per-group, immutable via clone
- FormRequest — validates on construction, throws
ValidationException(422) automatically - Exception hierarchy — typed exceptions map directly to HTTP status codes
- JWT + refresh token rotation — opaque refresh tokens, per-user revocation
- Rate limiting —
CacheInterface-backed (APCu in production, Array in tests), graceful no-op - RBAC —
PermissionMiddlewarechecksroles_permisosat runtime via parameterized middleware - Event system — synchronous
EventDispatcherwithlisten()/dispatch() - Multi-tenancy — row-level isolation via
TenantMiddleware+ JWTtenant_idclaim (optional) - Versioned migrations — tracked with batch numbers, supports
rollbackandfresh - 152 unit tests, PHPStan level 6 clean, PHPCS PSR-12
Requirements
- PHP 8.2+
- MySQL 8.0+ (or any PDO-compatible database)
- Composer
Installation
Create a new project from the Packagist skeleton (recommended):
To contribute to the framework itself instead, clone the repo:
git clone https://github.com/cynchro/modux.git && cd modux && composer install
Quick start
Project structure
Documentación
El manual completo vive en docs/. Esta página es solo el quickstart;
cada tema en profundidad está en su propio archivo:
- CLI —
php modux—make:module,make:migration,migrate,routes. - Módulos, ruteo y arranque — secuencia de boot, crear un módulo (Repository/Service/Controller/ServiceProvider), grupos de rutas.
- HTTP — Request API, Response API, validación de requests, excepciones → HTTP, middleware.
- Auth & multi-tenancy — login/refresh/logout, impersonación, API keys, firmas de webhooks, contenedor DI, aislamiento por tenant.
- Infraestructura — config, logger, paginación, migraciones, testing y quality gate.
- Plataforma — eventos, RBAC, entitlements, metering/cuotas, transacciones, cola de jobs, health check, variables de entorno.
- Módulos opcionales — IA (LLM + RAG) y Billing (Stripe / Mercado Pago).
Performance
Measured on the production image (PHP 8.2 + Apache/mod_php, MySQL 8.0) with ApacheBench at concurrency 50:
| Endpoint | What it measures | Req/s | p50 | p95 | p99 |
|---|---|---|---|---|---|
GET / |
Framework overhead (routing + DI + middleware pipeline) | ~3,520 | 13 ms | 21 ms | 27 ms |
GET /health |
Framework + one SELECT 1 round-trip |
~1,910 | 25 ms | 38 ms | 45 ms |
About 0.28 ms of framework overhead per request, zero failed requests under load. Numbers are indicative (single containerized host) and vary with hardware and workload.
License
MIT
Contact
[email protected] · cynchrolabs.com.ar
Buy me a coffee?
If Modux saved you time, consider a donation — it helps keep the project going.
⭐ If you like this project, give it a star!
All versions of modux with dependencies
firebase/php-jwt Version ^7.0
phpmailer/phpmailer Version ^6.9
psr/container Version ^2.0
psr/log Version ^3.0
vlucas/phpdotenv Version ^5.6