mjd-core is a minimalist, industrial-grade PHP framework designed for developers who value transparency, speed, and clean code. Built with a custom Dependency Injection container and a reflection-based Routing Engine, it eliminates framework bloat while providing the essential tools for modern web applications.
- ⚡ Reflection-Based DI: Automatic "Auto-Wiring" of controller dependencies.
- 🛣️ Grouped Routing: Support for route prefixes, middleware pipelines, and API grouping.
- 🏗️ Active Record ORM: Fluent database interactions and schema management.
- 🛠️ MJDC Binary: A dedicated CLI assistant for scaffolding (Controllers, Models, Migrations).
- 🎨 Twig Integration: Native support for Twig templates with custom session/auth extensions.
- 💻 Interactive Console: Built-in API testing suite directly in the dashboard.
The framework follows a strict Request-Response pipeline:
- Entry Point: All traffic is funneled through
public/index.php. - Bootstrapping: Environment variables and Sessions are initialized.
- Routing: The
Routerresolves the URI and injects dependencies into the target Controller. - Middleware: Requests pass through security layers (Auth, CSRF, etc.).
- Output: The Controller returns a
View(HTML) or aJSONstream.
├── app/ # Application Logic
│ ├── Controllers/ # Request Handlers
│ ├── Models/ # Database Entities
│ └── Middleware/ # Security Layers
├── bootstrap/ # Framework Boot Logic
├── public/ # Web Root (index.php, Assets)
├── routes/ # Web & API Route Definitions
├── src/ # MJD-Core Engine (Framework Source)
├── storage/ # Logs, Cache, and File Uploads
└── views/ # Twig Templates
git clone https://github.com/mjclavillas/mjd-core.git
cd mjd-core
composer installcp .env.example .envphp mjdc migrate
php mjdc db:seedphp mjdc serve| Command | Description |
|---|---|
serve [host] [port] |
Boots the PHP development server : Default localhost 8000 |
make:controller |
Generates a new Controller in app/Controllers |
make:model |
Creates a Model and a Migration file |
migrate |
Executes pending migrations |
db:seed |
Populates tables with test data |
This project is open-sourced software licensed under the MIT License.