Core Components — Precision-Crafted Building Blocks

Each piece is lean, PSR-compliant, and completely decoupled, so you can snap together only what you need and still hit production-grade speed.

At the heart of MonkeysLegion lies a set of battle-tested components—routing, DI, events, and more—that thrive on their own yet interlock seamlessly. Written for PHP 8+, they compile to tight op-codes, expose predictable APIs, and stay 100 % unit-covered. Whether you embed just the router in a micro-service or the full stack in a SaaS monolith, the promise is the same: maximum power, zero framework baggage.

Core Components

Hyper-Fast Router

Trie-based dispatcher resolves 100k routes in microseconds, auto-wiring REST & GraphQL.

Smart DI Container

Compile-time injection, scoped lifecycles, and reflection-free hydration keep boot times tiny.

Event & Middleware Bus

PSR-15 pipeline and async event hub let you weave auth, caching, and observability with one-liner configs.

Core Components

All Core Components

Component

What It Is

auth

Robust authentication guards with JWT, OAuth2, and role-based policies.

cli

Command-line toolkit for scaffolding, migrations, and routine workflows.

core

Bootstrap engine that wires services, configurations, and the application lifecycle.

database

Lightweight query builder and schema abstractions supporting MySQL, PostgreSQL, and SQLite.

dev-server

Built-in PHP dev server with hot reload and error overlay for rapid feedback loops.

di

Dependency Injection container with compile-time wiring and zero-reflection instantiation.

entity

Simple entity mapping layer with annotations and lifecycle hooks.

events

Asynchronous event dispatch, listener registration, and a publish/subscribe hub.

http

PSR-7/17 HTTP message implementations plus URL generation and helper utilities.

i18n

Internationalization support: translation, locale negotiation, and pluralization rules.

migration

Database migration and seeding commands with version control.

mlc

MonkeysLegion Core config files.

query

Fluent query builder with expressive methods for filters, joins, and pagination.

router

High-performance routing engine with zero-config conventions and middleware support.

telemetry

Metrics collection and tracing integration for OpenTelemetry and Prometheus exporters.

template

Lightweight template engine with caching, inheritance, and simple control structures.

validation

Declarative validation rules, custom validators, and error message formatting.

Embed only what you need—then watch MonkeysLegion propel your service from prototype to production without a single unnecessary line of code.